#help-development

1 messages · Page 978 of 1

young knoll
#

Multiplies the current value of the attribute by (1 + x), where x is the sum of the modifiers' amounts. For example, modifying an attribute with {Amount:2,Operation:1} and {Amount:4,Operation:1} with a Base of 3 results in 21 (3 * (1 + 2 + 4) = 21).

#

That’s the description for multiply_base

#

And add is just add

lost matrix
#

There was a bukkit dev that had a good laugh when he added ADD_SCALAR for a multiplication operation...

slender elbow
#

what the FRICK

lost matrix
#

yeah idk. But i love that i have this.

slender elbow
#

I will get my revenge

young knoll
#

Someone check the git blame

#

(md_5)

stone bramble
#

incredibly confused by how the GENERIC_SAFE_FALL_DISTANCE attribute works

#

is it measured in blocks?

worthy yarrow
#

@young knoll would you mind showing me the biome registry system you're using for that example you sent earlier?

worldly ingot
worthy yarrow
#

Hey choco got any tips for packet manipulation? I suppose more general ones

worldly ingot
#

Just use ProtocolLib or something

#

Not sure what else I can give in terms of advice ¯_(ツ)_/¯

worthy yarrow
#

Well thanks anyway haha... I'm not really understanding this at all

worthy yarrow
#

uh oh

young knoll
#

?paste

undone axleBOT
young knoll
#

Don’t tell choco

worthy yarrow
#

uh

#

Can I do that another way lol

stone bramble
#

im going to lose my goddamn MINDD trying to figure out how add_scalar works

#

i cannot get it to do anything consistently, it for some reason does the exact same thing if the scalar is 1 or 0

#

is it base + (base*scalar)???

#

im so confused by this

#

i just want to do fuckinggn

#

base*scalar

young knoll
#

If you just want to multiply the base use the other one

stone bramble
#

multiply_scalar_1?

#

both these descriptions are incredibly vague as are the names

#

multiply_scalar_1 doesnt do what i want it to either

young knoll
#

Da heck are these names

#

Anyway, you want base * value?

stone bramble
#

whoever wrote this i just want to talk

#

yeah

young knoll
#

So if the base is 10 and you add 5

#

You’d get 10 * 5 = 50

stone bramble
#

thats the thing tho

#

for a lot of these attributes it just doesnt fucking do that

#

some of them it does some others it doesnt

#

trying to set step height consistently sets it to double the base value even though the modifier is 1 or 0

#

i dont understand why its doing this

gloomy ocean
#

Is there any way to let bedrock players join a 1.20.4 server through geyser? Paper 1.20.5 isn't out yet and bedrock players can't access the server

young knoll
#

Viabackwards I think can work there

young knoll
stone bramble
#

this code consistently sets step height and safe fall distance to twice base value despite it setting scale, speed, interaction range, etc correctly

#

i dont understand why its doing this

#

basically the exact same code as before

#

im trying to get this implementation fixed and fully functional before trying to rewrite it

#

so i know exactly what values will work

#

unused attribute modifiers at the top cuz i just deleted a bunch of code while debugging

young knoll
#

After you add all the modifiers print the base value out to double check

quaint mantle
#

Do all ItemMetas now implement Damageable?

stone bramble
#

base value is 0.6

#

i figured it out

#

i had residual modifiers left over in the list that werent getting removed for some odd reason

sullen marlin
quaint mantle
#

Thank you

young knoll
#

Didn’t they already

quaint mantle
#

This also applies for the respective ItemMetas that support the new ItemStack components in 1.20.5 right?

#

I assume yes, thank you md 😄

sullen marlin
worldly ingot
worthy yarrow
#

Time to play rocket league cuz packets are frying mah brain

worldly ingot
#

Wait until this guy finds out that Rocket League uses packets too

worthy yarrow
#

Aw shit

worldly ingot
#

You can't escape them!

worthy yarrow
#

Can't ever escape

#

I just want my autumn season to look like autumn D:

quaint mantle
#

There's no API for can_break and can_place ItemStack components right?

sullen marlin
#

Nope 😦 add one

young knoll
#

Choco tried

#

Like several years ago :p

sullen marlin
#

The predicates are really complicated now

young knoll
#

Yay complexity…

#

This better have made armor trim rendering 5x faster smh

cursive kite
#

What is a good amount of logging? I do not want to spam the console with unnecessary info but the more info the more useful when debugging

young knoll
#

Have a config option for debug logging

cursive kite
#

Got it, when debug is off, how much logging would you have in that case

jagged bobcat
#

None if none is needed

cursive kite
#

Good point, appreciate it!

jagged bobcat
#

Really depends on the project. If you have some kind of version fetching maybe you could log when it starts and ends. If you save player data in a bulk you could log that you started saving it and when finished. Or if you want to warn about a bug then warn it really depends on you and how much you want to share with the server logs

cursive kite
#

I have lots of API requests in my plugin, so thats where I am trying to decide whether to log when they fail currently

vocal cloud
#

Well, if your API is spewing errors you'd want every last one to be logged.

cursive kite
#

Should I log successful attempts or not worth it, I was logging the data just incase something goes wrong id just look at console and see the response

young knoll
#

I normally only log issues that need some kind of action or compromise the functionality of the plugin

#

ie a messed up config or some kind of unexpected io issue

cursive kite
#

Fair enough

unique shuttle
quartz anchor
#

i just looked at changes to bukkit api. aren't all items are "damageable" now in 1.20.5? if I add eg: tool component to obsidian block with max damage component, it becomes damageable and does remove durability when mining blocks. or am i missing something?

quartz anchor
#

in vanilla, any items can be converted into damagable items by adding max_damage component. when i look at the changes to bukkit api, i still see the Damagable interface. does that means setting max damage is still limited to specific items like IRON_PICKAXE?

sullen marlin
#

All items are Damageable

quartz anchor
#

ig that cool. ItemMeta doesn't seems to extends Damageable by default so I got confused.

warm igloo
#

will itemstacks that were serialized to a byte string in previous versions deserialize correctly in 1.20.5 with all the changes made to items?

hybrid turret
sullen marlin
hybrid turret
#

my guess would be he means a base64-string from a bytearray

warm igloo
#

yeah

sullen marlin
#

Still doesn’t really help, where did you get the base64 string from?

warm igloo
#

any configurationSerializable

sullen marlin
#

Yes, the intention is for them to deserialise

#

See the release announcement

warm igloo
#

ok ty

lilac dagger
#

is recaf broken?

#

or did anyone find what registry access i have to make for packet deserialization

#

recaf treats these as non classes

#

is it cause of jdk?

lilac dagger
#

they probably didn't update damn

smoky anchor
#

I looked and there is some jdk22 branch

lilac dagger
#

where?

#

oh just the branch?

#

oh i see

#

nooo

#

they made these private

#

wth mojang

#

are they using reflections to call these now?

#

there's nothing calling them lol

#

ah nevermind

#

yay

#

no reflections for me

sullen marlin
#

Why are you using packets for scoreboard???

lilac dagger
#

saves me from having multiple scoreboards

