#help-development

1 messages Ā· Page 690 of 1

rotund ravine
#

.toVector

kind hatch
#

I started with 3 text boxes.
Made text box 1 and 2 auto layout (grouping 1)
Made text 3 auto layout. (grouping 2)
Selected group 1 and group 2 and made them auto layout.
Centered the group using the auto layout grid.
Changed group 1 resizing property to fill.

Then anything extra like icon and box shadow came afterwards.

vagrant stratus
#

Just not sure how I screwed up though šŸ¤”

smoky oak
#

wait, doesnt toVector concern direction?

young knoll
#

No

#

A location as a vector is just xyz

#

Well with toVector that is

#

If you use getDirection that will involve the pitch and yaw

sage patio
#

Any idea how can i figure out if a location is in a region? (i've a custom region object which it contains x-y-z 1 and 2)

young knoll
#

Turn it into a bounding box

#

Bounding boxes have methods for that, and a bunch of other stuff

kind hatch
vagrant stratus
#

Yea, that would probably be easier šŸ˜†

#

Luckily I only need to do this kind of stuff once, since I can just save it and re-use it

#

Making me get my phone out LMAO

lunar wigeon
#

Life is like Hello World - you can't live without it
~ Andrut Kokosowski

sage patio
#

the green lines are the blocks/locations the bounding box contains

#

also i set all of the locations

young knoll
#

Sounds like you just need to expand your bounding box

sage patio
young knoll
#

If you pass on the correct corners to BoundingBox.of it should be fine

#

If not you probably need to add 1 to the x and z of the max corner

sage patio
#

i'm using worldguard api to get the pos1 & 2

#

so it should be fine

#

thank you for help

young knoll
#

Worldedit had cuboidregion which should function similarly

echo basalt
#

?

shadow gazelle
#

Is there a way to add glowing to a player with a specific color?

#

Without a team

scenic valve
kind hatch
#

Glow color is defined by a Player's scoreboard team color.

scenic valve
#

Ah, thought they meant like coloured names or something like that

cursive kite
#

I am trying to decide a good database set up, I want a users table for UUID, rank, etc… I also need a factions table to store faction ID, faction name, faction description etc…. But how should I tie a user to a faction as I don’t really want to add faction to the user table since later I plan to expand to more than factions… but I need to be able to store which faction a player it and their faction rank

#

I also want to have a log of faction actions such as rename, kicked player, added players… but am not sure how I should design a table for that either

forest minnow
#

Have a users table, a factions table, and users-factions (this will be a many to many).

cursive kite
#

Even though each player can only be in one faction?

#

And whats the best way to go about a faction history log

subtle folio
#

then for a history you can make a faction history table that stores a foreign key to the faction

#

it’ll be importsnt that instead of deleting a faction row (bc it will have history referencing it) you can either remove everyone from that faction and let it collect dust to persev the history, or just delete the history related to it first

cursive kite
#

I kinda want it so if a faction is deleted the log is not

tight bison
#

I'm trying to set the item a Witch entity holds, but it's not working. The server I'm testing it on is Paper 1.12.2:

final Witch witch = (Witch) super.spawnEntity(location);
witch.getEquipment().setItemInMainHand(new ItemStack(Material.EXPERIENCE_BOTTLE));
#

The super.spawnEntity() method just returns an entity, which is of type Witch.

subtle folio
glad prawn
#

wat

tight bison
cursive kite
#

Maybe I could have a flag, active or deleted for each fraction

subtle folio
#

row

#

history is good

#

yes a for isActive

cursive kite
#

Awesome!

#

Any specific way I should setup the log table so I dont have to fix too much later on

#

factionuuid, playeruuid, action, desc?

subtle folio
#

sure

#

time of occurrence maybe?

cursive kite
#

thank you so much!

#

I wonder how I should store faction ids though

#

Basically right now I gen a random UUID and just ensure it is not currently used

#

But that is with config so its easier

#

More difficult to gen a random uid and ensure it doesnt exist within all the active/deleted factions

#

Maybe an id (autoi increment), factionuuid,

#

But then that doesnt solve the issue of overlapping uuids i guess

subtle folio
#

well mysql has an auto increment functionality

slender elbow
#

rest assured you will never witness uuid collisions tho

subtle folio
#

depending on what database your using it should all be the same

subtle folio
slender elbow
#

it isn't, but the odds are infinitesimal

subtle folio
#

even with an insanely high unlikelihood it’s not 100% guaranteed meaning it’s not practical for production use

slender elbow
#

like yes technically if you have a 8192-bit number that is generated with guaranteed randomness eventually šŸ¤“ in a billion years the odds of two matching will be 2%

#

realistically it won't happen

subtle folio
subtle folio
#

it’s uuid not guid

#

tho i think that is also easy to implement within mysql itself

#

lemme look

cursive kite
#

I think imma have log_id faction_uuid issuer_uuid target_uuid action and desc

#

and have issuer/target nullable

#

Hopefulyl this will work long term

quaint mantle
warm mica
half swan
#

I would like to make a spigot plugin that makes a new world with just an arena in it, and the rest void (or normal world generation, doesn't really matter).
I've found some resources that show how to make Minecraft world generation yourself, but I can't seem to find anything to make like just a single structure of some sorts.
Do I just make a method that creates a new world and set the blocks one by one (seems inefficient)?

How would I approach this?

Any help would be appreciated šŸ‘

eternal oxide
quaint mantle
#

i use world edit for templates but whatever you want lol

eternal oxide
#

Spigot/Minecraft has built in structures so no need for WE

quaint mantle
#

i use worldedit for bigger structures (bigger than structure limit)

half swan
wide coyote
#

I knew this existsed but I am not sure if we can actually load schematics

quaint mantle
#

then use worldedit api lol

wide coyote
#

I already do, just asking

hybrid spoke
#

fawe ftw

eternal oxide
#

then save if you want to keep it

half swan
#

could you maybe give me a little example code or something?

eternal oxide
#

to paste one you load it, then paste

#
manager = Bukkit.getStructureManager();
structure = manager.createStructure();
structure.fill(location1, location2, false);
manager.saveStructure(key, structure);```
#

that will create an nbt file for that structure

#

to load and paste it's very simple

#
structure = manager.loadStructure(key);
structure.place(location, false, StructureRotation.NONE, Mirror.None, 0, 1, new Random());```
#

you only need to load it once

#

then you can use teh manager.getStructure

echo basalt
#

How optimized is the structure manager?

eternal oxide
#

very poor

echo basalt
#

shit so I can't really use it in my Cosmos plugin

eternal oxide
#

teh manager is fine, but pasting is slow. As slow as WE

#

I did a test using structures to paste a chunk at generation in a void. It was slow

quaint mantle
#

you can always use worldedit :p

echo basalt
#

How slow

eternal oxide
#

pointless unless you want to paste a MASSIVE structure and then WE will kill yoru server anyway

echo basalt
#

Like would it be a viable alternative to just using worldedit for skyblock islands

#

or does it take like a minute

eternal oxide
#

server keep up messages as you moves pasting in chunk gen

#

oh yeah you could easily do islands

hybrid spoke
#

f-a-w-e

quaint mantle
kind hatch
#

@sullen marlin Would it be fine to remove "May be null" text on methods that are annotated with @NotNull & @Nullable?

eternal oxide
#

probably not

#

as those annotations don't force compliance

quaint mantle
#

just give it @Nullable

#

or use Optional

#

to force compliance

icy beacon
#

recode it in rust

quaint mantle
#

what

icy beacon
#

no null - problem solved

quaint mantle
#

rust supports null

icy beacon
#

there are Option and Result that are used instead of null

echo basalt
#

shit I guess I should just fuck around and find out

quaint mantle
#

it is useful for multithreading

eternal oxide
icy beacon
#

welp my knowledge of rust is really basic because I just started learning it

#

but it doesn't seem like it would have that many use cases

eternal oxide
#

Skyblock isn;t going to be pasting new structures that often

quaint mantle
#

low level multi threading

icy beacon
#

feels like most times you could use result and option

icy beacon
quaint mantle
#

when the value isnt yet initialized and you are trying to do data race for threads to initialize it

upper hazel
#

an urgent question, they took me to the team to create plugins on the server, they ask me how much I’m ready for this is the first time what fee to take once a week

quaint mantle
#

or controlled memory leaking

echo basalt
#

what's the Random for

#

can I pass null

#

I don't like having randoms

eternal oxide
#

the random is used if you have damage

icy beacon
echo basalt
#

hm

#

ThreadLocalRandom.current it is

icy beacon
eternal oxide
#

oh and for loot

quaint mantle
#

cool low level multi threading where you need to handle memory manually in rust

upper hazel
echo basalt
#

Yeah I don't use loot

quaint mantle
#

due to cpu and language limitations regarding multi threading

eternal oxide
#

passing a seeded random you can ensure it's integrity(if used) and loot will always generate teh same each time

echo basalt
#

I wonder if there's a way to make an empty structure

quaint mantle
#

or i think you would use also null pointer for one way channels

eternal oxide
#

yes you can create an empty structure

echo basalt
#

with a predetermined size

#

that's just air

eternal oxide
#

yes, just save air

quaint mantle
#

or you can also save structure void

echo basalt
#

uhh

#

Does the structure have a center or is the center the lowest corner

quaint mantle
#

which is less than air

quaint mantle
echo basalt
#

trying to make a getDimensions() method which returns the min and max offset compared to the center of the structure

#

but I only have a getSize which returns a single vector

quaint mantle
#

you need to try and see

eternal oxide
#

if I remember the structure is corner based

echo basalt
#

ffs

quaint mantle
#

yeah they are

echo basalt
#

time to hold a Vector anchor

eternal oxide
#

Structure has a getSize so you can easily calculate it's center

echo basalt
#

nah I'll just use an anchor offset passed by my serializer

#

Can I create a structure of pre-determined size hm

icy beacon
#

but iirc you're also Russian

echo basalt
#

maybe by passing a hacked location where getBlock always returns air

upper hazel
eternal oxide
sullen marlin
icy beacon
echo basalt
#

ehh these are just nms wrappers

#

fuck

#

It'd actually make me save an empty version of it

#

I can probably do that on startup

eternal oxide
#

you don;t have to save

echo basalt
#

well

eternal oxide
#

you can create/use without ever saving

echo basalt
#

I'm aware

#

my plugin's about saving and loading structures and pasting them on a grid

#

There's simply no Structure#setDimensions or a way to fill it without reading blocks

#

and just assuming it's air

upper hazel
eternal oxide
#

pass a location thats above build height and it's guaranteed to be air

echo basalt
#

yeah but it's still reading

icy beacon
upper hazel
#

bad speak

#

english

eternal oxide
#

yes, but you always have one world and you only generate at startup

echo basalt
#

eh fuck it I can read it once and save it in the db

upper hazel
#

I sometimes don't understand English slang

icy beacon
#

you'll get there

desert tinsel
#

is there any event from when a player changes his slot from the main hand?

#

like with his mouse wheel or the keyboard

sullen marlin
#

PlayerHeldItemChangeEvent or something

desert tinsel
#

PlayerChangedMainHandEvent can this be?

sullen marlin
#

PlayerItemHeldEvent

twilit roost
#

is there something like spigot config api but for bungee?

im getting tired of how bad it is on bungee
im making auto update config system, but want to keep comments while adding new values

its easy to do when new values aren't inside existing sections
but inside existing sections its just straight up impossible

soo is there something like the api or some other way to solve my problem?

lilac dagger
#

wasn't there one?

#

pretty sure there was

twilit roost
#

oh my
never heard of it

looks promising!
thanks so much

lilac dagger
#

isn't this built in?

#

after all bungee does use yml

#

like for real

#

šŸ˜„

#

there is a system on bungee

#

why not use it?

white root
#

even if there was just no built in configuration system, shading and using snakeyml isnt difficult

#

or you could go even more simple and just use json/gson

tulip owl
#

How can I get the location of bukkit.yml, It would be useful for my debug command as settings in there quite often cause issues? As it can be moved with --bukkit-settings I cannot just look in the standard position and searching for it seams a bit jank šŸ˜†.

There is getBukkitConfig() in the Paper API but I cannot use the Paper API sadly :(

onyx fjord
#

and you shouldnt

tulip owl
#

Is there an alternative in the Spigot API?

hybrid spoke
onyx fjord
#

maybe you can look for -bukkit-settings

#

and if the arg is present use that path

#

otherwise the default

hybrid spoke
#

ah nvm it can be moved didnt read that

tulip owl
hybrid spoke
#

you could also check what paper does

tulip owl
#

Good point

echo basalt
#

yeah it accesses the configuration field on CraftServer

#

Nothing's stopping you from using reflections to access it

onyx fjord
#

what do you wanna retrieve from bukkit settings

echo basalt
#
Server server = Bukkit.getServer();
Class<?> serverClass = server.getClass();

Field configurationField = serverClass.getDeclaredField("configuration");

if(configurationField == null) {
  return null;
}

configurationField.setAccessible(true);
YamlConfiguration config = (YamlConfiguration) configurationField.get(server);
tulip owl
#

I might just search for it after looking in the standard position

echo basalt
#

or just use reflections and move on

tulip owl
#

:(

onyx fjord
tulip owl
#

Debug command that will upload it to paste.gg etc

distant wave
#

is there anyone who knows how to use lightapi?

tulip owl
hybrid spoke
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

warm mica
#

Import the library, add it as a depend and use it as shown in their example

distant wave
#

i know how to import a library

warm mica
#

I don't think that's easily possible, you'd possibly have to enforce a block update, so that the light levels are being recalculated

glacial narwhal
#

Is it possible to remove a recipe when its crafted ?

warm mica
#

i.a. block.getState().update();

rough drift
#

ye

distant wave
#

so does this makes sense to you that it doesnt work?

warm mica
# rough drift ye

I meant not easily in the context of that you cant just efficiently reevert it in their api

lost matrix
lost matrix
warm mica
glacial narwhal
distant wave
#

altough it passes that statement

warm mica
#

and remove the .getName()

lost matrix
# glacial narwhal wholse server

Listen for when an item is cratfted, add the recipe to a Set, and cancel the PrepareItemCraftEvent
if a recipe of that set is crafted again.

distant wave
#

cant

warm mica
glacial narwhal
distant wave
#

maybe i misused some fork

#

its possible

lost matrix
glacial narwhal
#

no just when ex: "crafting table" it can no longer be crafted and so for all crafts

lost matrix
#

That is oddly specific... So if anyone crafts a Stick, then nobody can craft anything else afterwards?

distant wave
glacial narwhal
warm mica
#

There are some flags you can pass, maybe they are useful

lost matrix
young knoll
#

You can just add the recipes key to the set

#

Also makes saving it across restarts easier

distant wave
warm mica
#

It won't apply it as the material is already the same

lost matrix
smoky oak
#

I'm about 95% sure nobody in here had an issue like this before (and i haven't started working on it yet so i dont have any code to show for it), but does any of yall know if there's an uniform way to determine how semi-transparent blocks shift particle colors?
My ultimate goal here is to make particles 'visible' over longer distances by scaling them and projecting them closer to the player

distant wave
#

okay let me restart the servr

#

nope

young knoll
distant wave
#

still

smoky oak
#

particles get eaten after they're 31.5 blocks away

#

they just

smoky oak
#

pop out of existence

young knoll
#

There’s a Boolean for that

smoky oak
#

its a client side thing afaik

lost matrix
smoky oak
#

seriously?

smoky anchor
young knoll
#

There’s a spawnParticle method with a Boolean force

#

force - whether to send the particle to players within an extended range and encourage their client to render it regardless of settings

smoky oak
#

its only giving me this method

smoky anchor
#

That's not spawning the particle

smoky oak
#

oh wait

#

yea i just realized

#

lol

smoky anchor
#

Also, not every particle has the size parameter

lost matrix
glacial narwhal
lost matrix
#

HashSet would be best suited

lost matrix
glacial narwhal
smoky oak
smoky oak
#

im on latest

smoky anchor
#

world.spawnParticle

smoky oak
#

well yea

lost matrix
#

Do you use Player#spawnParticle or World#spawnParticle

young knoll
#

Hmm yeah interestingly only the world version has it

smoky anchor
#

Hmm true...
Seems like a bug or something

smoky oak
#

i mean im not going to spawn more than 35k particles in anyways

#

should be fine

glacial narwhal
young knoll
#

The client won’t render more than 16k

#

By default

smoky oak
#

really?

young knoll
#

Ye

smoky oak
#

I've stress tested that though?

glacial narwhal
smoky oak
#

it rendered anything below 40k in one go

#

wait

smoky anchor
#

do you perhaps have some mods ?

young knoll
#

Check the P count in f3

smoky oak
#

no

#

is it total particles or particle packets

#

cuz i send em in 4k packets saying 'spawn 10 particles' each

smoky anchor
#

well the packets will still be sent, but client will clear the oldest particles

glacial narwhal
smoky anchor
#

I am not gonna spoon feed you
Look into the docs

#

if you do recipe. any good IDE will tell you all the methods

lost matrix
#

Just looked at CraftPlayer.
Player#spawnParticle always overrides the spawn limiter for the particle packet.
This means particles sent this way should always be displayed.

shadow night
#

What even is CraftBukkit and what is it for

smoky anchor
young knoll
#

CraftBukkit is the implementation of the Bukkit api

lost matrix
hybrid spoke
young knoll
shadow night
lost matrix
smoky anchor
young knoll
#

Yeah distance limit

#

Afaik you can’t override the count limit

smoky anchor
#

Would require client modification

lost matrix
#

That would be griefing, lul

smoky anchor
#

I wonder, can you still spawn 10000000 particles and crash the client ?
Anybody wanna test that ? :D

hybrid spoke
young knoll
#

Probably not because of the limit

#

The client actually patched some crash exploits recently

smoky anchor
young knoll
#

Ie explosions with massive power levels

glacial narwhal
young knoll
#

(Power level is now capped to 255)

smoky anchor
young knoll
lost matrix
#

I actually trolled a friend of mine by sending thousands of particle packets below the world to him.
His frames dropped to unplayable levels and he didnt know why he was the only one... That was within
the first week of learning spigot. Time usefully spent.

smoky anchor
#

:D

young knoll
#

Lul

drowsy helm
#

Took me half a year lmao

lost matrix
#

I mean by calling Player#spawnParticle. Not using packets directly.

shadow night
#

The first week of learning spigot I tried to understand wtf this programming language is

lost matrix
#

He was not amused

shadow night
#

Who tf is Fiera and why do they stink

#

Firea*

quaint mantle
rotund ravine
#

Not really anymor with the mappings

#

The hard part is making it do what you want

lost matrix
#

Understanding what packets are if you have never learned about networking or how
multiplayer games work, is really hard to get a grasp of.

#

Wow im just discovering all the projects from my beginning. This was week 3.

echo basalt
#

mans got the mic on

#

time to boost the audio by 1000% to hear smile breathing

lost matrix
#

lol

lost matrix
#

I thought i was the coolest little guy when i discoverd this

echo basalt
#

There's a way we can oversimplify it

smoky oak
#

can super be called after other operations in @Override methods?

echo basalt
#

yes

#

Or you can just.. not call it

echo basalt
#

welcome to inheritance

young knoll
#

super only has to be first in constructors

smoky oak
#

actually let me rephrase that

#

can you tell the method thats being ovverriden 'Execute this code, then what you're overridden with, then this code'?

young knoll
#

yes

echo basalt
#

so

young knoll
#

Oh wait

echo basalt
#
@Override
public void doWhatever() {
  this.doSomething();
  super.doWhatever();
}
#

but it's not any different from

young knoll
#

So you want your overriden code to be in the middle of the original code

drowsy helm
echo basalt
#

doSomething()
doWhatever()
joe

smoky oak
#

ah i forgot about this that'd do it, thanks

#

actually wait no it wouldnt

#

thats the wrong method

twilit roost
smoky oak
#

i meant if i could retain code from the method thats being overridden, not the method thats doing the overriding

echo basalt
#

xy problem

smoky oak
#

ah basically

#

i want to make a marker 'this method has been run'

#

problem being while i could easily do this with creating another method that sets that flag etc, it would break anything that depends on the class

young knoll
#

Have you heard of

#

ASM

smoky oak
#

no

echo basalt
#

no point in asm

#

just debug shit

#

or well ideally you'd use decorators

smoky oak
#

what are those?

echo basalt
#

it's a pattern that acts as a sort of proxy

young knoll
echo basalt
#

It's a weird ass pattern but

#
public interface StringProcessor {

  String process(String input);

}
public abstract class StringDecorator implements StringProcessor {

  private final StringProcessor processor;

  protected StringDecorator(StringProcessor processor) {
    this.processor = processor;
  }

  @Override
  public String process(String input) {
    return processor.process(input);
  }
}
#

It's a weird ass pattern

#

But basically it lets you do shit like

#
public class FancyStringDecorator extends StringDecorator {
  
  public FancyStringDecorator(StringProcessor processor) {
    super(processor);
  }

  @Override
  public String process(String input) {
    return "Fancy" + super.process(input);
  }
}
public class WackyStringDecorator extends StringDecorator {
  
  public WackyStringDecorator(StringProcessor processor) {
    super(processor);
  }

  @Override
  public String process(String input) {
    return super.process(input) + "Wacky";
  }
}
#

And lets you somewhat control the order of things by extending the decorator class

#

and doing the operations before calling super

#

or after calling super

#

tbh it might not be the right pattern here

#

but it's an interesting pattern to keep in mind

smoky oak
#

ah i see what you mean, though that wouldn't solve my issue, I'm trying to interject code between two 'layers' of inheritance
BukkitRunnable -> SpecialRunnable -> Non-class runnable thats actually getting run
I want to, in the special runnable, set a mark in run(), though i cannot recall right now why

lost matrix
#

This looks suspiciously like a Function<String, String> to me šŸ™‚

echo basalt
#

not this argument again

lost matrix
#

XD

glad prawn
#

Nah both u again

echo basalt
#

we're like 2 old men bickering

smoky oak
#

youre like 19

echo basalt
#

I'm 18

smoky anchor
#

not again NotLikeMegu

smoky oak
#

yea

young knoll
#

If you need me i'll be not here

echo basalt
#

still trying to think wtf this 2am ping was about

#

while people were talking about DDOSing

serene sigil
#

hey, does anyone know how to get the IP address (the one where you can connect from) in spigot?

#

so you can connect with it

autumn cave
#

I don't understand, Bukkit.createInventory(owner, size, title) returns an Inventory but neither that class or CraftInventory contain a title? Where is the inventory title stored?

echo basalt
#

It's weird

autumn cave
#

How do I get an InventoryView? (without player.openInventory(...))?

young knoll
#

Idk why inventory doesn't have a get/set title

worldly ingot
#

Well, it's stored in the inventory but it's not accessible via API because it doesn't make sense to

smoky oak
serene sigil
smoky oak
#

ye

echo basalt
#

anyways

#

The title is actually stored in the nms container

#

iirc

young knoll
#

Currently to change the title of my static inventory I have to rebuild the entire thing

#

sadge

echo basalt
#

packts

young knoll
#

No no

#

The inventory not the view

autumn cave
young knoll
#

I can change the title of the view with the new setTitle method

serene sigil
#

but that returns the players ip

#

i want the server ip

lost matrix
autumn cave
#

Do you guys know the exact field the title is stored within CraftInventory?

echo basalt
#

ping ipchicken and read the html data lmfao

serene sigil
#

when is it not null?

echo basalt
#

something about online mode? no clue I don't use that

smoky oak
lost matrix
serene sigil
#

oh

young knoll
#

isn't that usually blank

serene sigil
lost matrix
#

You can also go the classic way and use InetAddress

InetAddress IP = InetAddress.getLocalHost();
young knoll
#

F

echo basalt
#

ahh good ol' InetAddress

#

last time I used it was when I was an intern at a school and made a shitty java class that would wipe folders and store the ip address on a .txt file

serene sigil
lost matrix
smoky oak
serene sigil
hybrid spoke
#

@echo basalt watch out daddy

echo basalt
#

oh shit

hasty prawn
echo basalt
#

a literal god is coming after me

lost matrix
echo basalt
#

time do draw a pentagram

smoky oak
#

nah

#

a circle of salt is enough

hybrid spoke
smoky oak
#

hes not a real god

echo basalt
#

idk I'm not religious

#

I can just deny your existence

hybrid spoke
quaint mantle
smoky oak
#

see thing is youre not omnipotent so beliefs do apply to you

smoky oak
#

demons get warded off by salt

smoky oak
#

as a result so do you

serene sigil
echo basalt
#

it's my favorite gym song

hybrid spoke
serene sigil
#

no

hybrid spoke
#

oh

#

?bing then

undone axleBOT
glacial narwhal
#

how can i set the result of a recipe "null" without making a new craft ?

autumn cave
#

How to convert BaseComponent to nms Component?

lost matrix
smoky oak
hybrid spoke
serene sigil
#

like externally

lost matrix
#

But your public IP could be shared between devices if you are behind a NAT

quaint mantle
#

people use bing?

hazy parrot
smoky anchor
serene sigil
hazy parrot
#

yes

lost matrix
young knoll
#

Not cancellable

lost matrix
#

Thats weak

young knoll
#

event.getInventory.setResult(null)

hybrid spoke
#

coll faster than he can delete

lost matrix
young knoll
#

It's fired after

hybrid spoke
#

how would it be fired before

glacial narwhal
lost matrix
#

This sounds like it should be fired before and have a setResult() method honestly

young knoll
#

I mean

glacial narwhal
young knoll
#

It does, i've used it before

#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

hasty prawn
#

Well if it was fired before it could just be cancellable

lost matrix
#

That as well

hybrid spoke
#

if it was fired before it could predict the future

opal carbon
hybrid spoke
#

or am i braindead

echo basalt
#

The event has a setResult that can be null

lost matrix
echo basalt
#

Unless we're talking about diff things

opal carbon
#

the inventory for prepareitemcraft you can get result and set to null

echo basalt
#

Idk I'm just waiting for my pizza

lost matrix
tender shard
young knoll
#

The inventory has a setResult that can be set to null

echo basalt
#

Uhh

young knoll
#

Not the event it self

opal carbon
echo basalt
#

Pepperoni

tender shard
#

nice

echo basalt
#

Domino's

opal carbon
#

sometimes

#

idk

hybrid spoke
#

didnt slept for 48 hours

echo basalt
#

I used to go with ham as a kid

#

But it's a bit too bland

lost matrix
young knoll
#

It's fired after the output is calculated

#

Hence why you have the recipe and output

opal carbon
#

idk just feels wierd its fine the way it is

lost matrix
#

I still feel like it would be more consistent with other events if it was fired before the item
is placed in the result slot. Implementing cancellable and setResult() methods would be
really usefull here.

opal carbon
#

then just make it so if its cancelled it sets the result to null

#

instead of reordering things wierdly

echo basalt
#

ayy I got my food

lost matrix
#

Currently this event is fired in a weird order imo.
I dont see a reason for it being fired after the preparation
and not before. It would be so much more powerful if fired before.

hasty prawn
lost matrix
hasty prawn
#

Also yeah I agree with 7smile I don't really understand why it's fired after

echo basalt
#

well shit

opal carbon
#

idk just feels like a wierd idea why not just set result item to null

echo basalt
#

not sure about dessie but if smile DMs me his address I can get him a pizza

opal carbon
#

its not a real problem

hasty prawn
#

thats rough man

echo basalt
#

on me

echo basalt
#

sorry you aren't a literal prodigy

hasty prawn
#

yeah i get it i can't compete

#

i asked first but its whatever 😢

echo basalt
#

I got paid this morning

#

and today's invoice day

#

bossman came back from the dead

hybrid spoke
#

i'll take 2 pizzas

#

one peperoni and one salami

echo basalt
#

you aren't a prodigy either

#

also you threatened me like 20 mins ago

hybrid spoke
#

rightfully

echo basalt
#

mans cosplaying as magmaguy

opal carbon
#

also you can mess with the item

echo basalt
#

I should frame his roasts

opal carbon
#

with this

lost matrix
#

Its inconsistent with how events are usually handled. Changing the result of an event
after its effects have already been applied to the world instead of changing the outcome
by calling the events methods is always a bit hacky and indicates a design problem.

opal carbon
#

if u just have the recipe wouldnt it be signifigantly more limited

echo basalt
#

can't wait for mixins

smoky anchor
echo basalt
#

someone should just make a mixin thing

#

so that we can actually like

young knoll
#

They have

lost matrix
#

You have the recipe and the result that is about to be placed in the output slot

quaint mantle
#

you can have mixins on spigot i think

echo basalt
#

fuck around and find out

young knoll
#

It's called ignite

echo basalt
#

type deal

young knoll
quaint mantle
#

you can just add mixin library into your project lol

eternal night
#

you want mixins until you realise half the people in #help-development are going to absolutely trash your server internals KEKW

opal carbon
young knoll
#

Yeah it's not that easy lol

lost matrix
echo basalt
young knoll
#

Just because you have the library, the server needs to actually load them

opal carbon
#

cause then thats just very similar to what we already have

#

unless im misunderstanding

echo basalt
#

like injecting a bunch of chunk stuff and making multi-threaded stuff

eternal night
quaint mantle
echo basalt
#

paywall it

young knoll
#

kek

eternal night
#

probably best KEKW

echo basalt
#

and ban those who can afford

young knoll
#

You need a jvm arg

#

--mydevsreallyknowwhattheyaredoingiswear

hybrid spoke
echo basalt
#

--ImNotStupidISwear

young knoll
#

--plzdaddygimmethemixins

eternal night
#

imagine debugging a server issue and some plugin just, yanked out half the server implementation šŸ™ƒ

echo basalt
#

:)

hasty prawn
#

D:

lost matrix
#

On that note i just realized that every time we have to suggest "run it one tick later" its
probably a flaw with the API that should be resolved...

echo basalt
#

that's why I hate the 1 tick approach

#

imagine a PostEventEvent

#

wait no

hasty prawn
#

Isn't the 1 tick delay usually what makes inventory duplication possible?

echo basalt
#

yes

young knoll
#

I can already destroy the server's internals with ASM

#

Mixins just saves me the effort

echo basalt
#

still waiting for the day we have dedicated minecraft server hardware

eternal night
#

See, an entry barrier isn't the worst

echo basalt
#

dedicated lighting chip

opal carbon
#

real

quaint mantle
#

so server cpus made to run java?

young knoll
#

Yeah but the ASM approch relies on janky runtime attachment

echo basalt
#

nah we port half the stuff to jni

lost matrix
#

You can probably do some really really fast word generations by using FPGAs if you can
boil it down to a decently low level.

echo basalt
#

make a world generator using graphics cards

#

then some sort of encoder into .mca

#

"yeah bro I bought this 4090 to generate minecraft worlds"

young knoll
#

Sounds like NFTWorlds

lost matrix
#

I mean... technically you could abuse shaders if you have a ton of parallel chunk requests.

echo basalt
#

rip half my income because of those bastards

young knoll
#

They are dead now

#

Well

#

Kinda

echo basalt
#

they've had recent layoffs

#

like

young knoll
#

They are making their own game

echo basalt
#

really really recent

young knoll
#

kekekekeke

echo basalt
#

One of my customers was a designer / moderator for them

#

no clue about the exact job

#

but lost her job last week

young knoll
#

Our master plan is centered around the following:

Modernized Game Engine - Craft a groundbreaking, Minecraft-like game engine from scratch that is built in a more performant and modern language (Rust) that resolves competitors' long-standing limitations, modernizes gameplay, and meets the evolving demands of players and creators.
Cross Compatibility - Ensure seamless transitions for players and creators with backwards compatibility for Minecraft's network protocols, allowing play compatibility with legacy Minecraft servers while using none of their assets or code.
Free, Everywhere - Deliver an unparalleled, free-to-play, cross-platform experience on all devices, including web browsers.
Support Creators - Empower content creators by offering them flexible monetization policies, state-of-the-art tools, and a unified player ecosystem. All of which is governed and directed for decision and feature development through creator-led governance.
Leverage Competitor Shortcomings - Captivate players and content creators with enhanced quality of life offerings, long-awaited features that competitors have failed to provide, and superior content.
#

It'll be in beta this year

#

Trust me

echo basalt
#

delivering today

young knoll
#

Also hytopia is a legend of zelda term

echo basalt
#

just for you my friend

young knoll
#

Wonder if nintento will nuke them

zealous osprey
#

That sounds legit like something you'd find on a sketchy gofundme or smth

young knoll
echo basalt
#

you know it's legit when their webcam is in the corner

#

and they're a middle-aged dad with no programming experience

young knoll
#

Needs a bandicam logo

echo basalt
#

using a mac

#

there's no windows crypto users

#

all mac

young knoll
#

They go on to talk about all the hate on NFTS

echo basalt
#

either the most ergonomic office chair or a 5$ gaming chair

lost matrix
#

Wait... this makes me wonder about something else.
What happened to Hytale?

young knoll
#

I didn't listen to it but I'm sure it's amazing

#

Hytale is still coming

#

Eventually

echo basalt
#

being worked on by riot

#

they're rewriting everything in c++

#

ditching all the java code

#

including server-sided stuff

young knoll
#

What's the you wanted to use your java knowlege to make addons?

#

No fuck you you get LUA

lost matrix
#

Writing plugins must be really fun then.
The will probably throw some scripting language like lua at us.

echo basalt
#

probably

hasty prawn
#

If I wanted to write Lua I would go design a Roblox game

#

no thank you

echo basalt
#

apparently it's in the testing & bugfixing stage

young knoll
#

The keys steps to making a good minecraft competitor

  1. Build hype 10 years too early with a teaser video
  2. Promise easy server modification with java
  3. Switch it all to C++
lost matrix
#

They need to provide absolutely outstanding creator tools in order to
come close to minecraft...

shadow night
#

In this world it is not possible to create a worthy minecraft competitor

young knoll
#

Wdym

#

Hytopia is gonna be it

#

Imean hytale

#

Imean Yogventures

eternal night
young knoll
#

Imean... ah shit

shadow night
#

Somethings gonna happen and poof

lost matrix
shadow night
#

Or something already happened

young knoll
#

Tbh I want compitition

#

Make mojang expand the creator tools on java edition more

shadow night
#

Yeah, that will force mojang to do good

young knoll
#

I WANT MY DATA DRIVEN BLOCKS DAMIT

eternal night
#

I mean, mojang is already on it

#

with their recent snapshots

young knoll
#

mhh

#

They have the framework but they must deliver

eternal night
#

I mean, gotta give. them time lol

#

can't just release creator tools

lost matrix
#

I want data driven UIs. Data driven mobs. Everything.
They could do it. But what do we get? Mobs that sniff some flowers.

young knoll
#

If I don't see data driven blocks by 1.22 I am going to sink sweden like atlantis

eternal night
#

understandable

echo basalt
#

3d plotting of mob AI when

young knoll
#

Hey don't disrespect the sniffy boi

echo basalt
#

minecraft speedrunners been plotting enderdragon positioning for years

smoky oak
#

actually can you not already do that

#

the 3d mob ai thing

rotund ravine
#

Prolly with a third party tool

hasty prawn
smoky oak
#

pretty sure you can make it work with a plugin

shadow night
young knoll
#

yes

smoky oak
#

railguns in minecraft are dumb lol

#

ilmango made a wither farm out of it

#

tnt + arrow = 1 wither / 10 seconds

young knoll
#

You make an arrow freak out and go hyperspeed and then deliver it to the dragons forehead

shadow night
#

It was like there is a hitbox of the dragon that gives insane server velocity, but doesn't move the player unless they take damage and when shootng an arrow with that velocity it can oneshot the dragon

shadow night
#

I wonder if that counts as a glitch or just taking advantage of expected behaviour

echo basalt
#

There's a single pixel in one of the ender dragon's hitboxes that accelerates the player with so much momentum that firing an arrow at it, at the right time, causes the dragon to instantly die

young knoll
#

It's not a bug it's a feature

echo basalt
#

Arrow damage is based on movement speed

#

And arrows are "critical" if the bow is fully drawn

shadow night
echo basalt
#

their velocity is also based on just a vector multiplied by the bow pull percentage

#

You can make all arrows go at full speed by multiplying their initial velocity by 1/pullPercentage

shadow night
# shadow night I've seen that in code

Tbh the code was kinda confusing, but there definitely was something about when the bow is pulled for longer than a certain time the arrow is critical or some shit like that

smoky oak
#

you dont want to see my crit check code lol

echo basalt
#

you dont want to see my crit check code lol

shadow night
#

my code is bad

#

I wonder if I have my github linked in discord

echo basalt
#

you do

#

busted

hasty prawn
shadow night
#

Wouldn't recommend it to people with heart problems tho

echo basalt
#

no clue why half your plugins don't follow the principle of encapsulation

#

but eh not my problem

shadow night
#

Do I even have plugins on my github?

#

I usually use it to syncronize my progress in between my devices lol

echo basalt
#

yes

#

I usually use gdrive

#

but my ideaprojects folder is like

#

30gb

#

and I can't bother paying 2€/mo to have 10bytes/sec read speed

shadow night
#

ĀÆ_(惄)_/ĀÆ

#

What even is "the principle of encapsulation" lol

echo basalt
#

private fields with getters n setters

shadow night
#

And where I don't follow stuff? Yk I gotta learn how it's done correctly

young knoll
#

public fields are a sin

#

Or something

hasty prawn
#

how do you feel about a public static field

smoky oak
#

i raise you

hasty prawn
smoky oak
#

public static final

#

like you know

#

important data like

#

oh i dunno

#

Math.PI

shadow night
serene sigil
#

ive tried getting the public ip of the minehut server, but i cant connect with it

smoky oak
#

isnt minehut down for a while now?

remote swallow
#

did you add the port

serene sigil
#

25565

remote swallow
#

might be how their proxy works

#

is that actually the port

young knoll
#

how about uhh

#

public static final volatile strictfp

remote swallow
#

add a syncronized

serene sigil
#

is there maybe some api?

echo basalt
hasty prawn
quaint mantle
#

i like public static HashMap

echo basalt
hasty prawn
smoky oak
#

yall are insane but that might just be perspective considering i havent slept for the past 24 hours

north nova
#

public static final Map<Map<Map<Map<Map<NavigableMap<Map<Map<Material, Double>>>>>>>> thoguhts

smoky oak
#

ah fuck i just remembered i did something similar once

#

ive got no leg to stand on here

north nova
#

awkward....

young knoll
#

public static final Map

#

:D

north nova
#

a

#

w/e

autumn cave
north nova
#

no

#

its broken on purpose

autumn cave
young knoll
#

Heck if I know

remote swallow
#

you should

smoky oak
#

funny thing actually

#

the compiler cant handle multiple layer maps or distinguish them

#

any Map<K,V> no matter what the V is is equal

#

so a Map<UUID, Player> as parameter is the same signature as a Map<UUID, long>

lost matrix
#

Welcome to type erasure

smoky oak
#

bleh

echo basalt
#

generic types don't really exist either

#

they're autocasted

lilac dagger
#

if only arrays weren't so badly made

#

we wouldn't had type erasure

smoky oak
#

BRUH someone just fuckin deleted a server i was an admin on

#

man today is not my day

lilac dagger
#

tho not sure how it would've worked with the libs

#

like maps and arrays that were already a thing

young knoll
#

Type erasure is sadge

#

Someone go PR no type erasure

#

kek

ivory sleet
#

u have reifiable and non reifiable generics

smoky oak
#

really? it can handle that now?

ivory sleet
#

well no but like, its not the the types necessarily are erased

#

its just because they (in most cases) are gonna get erased that java does not allow this

smoky oak
#

uh

#

define 'reifiable' please

ivory sleet
#

for instance new HashMap<String,UUID>(){}

quaint mantle
#

when reified in java

ivory sleet
#

this would not erasure to Object

lilac dagger
#

is this why i see gson, typetoken to be loaded like this for the types?

ivory sleet
#

yes

smoky oak
#

hey conclube (formerly conclure) doing this <link> stops the discord imbed

#

also thanks for said link

ivory sleet
#

yea ik, just too lazy :>

quaint mantle
#

WeakHashMap uwu

smoky oak
#

:P

ivory sleet
ivory sleet
lost matrix
#

Its like

public class SomeSpecificClass extends Map<String, Integer>

But its an anonymous class instead.

ivory sleet
#

^

quaint mantle
ivory sleet
#

performance?

quaint mantle
#

sped

ivory sleet
#

there's really no significant performance changes, just implementation changes afaik

#

since it just wraps entries with a weak reference

quaint mantle
#

but you could make concurrent weak hashmap

#

easily

ivory sleet
#

yeah, well you'd have some significant problems with a weak concurrent hash map like proper atomicity

quaint mantle
#

you can always make key and value a weak reference

ivory sleet
#

myea well, testing a weak concurrent hash map would be painful, concurrent hash map tests looked painful last time I read through that

ivory sleet
#

yeah well that thing is kinda meh

#

id rather stick with caffeine :>

quaint mantle
#

lol

lost matrix
ivory sleet
#

Ik guava has a MapMaker with ::weakValues() and ::concurrency() but I highly highly doubt that works as expected in a high concurrent environment

quaint mantle
#

i like using just WeakHashMap lol

ivory sleet
#

yea its pretty nice

#

so what do you have against normal HashMap >:(

quaint mantle
#

HashMap is bad becuz yes

ivory sleet
muted dirge
quaint mantle
#

becuz yes

muted dirge
#

😐

#

ok

quaint mantle
#

anyone know what is ConcurrentSkipListSet?

#

i use it for sorted set lol

ivory sleet
#

its well

#

a skip list data structure

lost matrix
ivory sleet
#

but as a set

#

and concurrent

lost matrix
#

Use a TreeSet instead

ivory sleet
#

well for concurrency you pretty much would use that

quaint mantle
#

i never heard of skip list tho

smoky oak
#

?library

ivory sleet
#

or lock if the set isn't exposed to large amounts of concurrent mutations

smoky oak
#

?packaging

#

?maven

undone axleBOT
ivory sleet
lost matrix
#

Well, yeah. But there are only very very few edge cases where you need a concurrent sorted set without
external synchronization

ivory sleet
#

indeed

smoky oak
#

bleh, any article around explaining how to build a lib?

quaint mantle
#

what else i could use for sorted set hmm

lost matrix
#

TreeSet

#

Elements need to implement Comparable or you pass a Comparator to the TreeSet on creation

quaint mantle
#

i have them comparable, i need it for priority lol

#

i had my own implementation but it was kinda messy

ivory sleet
#

yeah you can define prioritization with help of comparable api

lost matrix
#

What operations do you need? Depend on that there are other sorted data structures which would fit you best.

quaint mantle
#

i just want to add a subscriber to handler which sorts it by the priority, the highest priority is the first and the lowest is the last

lost matrix
#

Not sure if i understood that correctly but it sounds like a job for a PriorityQueue

quaint mantle
#

i dont understand priority queue

echo basalt
#

those are nice

#

I used them for queues

serene sigil
#

hi, is there a plugin or something that lets you optain the real minecraft server ip?

#

because just using the public ip doesnt really work sometimes

echo basalt
#

blud wants minehut's ip

quaint mantle
#

oh yeah now i know why i don't use it

#

it makes the lowest priority on top

echo basalt
#

just invert the comparator

serene sigil
echo basalt
#

@wet breach p sure you had some knowledge of how the network is setup

lost matrix
quaint mantle
#

i used minehut and i was making some of the most popular servers on minehut lol

#

but after some changes and becuz i got a server from bisecthosting for free

#

it is useless for me

echo basalt
#

me, who just works for people instead of hosting my own server

quaint mantle
#

yeah

#

then thats good, i mean, i dont pay for hosting my server

#

however minehut requires paying for stuff and i hate it for that lol

serene sigil
quaint mantle
#

before it was great thing

echo basalt
#

everytime you log into a minehut instance it goes through one of their proxies

serene sigil
echo basalt
#

They did some docker container wacky stuff

hazy parrot
#

dk what that is

echo basalt
#

but frosty's the one knowing details

hazy parrot
#

oh athernos type deal

serene sigil
echo basalt
#

yeah but there's a hub

serene sigil
#

its basically aternos on crack

echo basalt
#

that lets you snoop into peoples stuff

#

I wonder if aternos has job opportunities

quaint mantle
#

also im a network engineer on a network server so i just manage shit on bigger server lol

quaint mantle
serene sigil
#

yea

#

thats where i test out my plugin if I dont want to use localhost

echo basalt
#

what's the problem with localhost

#

other than the ability to blow up your machine with 60k packets / second and not noticing the problem

quaint mantle
#

i use dev env to test stuff lol

serene sigil
#

well, i want to test out how my plugin would work for others that probably use a host

flint coyote
quaint mantle
#

ram is kinda cheap ngl

echo basalt
#

it is

lost matrix
echo basalt
#

I want to upgrade to 64gb ram

#

32gb ain't enough anymore