#

1 for each player with teams mirroring

#

and objectives

#

just to display 1 or 2 different things on the scoreboard to players

sullen marlin
#

How is scoreboard per player different from packet per player

lilac dagger
#

i don't have to mirror other things

#

i just send the team once and that's that

#

this is an example of what i had to mirror:

#

i have some old code of what i used to have but it looks horrible

#

i did consider mirroring everything but i had some limitations or something

#

oh yeah, an example that is not covered in the api even if scoreboard per team: a team nametag being visible only to certain other teams

tired star
#

I switched to my ubuntu laptop and now Im getting this error when trying to compile my plugin ````Could not find artifact org.spigotmc:spigot-api:jar:1.19.2-R0.1-SNAPSHOT``` anyone got any ideas for this? already tried googling to no effect :D

eternal oxide
#

didn;t add the repository

tired star
#

do you mean I have to add it manually somewhere? it's in pom.xml though

eternal oxide
#

if you have it in your pom, post teh full error not a snippet

tired star
#

i mean it is added as dependancy. do you want the error with -X flag on or nah?

eternal oxide
#

no

#

just the log

#

?paste

undone axleBOT
tired star
#

ty, just a sec

valid burrow
#

just do maven reload

#

maven clean

#

maven install

#

should fix it usually

tired star
#

reload, clean and install did nothing for me :D that's why im here

eternal oxide
#

can't do anythign from a snippet

tired star
eternal oxide
#

no its not

#

show us the log

valid burrow
#

show us ur pom please

eternal oxide
#

We need to see where its looking

valid burrow
#

99% sure somethings missinh

eternal oxide
#

probably, but he said he had the repo so

#

actually reading back he said dependency

valid burrow
#

yep

eternal oxide
#

so he IS missing the repo as I first said

valid burrow
#

hes prolly missing repo

tired star
#

so i need to add a local repo you say?

eternal oxide
#

no repositories at all

valid burrow
#

u forgot the repo

eternal oxide
#

?maven

undone axleBOT
valid burrow
#

u only have the dependency

#

not the repo

tired star
#

havent needed any before xD

valid burrow
eternal oxide
#

you don;t need the repo if you run buildtools for the version you want

tired star
#

wonder why it worked on my win10

valid burrow
#

cause u ran buildtools there prolly

#

if the package already exists in maven

#

it wont download it

#

but on your laptop

tired star
#

probly yes, a year ago

valid burrow
#

the local maven repo doesnt haev it

#

so when it tries to download it

#

it cant

tired star
#

that really was it :D now it's only complaining wrong target version. this was already helpful so thanks to you both

acoustic shuttle
#

How would I put text into the player's chat box like not tab completions just paste anything into it like "hi"

eternal oxide
#

you can't

acoustic shuttle
#

I thought I saw a couple servers do it before tho?

#

It's like a click event i think

smoky anchor
#

There is "suggest command" for when you click a text in the chat.
I do believe they changed it since 1.20.5 (or earlier) that you can only suggest commands.
That is the only way you can do that.

acoustic shuttle
#

you click on text in your chat and it pastes it

valid burrow
rapid vigil
# acoustic shuttle you click on text in your chat and it pastes it

Something like this?

private void sendClickableText(Player player) {

        TextComponent healComponent = new TextComponent("Click me to get suggested /heal");
        component.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/heal"));
        player.spigot().sendMessage(healComponent);
}```
acoustic shuttle
rapid vigil
acoustic shuttle
#

hopeofully it does

#

if not I'll just like

#

use a command

#

or sum

smoky anchor
jagged bobcat
#

It was made when they added chat reporting it's been there for a while now

#

Tried to use it before on 1.20.2 and it didn't work for me anymore

smoky anchor
#

Perhaps I remember a different change similar to this

acoustic shuttle
#

1.19.3+*

chrome ferry
#

FishHook hook = player.launchProjectile(FishHook.class, player.getLocation().getDirection().multiply(2)); why does my fishing hook juts disappear

#

ok it works when holding a fishing rod

sullen marlin
#

Gonna be a client limit

#

Could make a cool weapon with all those hooks tho

chrome ferry
#

im making a power plugin so people can have abilities, one of them was a grapling hook. If they right click a fishing hook would shoot out and then pull the player to the attatched block

#
  1. right clicking with air doesn't work because i assume the server doesn't get that packet
#
  1. now fishing rod hooks don't work with empty hands 😰
#

what i guess i could is tell the person to texture a fishing rood to a grapling hook. on right click set the item to a 'grapling hook" item. and then shoot the fishing hook.

Problem is, i come back to problem 1. How do i set the item to a grappling hook if they're not holding anything

chrome ferry
sullen marlin
#

Mhm

#

If there were packets there would be an event

tired star
#

anyone know how to enable 'Pattern Matching in instanceof Expressions' in openjdk 11? i've got my ubuntu laptop throwing new hurdles at me :D

sullen marlin
#

Does java 11 support that

eternal oxide
#

possibly the experimental flag

#

if not, it's not supported

tired star
#

it should be as a preview if i read correct information. if I can't find a solution to this I have to postpone my plugin's fixes.

#

I just cant seem to get it as a correct parameter on build part. the flag is --enable-preview --release 16

eternal oxide
#

16 will not be in 11

#

it was introduced as a preview in java 14

#

does not exist in 11

tired star
#

damn

quiet ice
#

thankfully having multiple versions of java is a trivial exercise under linux

tired star
#

why do i even have this version

eternal oxide
#

its the version pre locked up reflection.

#

after that many MC 1.8.8 plugins break

tired star
#

welp I just probably wait for my windows pc. im in a process of moving. been meaning to wipe clean this laptops hdd anyways.

charred blaze
#

if i do this will the "this" object contain the updated Game object?

#

game = new Game(sender, target, this, duelRestrictions, isInGame, isStartingIn5Seconds, plugin);

eternal oxide
#

yes

charred blaze
#

how sure are you

#

how does it work?

eternal oxide
#

Java is pas sby value, however that value is really a pointer. You just reassigned the pointer for game

charred blaze
#

i mean will the new Game object that i am creating contain the "this" object that contains the new game object?

eternal oxide
#

you passed this

#

however, thats a tangled mess

valid burrow
#

uhm

#

why

#

are you passing the request

charred blaze
charred blaze
valid burrow
#

if you are already passing all the contents of the request

#

just pass the request and give it getters

charred blaze
#

look im passing the request object to the game object that is in request object

valid burrow
#

and dont pass the other tuff

charred blaze
#

wdym

#

getters of game object methods?

cobalt peak
#

Hello

inner mulch
#

is the playertoggleshiftevent called in an inventory?

cobalt peak
#

What you recomend for start developing spigot plugins?

eternal oxide
#

learn java basics first

cobalt peak
#

Yea i know java basic

eternal oxide
#

then jump right in

cobalt peak
#

How?? By the wiki or you recomend a tutorial??

charred blaze
eternal oxide
#

pick your favorite IDE, get abused for choosing yoru favorite IDE and become a dev

chrome beacon
cobalt peak
#

O thanks

charred blaze
#

this one should be safer huh?

cobalt peak
chrome beacon
#

A basic understanding of Java is required

#

if you feel like you have that give it a try

#

If you start to struggle you can always go back to just learning more Java

charred blaze
wet breach
#

indeed, and you need to hope you don't pick the worst one

slender elbow
#

Dr. Java my beloved

cobalt peak
glad prawn
charred blaze
#

ill just leave this problem as it is

#

because i dont need the request.game object to be accessed from the game object anyway

valid burrow
charred blaze
#

its just for easier access

valid burrow
#

why?

#

just make getters

jagged bobcat
#

@Getter (lombok)

valid burrow
#

and also

#

why r u using UUID‘s

trim lake
#

Why is this not working? When I will not apply default attributes only my healthModifier it will not give armor to player only heaths. I need to have both default and custom attributes as well.

System.out.println("attributes: " + helmet.getType().getDefaultAttributeModifiers(EquipmentSlot.HEAD));
                AttributeModifier healthModifier = new AttributeModifier(MaskManager.HEALTH_ATTRIBUTE_UUID, "mask_health", effectValue*2, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HEAD);
                helmetMeta.addAttributeModifier(Attribute.GENERIC_MAX_HEALTH, healthModifier);
                helmet.setItemMeta(helmetMeta);
                System.out.println("attributes set: " + helmet.getItemMeta().getAttributeModifiers());
                ItemMeta meta = helmet.getItemMeta();
                helmet.getType().getDefaultAttributeModifiers(EquipmentSlot.HEAD).entries().forEach(entry -> meta.addAttributeModifier(entry.getKey(), entry.getValue()));
                helmet.setItemMeta(meta);
smoky anchor
#

Are you using 1.20.5 perhaps ?

trim lake
#

No, 1.19.4

smoky anchor
#

What is helmet.getType().getDefaultAttributeModifiers(EquipmentSlot.HEAD).entries().forEach(entry -> meta.addAttributeModifier(entry.getKey(), entry.getValue())); supposed to do ?

trim lake
#

add default MC attributes to item, becose they are not there when I add custom one

slender elbow
#

they certainly should be

#

they are default for a reason

smoky anchor
#

I think they are there, the exception the thing is throwing indicates that

slender elbow
#

what item are you using for that exactly?

trim lake
#

but they are not there player is not getting any armor when I will equip that helmet

#

modified helmet

#

default:

smoky anchor
#

Try this command, see if it does the same thing
/give @p diamond_helmet{AttributeModifiers:[{AttributeName:"generic.max_health",Name:"generic.max_health",Amount:8,Operation:0,UUID:[I;-1671546010,1046365864,-1207318979,-1868297409],Slot:"head"}]} 1

trim lake
#

yup same

#

no armor

smoky anchor
#

interesting

trim lake
#

so the default attributes are not there for some reason

smoky anchor
#

can you try vanilla singleplayer too ?

trim lake
#

I mean... even when I printed them they are not there but somehow they are or idk

trim lake
smoky anchor
trim lake
#

Im still not gettin any armor

#

but lets see about vanila sp

smoky anchor
pseudo hazel
#

the issue is probably the extra health bar

#

probably a vanilla bug

trim lake
#

I probably cant remove them right? I wanna prevent conflits when I will be not only one who will modified that item

pseudo hazel
#

this is vanilla sp?

trim lake
#

yes

pseudo hazel
#

does it only happen with helmets

smoky anchor
#

I think this is intentional.
If item has no attribute NBT it will get the default one.
If it does have attribute NBT it will pull from that.
No merging.

pseudo hazel
#

you need to find out what meta was on there are put it with your custom stuff

trim lake
#

sounds bit stupid when there is method to add attribute modifier, but make sens

pseudo hazel
#

but its still probably a bug

glad prawn
#

+8 Armor

slender elbow
#

I wonder if it was fixed in .5 with the whole components stuff

trim lake
smoky anchor
trim lake
#

so yep... its stupid but inteded... at least when I remove the custom attribute the defaults will be there

inner mulch
#

is there a way to somehow get the slot of the item in the inv that got dropped, efficient and reliably (i dont want players to replicate the items and drop them for gui functions)

#

do i just iterate over the contents of the top inventory and look for the slot if it matches the item?

slender elbow
#

pretty sure it should trigger an InventoryClickEvent

#

there are drop actions

inner mulch
#

i didnt know there was

young knoll
#

There is a method to get the default modifiers by the way

slender elbow
#

but they're getting that error tho

#

unless that's a 1.19 thing that is fixed in newer versions :pepelaugh:

young knoll
#

Hmm?

young knoll
#

Yeah that’s just how the game works

#

If there are any custom attributes the default ones don’t apply

#

Cuz idk mojank

slender elbow
#

yeah, but they were trying to add the default attributes alongside the custom one and it was erring

#

it certainly works on 1.20.4

dapper flower
#

Is it an expensive operation checking all inventory slots of all the players every 10seconds?

young knoll
#

Looks like they were getting duplicate modifiers for some reason?

#

I’d have to look closer

soft flame
#

hello, i have this piece of code that is supposed to change the text displayed when hovering the player count from the server list:

ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(Minerium.getInstance(), ListenerPriority.NORMAL,
                PacketType.Status.Server.SERVER_INFO) {
            @Override
            public void onPacketSending(PacketEvent event) {
                event.getPacket().getServerPings().read(0).setPlayers(names);
                event.getPacket().getServerPings().read(0).setVersionName(Utils.chat("&7&lServeur en 1.20"));
                event.getPacket().getServerPings().read(0).setPlayersOnline(Bukkit.getOnlinePlayers().size() - Utils.getVanishedPlayers().size());
                event.getPacket().getServerPings().read(0).setPlayersMaximum((Bukkit.getOnlinePlayers().size() - Utils.getVanishedPlayers().size()) + 1);
            }
        });

the thing is that it doesnt work, and i get no error at all

buoyant viper
#

couldnt u just do this with the ServerListPingEvent ?

soft flame
#

this is in a serverlistping event

#

this works in 1.19.4, but not in 1.20.4

#

i use protocollib rn, but i'll check if theres methods with just the ServerListPing

smoky anchor
soft flame
#

yes

smoky anchor
#

That's.. not how that works
Pretty sure someone could make the server run out of memory with this if they just kept refreshing

smoky anchor
# dapper flower ^

Not really.
If you worry too much, you can check every player every 10 seconds but with different tick offset.

dapper flower
#

I guess i will save the results in an hashmap like a cache and if the result is wrong recheck

soft flame
dapper flower
#

just to get over my paranoia

worldly ingot
#

You could also just be pretty liberal with your checks. e.g. if you're looking for a very specific item, check the item's type first before pulling its ItemMeta

#

If I'm looking for a specific item with an NBT tag, I'll do something like this:

public static boolean isMyItem(ItemStack itemStack) {
    if (itemStack == null || itemStack.getType() != Material.WHATEVER || !itemStack.hasItemMeta()) {
        return false;
    }

    ItemMeta itemMeta = itemStack.getItemMeta(); // This is the expensive call
    PersistentDataContainer container = itemMeta.getPersistentDataContainer();
    return container.has("my_key") && container.get(key, PersistentDataType.BOOLEAN);
}
#

This way it has to go through 3 pretty common checks that strike out most possibility before accessing its ItemMeta

dapper flower
#

Hashmap caching + itemType check is enough ig

young knoll
#

Is ItemMeta cloning any less expensive now

#

Since it’s already parsed out of NBT by the game

nova bolt
#

Hello! What its wrong with this? This its my first time doing a plugin so long and complicated and i used a bit of outer help. And i am kinda new to this spigot coding thingy
https://pastes.dev/AB9kVH6vyC

#

please tag me when responding

slender elbow
nova bolt
tepid turret
#

whats the java doc for effects?

smoky anchor
#

?notworking first
second: do not extend or implement bukkit classes unless the docs state you can

tepid turret
#

And whats the Material.matchMaterial() equivalent for effects

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.

smoky anchor
#

Do not create a new scoreboard every time a player moves
And try to follow java naming conventions public void PlayerMoveEvent(PlayerMoveEvent event) { should be playerMoveEvent(...) {

smoky anchor
nova bolt
tepid turret
tepid turret
#

bro ima die im tryna look up the docs but my internet is dying

young knoll
#

Registry is basically how you should parse any type of string into game element

tepid turret
dapper flower
smoky anchor
young knoll
#

It adds the plugins name

tepid turret
#

Cool :)

dapper flower
# dapper flower you cannot cast CraftScoreboard to Scoreboard

also if you read the error you can understand where everything started, java is pretty detailed:

For instance the first line says
at me.neamar.mysticcorebun.Scoreboard.Scoreboard.createBoard(Scoreboard.java:36) ~[MysticCoreBun-1.1.jar:?]

Meaning that the exception started in the method createBoard() in the file/class Scoreboard.java at line 36

#

and then it tells you what called createBoard, in case the issue was somewhere near that

#

If you learn how to understand java errors it cuts a lot of time debugging

nova bolt
#

hmm ok imma try to solve it

tepid turret
# young knoll Yes

Sorry but how do I use registry to get the type?

Registry<PotionEffectType>???
Registry.POTION_EFFECT_TYPE.match is depreciated.

nova bolt
#

i think i found the problem bcs near that was
?paste @EventHandler
public void onPlayerJoinBoard(onPlayerJoin event) {
createBoard(event.getPlayer());
And i removed the "board" from onPlayerJoinBoard
@dapper flower is it good?

#

or its gonna mess it up even more?

tepid turret
nova bolt
#

ohh thanks i couldn't find the key

tepid turret
#

will be called whenever a player is joined

#

also don't ask if code is good

#

Just test it :)

nova bolt
#

oh thanks

rapid vigil
tepid turret
#

I was just assuming they were correct

#

How do I use Bukkit Registries

#

?registry

lilac vector
#

Y'all which one would be more preferable, the goal is to have fully custom items (i.e. the majority of the items in a players inventory will be custom)

Option 1:

  • Store items with a hashmap and have "item_id" as an NBT field
  • pro: everything is always up to date as item stats would be pulled from the hashmap constantly
  • con: since everything is constantly pulled from the hashmap potentially slower

Option 2:

  • Store items with a hashmap and have "item_id" as an NBT field
  • In addition to that when joining the server go through and update the players inventory adding and updating stuff like "crit_damage" into the items NBT
  • pro: Only would have to update the players inventory when they join the server so it'd be a lot less work on the server
  • con: not realtime up-to-date, though i could just update every players inventory when reloading

Option 3:

  • Have a virtual inventory of the player which gets updated
  • pro: up to date and doesnt require a billion hashmap accesses
  • con: potentially really complicated to implement and is error prone
vast ledge
tepid turret
#

How do i get a key of a potion effect

lilac vector
tepid turret
#

don't

lilac vector
#

don't what?

tepid turret
#

its painful

lilac vector
vast ledge
#

Just add a pdc to the item

#

Then when it's being used, check if it has your pdc

#

?pdc

tepid turret
# lilac vector yeah but i need to

I'd suggest looking into Oraxen and Itemsadder and see how they handle it. (But I know oraxen uses persistent data containers which is what @vast ledge just recommended)

lilac vector
#

ic

vast ledge
#

Pdc is the most efficient and friendly way

#

Afaik

lost matrix
lilac vector
#

and then just update the items on reload/join

tepid turret
lost matrix
#

Yes

#

Through the potion effect registry

tepid turret
#

doesn't need updating

lost matrix
#

Let me start my IDE and show an example

lilac vector
#

yes but the item stats might

tepid turret
tepid turret
vast ledge
#

It's called a Persistent Data Container after all

tepid turret
#

how would you guys recommend i store the fact that a player has potion effects (that need to be removed) on them?

#

Basically when they get the potion effect

#

ima mark the player

#

so that when the remove function is called it will just remove the marked effects

vast ledge
#

Have a file or amth

#

Idk if players have pdcs

tepid turret
vast ledge
#

Then add then to a pdc entry

tepid turret
#

as a hash or each individual one?

lilac vector
#

not too sure abt that

lilac vector
tepid turret
#

there is a chance they can have plenty of these effects

tepid turret
lilac vector
#

cos with pdc you'd have to go through every single player that has ever joined

vast ledge
vast ledge
tepid turret
lilac vector
vast ledge
#

Nah

tepid turret
vast ledge
tepid turret
vast ledge
#

Can a pdc hold an arry

#

If so

lost matrix
# tepid turret I've been trying to use this but I'm not completely understanding the javadocs f...

Type to key:

    PotionEffect potionEffect = new PotionEffect(PotionEffectType.SPEED, 100, 1);
    PotionEffectType type = potionEffect.getType();
    NamespacedKey namespacedKey = type.getKey(); // Would be: "minecraft:speed" for example
    String key = namespacedKey.getKey(); // Would be: "speed" for example

Key to type:

    String key = "speed";
    NamespacedKey namespacedKey = NamespacedKey.minecraft(key);
    PotionEffectType type = Registry.EFFECT.get(namespacedKey);
vast ledge
#

Just make an array of the effects

#

And put then on here

tepid turret
vast ledge
#

That was a question...

lost matrix
#

A PDC can literally hold any object if you know how to serialize it properly.

tepid turret
tepid turret
vast ledge
#

You shouldn't have to write a function

tepid turret
lilac vector
tepid turret
#

its gonna call on player specific events

#

so

#

in particular its when they're in a boat

lilac vector
#

oh

tepid turret
#

and also i'd only have to loop through the players actively on the server anyways

lilac vector
#

then jsut use pdc yeah

tepid turret
#

cant remove effects from players that arent online

tepid turret
# lost matrix A PDC can literally hold any object if you know how to serialize it properly.

Also be proud i've been trying to clean up my code

    public String giveItemUpgrade(Entity boat, ConfigurationSection section) {
        if (section.getString("upgrade.item") == null) return null;
        int amount = section.getString("upgrade.amount") == null ? 1 : Integer.parseInt(section.getString("upgrade.amount"));
        if (boat.getPassengers().isEmpty()) return null;
        if (!(boat.getPassengers().get(0) instanceof Player)) return null;
        Player player = (Player) boat.getPassengers().get(0);
        if (advancedMaterialHandler(section.getString("upgrade.item"), amount) == null) return null;
        ItemStack item = advancedMaterialHandler(section.getString("upgrade.item"), amount);
        ItemMeta itemMeta = item.getItemMeta();
        itemMeta.getPersistentDataContainer().set(keys.getTemporaryItem(), PersistentDataType.BOOLEAN, true);
        if (player.getInventory().firstEmpty() == -1) return messages.getString("player_inventory_full");
        player.getInventory().setItem(player.getInventory().firstEmpty(), item);
        return messages.getString("player_added_item");
    }
lilac vector
#

then i misunderstood the quesiton

lilac vector
tepid turret
#

(dense as in the code population)

lilac vector
lost matrix
vast ledge
#

Btw when ur posting Java please use

```java
lilac vector
#

aw man gifs are not allowed?

#

thats a bummer

tepid turret
#

there are some questional gifs on discord

lilac vector
lost matrix
chrome beacon
tepid turret
lilac vector
chrome beacon
#

Unverified users can't send images or have gif previews

lilac vector
tepid turret
lilac vector
tepid turret
#

I honestly find no difference between the code i sent and spaced out bracketed code. other then difference in usage

tepid turret
#

Heres a more normal bit of code

#
    private ItemStack advancedMaterialHandler(String material, int amount) {
        String namespace = material.split(":", 1)[0];
        String id = material.split(":", 1)[1];
        switch (namespace.toLowerCase()) {
            case "minecraft" -> {
                if (Material.matchMaterial(id) == null) return null;
                return new ItemStack(Material.matchMaterial(id), amount);
            }
            case "itemsadder" -> {
                if (CustomStack.isInRegistry(id)) return CustomStack.getInstance(id).getItemStack();
            }
            case "weaponmechanics" -> {
                plugin.getLogger().warning("Weapon mechanics is not supported right now!");
                return null;
            }
        }
        return null;
    }
lilac vector
#
    private ItemStack advancedMaterialHandler(String material, int amount) {
        String namespace = material.split(":", 1)[0];
        String id = material.split(":", 1)[1];

        switch (namespace.toLowerCase()) {
            case "minecraft" -> {
                if (Material.matchMaterial(id) == null) return null;
                return new ItemStack(Material.matchMaterial(id), amount);
            }

            case "itemsadder" -> {
                if (CustomStack.isInRegistry(id)) return CustomStack.getInstance(id).getItemStack();
            }

            case "weaponmechanics" -> {
                plugin.getLogger().warning("Weapon mechanics is not supported right now!");
                return null;
            }
        }

        return null;
    }```
lilac vector
#

eh I guess its something you gotta learn yourself

lost matrix
# tepid turret Honestly don't see why. blank lines dont do much for me. Same with brackets

It adds cleanliness and even improves your maintainability.
Imagine if you later need to add debug statements or additional functionality.
Then

if (section.getString("upgrade.item") == null) return null;

Becomes

if (section.getString("upgrade.item") == null) {
  Some code
  return null;
}

Which is cumbersome and works against maintainability.
Every scope deserves an explicit separation.
Having dangling scopes is just not something i would ever indulge in.

lilac vector
#

oh ew why is that even valid syntax 😭

tepid turret
lost matrix
tepid turret
#

but whenever i post code here i will just edit it for the standard preferences

lilac vector
tepid turret
lost matrix
lilac vector
#

7smile7, is Tuple used often in java or should I be creating a new class for a type?

echo basalt
#

Pair and similar classes shouldn't be a thing

lost matrix
#

^

tepid turret
echo basalt
#

Create discrete classes that contain the exact logic you need

#

Even if it's just 2 fields

lilac vector
echo basalt
#

They also don't provide discrete names for things (getLeft / getRight don't tell you much)

lost matrix
# tepid turret wait explain?

Either register a decoder for NamespacedKey which can directly be used as

    FileConfiguration configuration;
    NamespacedKey key = configuration.getObject("entry", NamespacedKey.class);

Or indirectly serialize to a NamespacedKey

    FileConfiguration configuration;
    String entry = configuration.getString("entry");
    NamespacedKey key = NamespacedKey.fromString(entry);
tepid turret
lost matrix
#
  1. Its fail-fast. If the config is erroneous, then you find out early.
  2. You need to maintain less code and can rely on the API more
    Then
    private ItemStack advancedMaterialHandler(String material, int amount) {
        String namespace = material.split(":", 1)[0];
        String id = material.split(":", 1)[1];

Becomes something more robust with actual named methods you can call:

    private ItemStack advancedMaterialHandler(NamespacedKey materialKey, int amount) {
        String namespace = materialKey.getNamespace();
        String key = materialKey.getKey();

You should always prefer concrete Object implementations over having your data in ambiguous states like a raw Map, List or String.

echo basalt
#

You also get to depend on more mature checks (like regex patterns on namespaced keys) instead of creating duplicate code that emulates the same behavior

lilac vector
#

oh a bit of an unrelated question but what is it with plugins not supporting /reload

echo basalt
#

It's mostly about uh

#

Player states and stuff

#

Let's say you load player data when a player enters and save it when a player quits

lilac vector
#

Yeah

echo basalt
#

PlayerJoinEvent isn't triggered when you /reload so you're going to have online players with no data after the reload

lilac vector
#

sure it's not a nop but it's not too hard to just slap a for (Player player : Bukkit.getOnlinePlayers())

echo basalt
#

Basically all your entities and whatever else are there but you lose the context of everything

#

So you need to write code to re-obtain it

#

And it isn't always clear on how you should do it

#

For example what happens when you /reload a minigame plugin

#

Does the game keep running? How does it know its a reload and not the server stopping?

#

Or does it kick everyone out and nuke the worlds

lilac vector
shadow night
lost matrix
shadow night
#

Or was it another server? Idk

echo basalt
#

And why should we worry about this in the first place when you can just restart the server like usual

lilac vector
lost matrix
lilac vector
#

ic

lost matrix
#

Thats what "not supported" means ^^

lilac vector
#

in that case another question, what's the point of having the command if you're not meant to use it

rapid vigil
#

eh for debug purposes

lost matrix
#

Mainly for debug purposes. Its really just an artifact from the past.

lilac vector
lost matrix
#

Yeap

lilac vector
#

Okay, I see thanks

dawn flower
#

can u bypass the minecraft level cap

#

(integer limit for xp)

ivory sleet
chrome beacon
quaint mantle
dawn flower
#

i just did tho

chrome beacon
#

You can track the xp yourself

dawn flower
lost matrix
# dawn flower can u bypass the minecraft level cap

Kind of? You can simply keep track of the exp yourself and simply map from your tracked data (long double etc) to the integer range.
The player never sees his own exp. Just the progess bar and level. So you can let him farm more exp, but the actual level cap is unchanged.

dawn flower
#

why make a custom xp system when minecraft has a perfecto xp system

lilac vector
dawn flower
#

which was too little, like 21.8k levels or smth

lilac vector
#

ah

lost matrix
dawn flower
#

i don't really need the xp, i use percentages to show how much xp is left

vestal moat
#

This error only happens on 1.20.5...

#

Jackson is downloaded as a transitive dependency but the annotations module is not

lost matrix
#

You mean by the spigot dependency loader?

strange falcon
#
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/superuser/SpigotBuild/apache-maven-3.9.6/bin/mvn, -Dbt.name=4123, clean, install]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
        at org.spigotmc.builder.Builder.runMaven0(Builder.java:936)
        at org.spigotmc.builder.Builder.runMavenServer(Builder.java:905)
        at org.spigotmc.builder.Builder.startBuilder(Builder.java:683)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60```
#

openjdk 21

vestal moat
#

It's a transitive dependency

chrome beacon
#

Make sure you're up to date

vestal moat
#

This is either a bug or a temporary issue with my network or whatever, if it is a bug, it should be fixed

chrome beacon
#

and if you are report it on jira

vestal moat
#

How do i know if i am outdated

chrome beacon
#

/version

strange falcon
# strange falcon ```Error compiling Spigot. Please check the wiki for FAQs. If this does not reso...
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [sh, /home/superuser/SpigotBuild/apache-maven-3.9.6/bin/mvn, -Dbt.name=4123, clean, install]
        at org.spigotmc.builder.Builder.runProcess0(Builder.java:1042)
        at org.spigotmc.builder.Builder.runProcess(Builder.java:967)
        at org.spigotmc.builder.Builder.runMaven0(Builder.java:936)
        at org.spigotmc.builder.Builder.runMavenServer(Builder.java:905)
        at org.spigotmc.builder.Builder.startBuilder(Builder.java:683)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
superuser@bulerman:~/SpigotBuild$ java --version```
vestal moat
#

I am 16 versions behind

#

How do i check the commits quickly?

chrome beacon
strange falcon
chrome beacon
#

Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.

lost matrix
strange falcon
#

  Selection    Path                                         Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-21-openjdk-amd64/bin/java   2111      auto mode
  1            /usr/lib/jvm/java-17-openjdk-amd64/bin/java   1711      manual mode
  2            /usr/lib/jvm/java-18-openjdk-amd64/bin/java   1811      manual mode
  3            /usr/lib/jvm/java-21-openjdk-amd64/bin/java   2111      manual mode

Press <enter> to keep the current choice[*], or type selection number:```
lost matrix
strange falcon
#

java -jar BuildTools.jar --rev 1.20.5

lost matrix
#

How old is this BuildTools jar?

strange falcon
#

downloaded today

#

@lost matrix

lost matrix
#

Yeah, let me check myself

vestal moat
#

Same issue happens on latest spigot

chrome beacon
#

?jira

undone axleBOT
chrome beacon
#

Time for a bug report

#

(if there isn't one already)

strange falcon
lost matrix
strange falcon
#

then ill build 1.20.4

vestal moat
vestal moat
kind hatch
#

??

strange falcon
#

same error

#

1.20.4 then

kind hatch
#

What about with the GUI?

strange falcon
vestal moat
strange falcon
#

u dont have gui

vestal moat
kind hatch
vestal moat
#

double clicking the jar didn't work

kind hatch
#

System?

vestal moat
#

gui command works

vestal moat
strange falcon
kind hatch
#

Hmmm, could be the issue we were running into with alternative distros.

vestal moat
#

Which gui library does buildtools use?

strange falcon
#

im on Ubuntu 22.04

kind hatch
#

The --gui flag was added to partially remedy that issue.

#

The GUI uses FlatLaf

#

Swing

vestal moat
#

opening links don't work

kind hatch
#

Well, we were shooting for windows like launching since some distros support it, but ultimately that functionality is really just .desktop files in disguise. :p

vestal moat
#

only works if file is executable

kind hatch
strange falcon
#

Success! Everything completed successfully. Copying final .jar files now.
Copying spigot-1.20.4-R0.1-SNAPSHOT-bootstrap.jar to /home/superuser/buildtools/spigot-1.20.4.jar
  - Saved as ./spigot-1.20.4.jar
superuser@bulerman:~/buildtools$```
vestal moat
#

All you have to do to open the link is using xdg-open command on linux

kind hatch
#

Ah, that's where we get into cross platform support issues. :3

#

Does that mean that you are running it in a headless env?

#

Or the kubuntu desktop?

vestal moat
kind hatch
mellow snow
#

hello, where can I take the token of someone head? Something like this

vestal moat
kind hatch
#

Is xdg-open available on all distros?

chrome beacon
blazing ocean
#

how do I dye a leather hourse armour item stack?

mellow snow
kind hatch
#

Also, does xdg still work with wayland?

chrome beacon
#

There are websites that allow you to look that up

mellow snow
vestal moat
kind hatch
#

I haven't tried wayland yet so just curious.

chrome beacon
#

or if you prefer just encode your own url link

vestal moat
#

You don't need to be on X11 for the command to work, it just needs to exist

mellow snow
chrome beacon
#

?

vestal moat
mellow snow
chrome beacon
#

namemc?

blazing ocean
kind hatch
#

I would like to test it myself, but I don't have a lot of free resources or another computer to test out wayland atm.

vestal moat
mellow snow
vestal moat
#

It makes sense to run xdg-open instead of not working at all

chrome beacon
river oracle
chrome beacon
#

It contains the texture

mellow snow
#

OK

#

Thanks

kind hatch
river oracle
#

Gets worse as you have to consider linux anything

#

Especially with display

kind hatch
#

You know what you should do?

#

You should help me rewrite the loading logic and web requests.

distant forge
#

Hello, trying to update my 1.20.4 plugin to 1.20.5 and having some issues. For some reason it cant find the Material class

Cannot resolve symbol 'Material'
lost matrix
#

What

#

Show the code in question

chrome beacon
distant forge
chrome beacon
#

?paste

undone axleBOT
chrome beacon
#

^^

lost matrix
distant forge
#

I think I messed somethin up with the java versions maybe?
Im on MacOs. Before running the buildtools for 1.20.5 I installed Java 21

openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Corretto-21.0.3.9.1 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Corretto-21.0.3.9.1 (build 21.0.3+9-LTS

#

```java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/bootstrap/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 62.0````

chrome beacon
#

Looks like you're trying to use Java 18

distant forge
#

To run the server or for the compiled plugin?

tender shard
chrome beacon
#

Class version 62 is Java 18

distant forge
# tender shard what's the output of `/usr/libexec/java_home -V` ?
 21.0.3 (arm64) "Amazon.com Inc." - "Amazon Corretto 21" /Users/georg/Library/Java/JavaVirtualMachines/corretto-21.0.3/Contents/Home
    21.0.3 (arm64) "Azul Systems, Inc." - "Zulu 21.34.19" /Users/georg/Library/Java/JavaVirtualMachines/azul-21.0.3/Contents/Home
    21.0.3 (arm64) "Azul Systems, Inc." - "Zulu 21.34.19" /Library/Java/JavaVirtualMachines/zulu-21.jdk/Contents/Home
    18 (arm64) "Azul Systems, Inc." - "Zulu 18.28.13" /Library/Java/JavaVirtualMachines/zulu-18.jdk/Contents/Home
    17.0.3 (arm64) "Azul Systems, Inc." - "Zulu 17.34.19" /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
    17.0.1 (x86_64) "Oracle Corporation" - "Java SE 17.0.1" /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
    11.0.14.1 (arm64) "Azul Systems, Inc." - "Zulu 11.54.25" /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
    1.8.311.11 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_345 (arm64) "Azul Systems, Inc." - "Zulu 8.64.0.19" /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
kind hatch
#

Amazon 😮

distant forge
#

All this java stuff is way over my head lol

distant forge
tender shard
#

looks good. which command are you using to start the server?

distant forge
#

It worked before

tender shard
distant forge
#

I get the server running now, but still have the problem that intelliJ says it cant import Material. Funnily enough it still seems to build succesfully

#

Can I start a stream somewhere here to show you?

kind hatch
#

Idk if you can stream in the vc if you're not verified

distant forge
#

i cant 😭

#

dm?

kind hatch
#

Try reloading the pom.

distant forge
blazing ocean
#

Exception java.lang.IllegalStateException: We don't have CustomModelData! Check hasCustomModelData first! [in thread "Server thread"]
what in the name of fuck does this mean

        itemStack = ItemStack(material)
        itemStack.apply {
            itemMeta = itemMeta.apply {
                val leatherArmorMeta = this as LeatherArmorMeta
                leatherArmorMeta.setColor(vanillaColour)
                setCustomModelData(customModelData)
                lore(this@ColourableCosmetic.lore)
                displayName(this@ColourableCosmetic.displayName)
            }
        }

(material is a leather hourse armour)

#

can I not set one

#

ohh

#

nvm it was getting customModelData from the item meta insted of cosmetic

slender elbow
#

kotlin at it again

lilac vector
#

How do I set a custom stack size?

lilac vector
#

oh damn thanks

distant forge
distant forge
eternal oxide
#

Try harder

distant forge
#

What is a good jdk?

blazing ocean
kind hatch
#

openjdk is pretty good

#

Azul is also good

blazing ocean
distant forge
#

Would I need to delete something before I rerun the buildtools with another java version?

dry arch
#

graalvm

worthy yarrow
young knoll
#

You can't not use reflection

worthy yarrow
#

boo

young knoll
#

The registries all get frozen before your plugin is loaded

worthy yarrow
#

Oh fr that's I mean it makes sense but bleh

lilac vector
#

guys how does one keep up with the NMS api changing 😭
i just updated to 1.20.5 and my block send packet function is broken already

kind hatch
lilac vector
#

or well more specifically how do I figure out which function to call

kind hatch
#

?mappings

undone axleBOT
lilac vector
kind hatch
#

Use that for nms mappings comparisons ^

shadow night
worthy yarrow
worthy yarrow
dawn flower
#

hi

#

is it possible to make rainbow color (that changes) in text in the lore

lilac vector
#

sure just update the item constantlty

dawn flower
#

that makes it annoying to hold

#

and not smooth

lilac vector
#

hm no other way i know im afraid

kind hatch
#

Even with packets?

lilac vector
#

I mean you'd still have to "update" the item so I doubt

blissful belfry
#

Hello, I discovered a bug with the hopper in 1.20.5, it crashed the server.

lilac vector
#

Oh shit. 1.20.5 fixed the mining fatigue thing I used for custom mining speeds

#

Fuck

dire marsh
#

1.20.5 now has an attribute for custom mining speed

lilac vector
#

Oh

#

What

icy beacon
#

1.20.5 added a ton of cool shit

#

All hail 1.20.5

dire marsh
#

player.block_break_speed

lilac vector
#

you gotta be fuckin' with me I was so worried for a sec

grim hound
#

what does ?stash work?

icy beacon
lilac vector
grim hound
#

like how do I find the code

#

there

#

like I would on github

icy beacon
#

1 sec

#

?stash

undone axleBOT
lilac vector
kind hatch
#

Go to the project you want to look at.

#

Then you can view the source code as normal.

icy beacon
distant forge
#

Did the enchantment enums change in 1.20.5?

grim hound
icy beacon
#

Is that what you wanted to know?

dire marsh
kind hatch
grim hound
grim hound
kind hatch
#

It's weird, but spigot is the culmination of bukkit and craftbukkit. Not the Spigot project listed on stash.

icy beacon
#

Spigot is what, well, Spigot brings to the table

lilac vector
icy beacon
#

And it's in the form of patches

#

Honestly not sure why, maybe shadow master does

kind hatch
#

Spigot is all of the additional patches to craftbukkit that adds things like the spigot.yml and server performance tweaks.

icy beacon
dire marsh
#

pretty sure the patches is because of the dmca stuff

kind hatch
#

^ That too

#

Things would be so much easier to work with if the dmca didn't happen.

dire marsh
#

Updating patches sucks.

grim hound
#

or whatever they did

#

bukkit creators

#

cuz of copyright?

dire marsh
#

that wasn't mojang

grim hound
#

microsoft

dire marsh
#

?dmca

undone axleBOT
lilac vector
#

so I can set that to 0 and keep doing my own thing

#

awesome!

hybrid quartz
#

Hello! How can I spawn particles only in the same location as other particles were. Cause when I use many particles they spawn like aura around the player. But I need them to spawn only in player's eye location

                player.spawnParticle(Particle.WATER_SPLASH, playerLocation, particleCount, 1, 0, 1.5, 0);
lilac vector
#

Woah it also works with insta break blocks now

#

Nice

#

I love this arelady

dire marsh
#

ig mojang kinda did cause it

hybrid quartz
#

Like aura

dire marsh
#

gotta do maths

#

there's some good threads on the forums with that kind of stuff

#

oh you mean you don't want it as an aura

dire marsh
#

I'm not sure what the args on that spawnParticle is (bukkit particle api is horrible) but make sure you're not applying any offset

hybrid quartz
# grim hound is this the only code you use?
        Location playerLocation = player.getEyeLocation();

        int particleCount = 2;

        if (CoolDownManager.checkCryCooldown(player.getPlayer())) {
            CoolDownManager.setCryCooldowns(player.getPlayer(), Plugin.getInstance().getConfig().getInt("cooldowns.cry"));

            for (Player nearbyPlayer : Bukkit.getOnlinePlayers()) {
                if (!nearbyPlayer.equals(player) && nearbyPlayer.getLocation().distanceSquared(playerLocation) <= 12 * 12) {
                    nearbyPlayer.playSound(playerLocation, Sound.BLOCK_WATER_AMBIENT, 1.0f, 1.0f);
                    nearbyPlayer.sendMessage(Utils.color("&fИгрок " + ChatColor.GREEN + player.getName() + " &fпоплакал."));
                }
                player.spawnParticle(Particle.WATER_SPLASH, playerLocation, particleCount, 1, 0, 1.5, 0);
                nearbyPlayer.spawnParticle(Particle.WATER_SPLASH, playerLocation, particleCount, 1, 0, 1.5, 0);
            }
grim hound
lilac vector
#

now the only thing left to add from mojang is data driven blocks

#

and then the game is perfected and they can leave it be

dire marsh
#

wdym

#

they still need to add microtransactions

lilac vector
#

thats for 1.21.0

#

oh my god

#

I love minecraft

#

what in the modded fuck is this

hybrid quartz
lost matrix
worthy yarrow
#

Do we know what kinda ui elements?

lilac vector
worthy yarrow
#

Have some fun with the itemstack changes!

lost matrix
lilac vector
#

YEAHHH

lilac vector
#

AND NOW MINING IS EVEN COOLER

worthy yarrow
#

Sure is

lilac vector
#

i love mojang so much how could anyone hate such a great indie studio caring for their game

worthy yarrow
#

Wish I could say the same for psyonix D:

lilac vector
#

i mean sure its been 5 minutes and ive already found a bug or two with the new attributes but thats just gotta happen

worthy yarrow
#

@lost matrix Where do you report these kinda things ^

lilac vector
#

ive never been so hyped for a game in my life omfg

#

let alone to make shit for a game

worthy yarrow
#

Shoulda been on minecraft a long time ago man, it's always offered so many freedoms not only for the player but also the dev

lilac vector
#

but kinda got frustrated and moved onto just game dev

lost matrix
#

Yes, thanks Intellij... (?)

worthy yarrow
lilac vector
#

then I went "ew these game engines suck", so I moved to making my own game engine

#

but now i'm back cos it got hard

lilac vector
#

IDEs are so magical arent they

worthy yarrow
#

Game engine gonna be a hard project for a solo dev D:

lilac vector
#

Yeahhhh

#

I'm still at it

#

but I decided to make a programming language for it and it's been rough

worthy yarrow
#

Why in the fuck

lilac vector
#

cos

#

I wanted the game engine to be revolved around an entity component system

#

so obviously the reasonable choice is to make a programming language dedicated to it

#

:kek:

worthy yarrow
#

I mean

lilac vector
#

it's kinda fun tbf

worthy yarrow
#

Sure that's one way but that's like 50x the work

lilac vector
#

Yeah

#

I mean I knew starting off that it'd be a 4-5 year project

maiden cape
#

How do you change the scale of an entity in 1.20.5 spigot?

lilac vector
#

WITH ATTRIBUTES BABYYYY

worthy yarrow
maiden cape
#

beautiful

#

didn't realise they were attributes

worthy yarrow
#

They are now

lilac vector
#

YEAHHHGH

#

LETS GOOO

#

MORE SPECIFICALLY GENERIC_SCALE

lilac vector
#

Most of that time was spent learning how to make programming languages

#

with some graphics knowledge sprinkled in

#

and the occasional detour into "ooo shiny"

worthy yarrow
#

My only graphics knowledge is making a notepad with some extra modules in jfx

lilac vector
#

graphics is 🤮

#

well

#

I like to make the backend for it

#

I'm not much of a ux guy

worthy yarrow
#

Who the hell enjoys front end? Psh front end devs are cringe

#

#LogicalThinking > #CreativeThinking

lilac vector
#

idk but i've been trying to trick one into joining me for years now

#

I even offered food but I have no idea what these mysterious creatures (frontend devs) are attracted to

#

other than spamming abstractions & new frameworks

#

wait no thats webdevs

worthy yarrow
#

In my experience, they're mostly attracted to prebuilt systems that they just get to play with

grim hound
#

how do I look for usages in the spigot stash?

#

how can I find the instantiations of this class?

lilac vector
#

OH MY GOD SINCE WHEN IS THERE A MENU FOR ALL THE ITEMS YOU COULD ONLY GET VIA /GIVE

lilac vector
grim hound
#

intellij

#

seems to not find any library usages

lost matrix
worthy yarrow
#

I swear it was called DrugsMC

#

Also I love how your dealer frantically tried to get out of the shot

hushed scaffold
#

does get consumable in entity shoot bow event work if the bow used has mending? or will that return null

lost matrix
#

Why would mending change the fired projectile?

lost matrix
lilac vector
#

OH MY GOD YOU COULD MAKE SO MANY GOOD MINIGAMES

eternal oxide
#

Stop with the caps

lost matrix
#

Hes excited for the update ^^

lilac vector
#

thats an understatement

eternal oxide
#

He seems to get excited a LOT

lilac vector
#

YEAH

lilac vector
#

i have not been this excited for anything minecraft in so long its nuts

eternal oxide
#

perhaps some ritilin?

worthy yarrow
# lost matrix

That's like the magic cake from alice in wonder land kek

lost matrix
#

Having custom durability on any itemstack now is kinda cool

worthy yarrow
#

Sure makes custom items a lot more custom

eternal night
#

Having 200 compile errors in muh patches now is kinda cool

lilac vector
lost matrix
# lilac vector excUsE ME WHAT

EG: Create a block with 1000 durability and max stack size of 1. Every time you place it, one durability is lost instead of the block item vanishing ^^

worthy yarrow
#

Whaaaa

lilac vector
#

just today i was debating whether or not I should add a durability system cos it'd be so fucking annoying for not much usability (only works on tools)

#

aaAAAa

lost matrix
#

Would be nice for citybuild servers. No more inventories filled with items. Just load all your cobblestone into a single item and reload it at your chests.

worthy yarrow
#

Yeah new durability system for every single item, max stack size is now 1 for every item but they all have a durability of 16 / 64 :p

shadow night
shadow night
#

Time to write some code?

chrome beacon
#

I mean you sort of could before too

lost matrix
#

idk what a "dank null" is...

lilac vector
chrome beacon
shadow night
worthy yarrow
lilac vector
#

Yall whats the api for setting the max stack sie

lilac vector
#

ahh

#

it's in itemmeta not itemstack

worthy yarrow
#

Cuz it's all attributes iirc

lilac vector
#

another question, why is ItemStack#getItemMeta nullable?

#

in what scenario would it be null

#

Oh

#

AIR ig?

eternal oxide
#

Air has no meta

glad prawn
#

SKULL

eternal oxide
#

skull? has meta

worthy yarrow
#

💀 to packets:(

valid burrow
lost matrix
echo saddle
#

how would I get and set the experience value of an experience bottle

lost matrix
#

I dont see a property for this at least

echo saddle
#

its not, it's the Exp value in the item nbt tag.

#

so, how would I get the value and set the value

lost matrix
echo saddle
#

In my plugin, its getting the tag from the itemstack

quaint mantle
#
new BukkitRunnable(){
                @Override
                public void run() {
                    combat = true;
                }
            }.runTaskTimer(main, 0, 20L);

            Bukkit.getScheduler().runTaskLater(main, () -> {
                combat = false;
            }, 20L); // servirá asi? intenta
#

this is right?