#help-development

1 messages ยท Page 832 of 1

eternal oxide
#

use the spawn method which takes a Consumer

hushed spindle
#

you dont need to use nms to break blocks in an area yeah but for the breaking animation you do

eternal oxide
#

in the consumer you sety invisible and it's never seen

eternal oxide
dry forum
#

ok thanks

hushed spindle
#

yeah so you either use nms or like protocollib

eternal oxide
#

fake block damage is API

hushed spindle
#

oh is there

#

ah i see

#

seems some support was added in 1.19 and a bit more specific implementations in 1.20

#

if you want your plugin to be compatible with older versions than that you'll still need to do stuff with packets though i reckon

smoky oak
#

well im certainly not gonna end up in a

#

?1.8.8

#

situation

eternal oxide
#

lol

smoky oak
#

welp i tried spamming it but forgot it is 1.8

#

not 1.8.8

cyan void
#

anyone know how i can make a custom mob system were mobs spawn in a rigon with custom names and all that

hushed spindle
#

i mean anytime you spawn an entity you get it returned and so you can edit it with equipment or custom names or whatever

#

so thats not an issue

#

spawning them within a region means you gotta hook into worldguard and go through a region to get its valid spawning spaces

#

spawning mechanics themselves you gotta figure out in what way you wanna do that

#

or the easy method would be to listen to mob spawn events and edit those mobs if they spawned within that region, if you dont mind using vanilla spawn mechanics

#

depends on what you want to do

#

@cyan void

slow light
#

guys

#

Non-static method 'getInventory()' cannot be referenced from a static context

#

So

#

im trying to make

#

a command

#

that gives players

#

a item like /give

#

when the command is run

#

but the problem is

#

that

#

getInventory() isnt static

#

i mean

#

im kinda confused

chrome beacon
#

You need an instance

#

of whatever you're getting the inventory from

slow light
chrome beacon
#

An instance of the object you're getting the inventory from

#

Could be a chest, furnace anything really

slow light
#

so i have to instance

#

getInventory?

chrome beacon
#

??

slow light
#

im trying to use getInventory

#

to add a item

#

to a players inventory

#

so i have to instance

#

getInventory

#

right

chrome beacon
#

no

#

If you want the players inventory

#

you need the players instance

#

to get the inventory from

slow light
#

k

chrome beacon
#

How else would it know what player you're referencing?

chrome beacon
#

?learnjava

undone axleBOT
chrome beacon
#

Might be a good idea

slow light
#

i am

#

learning java

#

i started 2 weeks ago

#

have some chill

chrome beacon
#

You're supposed to do that before starting with Spigot

cyan void
cyan void
ivory sleet
#

yeah thats valid

hushed spindle
#

also

#

please

#

stop talking

#

like this

quaint mantle
#

does anyone know how i can make my plugin work with old versions?

chrome beacon
#

Write code for the oldest version you want to support

#

If you want 1.8-1.20 write the plugin code for 1.8

quaint mantle
#

so if i write it for 1.8?
it'll work till 1.20?

chrome beacon
#

and then if you want to specifically support newer features you'll need a version check and only run code supported

quaint mantle
#

is there a wiki for this or like a page that can help with examples?

chrome beacon
#

Example for what part?

quaint mantle
#

like these two only
Location location = player.getLocation();
player.playSound(location, sound.ENTITY_ENDER_DRAGON_DEATH, 1f, 1f);
Player player = e.getPlayer();
player.sendMessage("Welcome to RomanMc!");

warm light
#

what is the slot number of head?

#

in player inv

eternal oxide
#

just use teh helper methods

#

and set of course

atomic niche
eternal oxide
#

for?

warm light
#

I want to check if player clicked on helmet slot

eternal oxide
#

note they are raw slots

warm light
#

thanks ;)

torn shuttle
eternal oxide
#

Sorry magma, you have to be put down now.

eternal oxide
#

Rebel ๐Ÿ™‚

torn shuttle
#

this is what a programmer looks like

#

I've got a concealed manual memory management license and I'm not afraid to use it ๐Ÿ”ซ

eternal oxide
#

In truth

torn shuttle
eternal oxide
#

Fight me

torn shuttle
#

get in line, you can be the one I throw into the cliff right after imillusion

torn shuttle
#

I actually wonder when the last time I posted a pic of myself here was

#

it's been a long-ass time

remote swallow
#

Ha small beard

eternal oxide
#

I've a bigger beard, but mines grey and unkempt.

river oracle
torn shuttle
#

I was going for a big santa beard this xmas

#

oh well

next stratus
#

I was updating one of my friends old projects what uses nms and I forgot.... nms is all obfuscated ;-;

shadow night
#

Lol

#

Old times

next stratus
#

I'm not too bothered about doing it though, he's helped me a lot by making this project so it's the least I could offer

hushed spindle
#

is there any item persistence method that saves all details of an item but not including some version

#

i would like spigot to not care if an item made in higher versions is deserialized on older versions

shadow night
next stratus
#

1.7.3 ?

shadow night
#

Whats wrong

next stratus
#

No no, I'm just asking if you meant 1.7.3 or if I was reading wrong

shadow night
#

The beta 1.7.3, yes

next stratus
#

Ah wow, long time since I heard those numbers!

shadow night
#

Very nice version, very not nice bukkit and even worse mcp

raw epoch
#

1.7.3 is july 8, 2011.

next stratus
#

Is it sad I can remember the exact patch version I started mc on?

raw epoch
#

:kappa:

next stratus
#

1.6.4 ๐Ÿฅฒ

shadow night
#

Time flies fast

next stratus
#

yeah man

#

Actually idk if it was 1.6.4 now

shadow night
#

Well, oof

next stratus
#

lemme just check the version history

#

I remember the date exactly so would be easy

#

1.7.4 oof

#

I was on xbox for a lot longer though

shadow night
next stratus
#

I was defo before 1.12

#

I am starting to look at retiring my mc account soon, gonna suck to do it but gotta grow up :/

shadow night
#

Whaa

rotund ravine
eternal oxide
#

lol I'm way into my 50's and I've never grown up

rotund ravine
#

anyone know any good and populated modded minecraft servers?

next stratus
#

Is there a list of v1_19_R1 numbers anywhere so I don't go wasting my time making code what won't be used?

eternal oxide
#

numbers?

#

as in servers running it?

next stratus
#

Sorry no I worded that wrong I mean for the different minecraft versions

next stratus
#

Thank you very much

atomic niche
#

Does anyone else have an irrational hatred of nms?
Sure, it's powerful, but it's a pain to maintain, makes more work for oneself, and means that every time someone else wants to do the same sort of thing, they basically need to duplicate your implementation or reimplement it themselves.
Every time that nms is needed, it's easier in the long term just to pr it into or downstream of spigot.

eternal oxide
#

NMS should be a last resort.

atomic niche
#

Making a pr every time we need nms is a pain, but it's saved us a lot of long term maintenance work

pseudo hazel
#

im glad to have never needed nms

minor junco
#

just make it easy for yourself so you barely have to use nms lmao, makes things future proof

atomic niche
#

We are currently nns free. But it's taken a lot of paper and spigot PRS to get to that point

minor junco
#

or through a bridge like protocollib

eternal oxide
#

Thats what PR's are for. Add functionallity to the API

atomic niche
#

The only thing worse than nms is nmc, but I just hate reflection in general.

eternal oxide
#

nmc?

atomic niche
#

net.minecraft.client as opposed to net.minecraft.server

eternal oxide
#

ah

atomic niche
#

They are both a nuisance, but nmc is slightly worse

#

The one negative of this approach is that our releases for past versions are comparatively limited since it's only logical to pr to the recent version.

#

But a degraded legacy experience is still better than needing to maintain a load of reflection throughout every version of MC.

#

Also, there's really no need for legacy esrs to be fully featured

#

If the people on our ancient esrs want modern features, they should just update to 1.20.x

knotty aspen
eternal oxide
#

oh god no

knotty aspen
#

Maybe I just have an irrational hatred of enums

knotty aspen
hushed spindle
#

building the 1.20.3 jar saves it as 1.20.4

#

is that a bug lol

dry hazel
#

using 1.20.3 is pretty pointless

hushed spindle
#

alright

#

however

#

i didnt ask

#

need it just as dependency just to have that version covered

#

not using it

dry hazel
#

I'm pretty sure it's done intentionally

river oracle
#

its done intentionally

#

1.20.3 = 1.20.4 there was one line of code changed

#

and it was a item deletion bug

#

any servers on 1.20.3 should be 100% compatable with 1.20.4

#

vise versa unlses a plugin's NMS interacts with the 1 line of code changed there should be no discrepencies @hushed spindle

hushed spindle
#

ah i see

#

it refused to work with 1.20.3 anyway so that makes sense

river oracle
#

BuildTools 1.20.3 builds 1.20.4

hushed spindle
#

as spigot-version i mean

atomic niche
# knotty aspen Opposite, I barely use the API anymore. Its way too dated in a lot of areas

But therein lies the problem;

The dated sections encourage more people to use NMS instead of making prs for publicly beneficial changes. This leads to those sections becoming even more dated, resulting in more people using NMS.

Even though making changes into public prs is more work, in the long term, it's better for everyone. Without that, everyone is just working on reimplementing things others have already privately done.

hushed spindle
#

is there any way i can tell bukkit to not care if serialized items have a higher version than the server they're deserialized on

river oracle
#

no

hushed spindle
#

darn

#

do you then happen to know of an itemstack (de)serialization method that covers all metadata and custom nbt

#

so that it doesnt include a version at all

rotund ravine
#

Realistically that would break a lot

#

It's backwards compatible, but not forwards compatible

rotund ravine
eternal night
#

not yet โ„ข๏ธ

rotund ravine
eternal night
#

Yea we just warned a bit ago

#

as that might happen โ„ข๏ธ

river oracle
#

I use that for my NMS and manually map into the release versions

eternal night
#

nah

#

that is fine

#

the thing that basically breaks is parsing the thing from like Bukkit.getServer().getClass()

river oracle
#

oh why would you do it like that? seems kinda weird

eternal night
#
String craftBukkitPackage = Bukkit.getServer().getClass().getPackage().getName();
// This is the *bad* part, including any other parsing of the version
String version = craftBukkitPackage.substring(craftBukkitPackage.lastIndexOf('.') + 1);
if (version.equals("v1_20_R1")) {
    // ...
} else {
  // Unsupported
}
#

like, that would explode

#

but like, idk why you'd do that

river oracle
#

weirds

eternal night
#

yea, weird nms people

river oracle
#

i have a python script to auto update my NMS :P

#

maximum lazy

eternal night
river oracle
#

still need to script mappings changes though

#

this is how the real ones do it

molten hearth
#

is it possible to use components or smth with inventory names? because i'd like to change the font of an inventory name

rotund ravine
#

:paper:

molten hearth
#

oh I have to use paper for that?

#

๐Ÿ’€

rotund ravine
#

Oh ilost my nitro

#

Welll

molten hearth
rotund ravine
#

@worldly ingot was working on adding components to stuff

molten hearth
#

I mean if there's another way of setting the font that is also fine

orchid gazelle
#

via reflection?

chrome beacon
#

nms is always an option

rotund ravine
molten hearth
rotund ravine
#

Gotta love being able to randomly ping people

#

ahh i see

molten hearth
#

oh wait

rotund ravine
#

thank you xpdz

molten hearth
#

yea

#

np

rotund ravine
#

but still setting the title after ๐Ÿ‘€

molten hearth
#

i thought u were replying to me ngl

#

oop

upper hazel
#

since when is gpt chat available without a phone number.....

rotund ravine
#

Guess it's not supported for some reason

rotund ravine
shadow night
# molten hearth \

I wish that existed in b1.7.3, would've saved me a lot of time working with obfuscated nms

upper hazel
#

or this fake site

#

someone check plis

river oracle
#

you use the Versions to get which module you should load with reflection

river oracle
#

my project is open source if you wanna look

carmine mica
#

setTitle is just broke as is

orchid gazelle
eternal night
#

yea pretty sure we just didn'T end up creating an adventure version

orchid gazelle
#

please, spigot team, DO NOT RELOCATE

river oracle
#

feel like maybe you could create a jira feature request for this

#

or you could just talk to MD_5 about it

rotund ravine
#

machine lurking.

#

But i see.

#

Thank you.

carmine mica
#

gonna do some more testing with it rn, and if it goes poorly im just gonna advocate deprecating for removal on paper if its untenable to fix

rotund ravine
jagged quail
#

hel

naive loom
#

would anyone know of why on certain items you can't click them out of an anvil inventory? there isn't anything cancelling it

jagged quail
#

hello

alpine urchin
#

hello

rotund ravine
#

We would need much more information to atleast try to guess.

#

Like what are you trying to click out

#

which spot is it in

naive loom
#

the result item?

rotund ravine
#

Congrats, the result item is what when you are trying to click it out?

naive loom
#

?

rotund ravine
#

I give up

river oracle
#

are you working with an anvil in the physical world

#

if not expect trouble

#

you will recieve no help regarding such issues as well. This is already a well known issue and it has a PR to address it if you want virtual Anvil Inventories you'll have to use NMS

naive loom
#

Physical anvils,

half arrow
#

Can anyone suggest the best way to get mob heads for 1.20?

naive loom
#

i'm manually setting the result item because im making a certain item enchantable

river oracle
#

there are no restrictions on Physical Anvils or issues

rotund ravine
#

WHAT ARE YOU SETTING IT TO

naive loom
#

shush

rotund ravine
#

Bro

river oracle
#

tbf you are nearly un intelligable

rotund ravine
#

Let me give you a guide on how to ask a question.

rotund ravine
#

What happened.
What did i do?
Code.

river oracle
naive loom
rotund ravine
#

Requote in #general

river oracle
#

its pretty great

rotund ravine
#

Oh i got that guy blocked

river oracle
#

if you wanna use code you can always add items ot the player's Inventory

half arrow
#

Helpful

#

as always

river oracle
#

if you aren't going to be more specific don't expect a better answer

naive loom
#

It's just the item in the result slot is not able to be moved, the item is being set manually when paper and a enchant book and then it puts the enchantments on the piece of paper and sets it to a cloned item stack in the result slot.

#

My issue or?

lost matrix
jagged quail
#

ok hopefully this works

naive loom
#

A issue where the result item can't be pulled out of a physical anvil.

rotund ravine
#

I mean.

#

Is your plugin the only one on the server?

jagged quail
#

if it works it works

rotund ravine
#

What does your plugin do?

naive loom
#

which is why it doesn't make sense

jagged quail
naive loom
#

i know my plugin isn't cancelling it

rotund ravine
#

steamworks

#

I still want to know

#

what ur plugin does.

#

?paste

undone axleBOT
naive loom
#

it's a hat plugin

#

you can equip hats with custom model data

rotund ravine
#

Thank you, i don't much care for the description, but the code since that's where the trouble seems to be.

#

Who's LG

jagged quail
#
*** Please download a new build as per instructions from https://papermc.io/downloads/paper ***```
rotund ravine
#

Ohh, Large Balls

#

nice

shadow night
rotund ravine
shadow night
#

So they make tech stuff in general?

rotund ravine
proud badge
#

is having a lot of static methods bad? People seem to hate them

river oracle
#

Static is great

jagged quail
#

its only 21 versions out of date

shadow night
river oracle
#

It's not great when used in properly

proud badge
#

Ok cause I have like 20 static methods in my whole plugin

rotund ravine
#

?static

#

alexxx

#

where is it

quaint mantle
river oracle
lost matrix
shadow night
#

Yeha that's fine

rotund ravine
# proud badge is having a lot of static methods bad? People seem to hate them

Many people are going crazy whenever they see the static keywoard inside some source code. Thatโ€™s ridiculous, because it alleges the people who developed Java were totally stupid. It is true that the static keyword gets abused by many people, but thereโ€™s a difference between static abuse and proper use of the keywoard. What does...

quaint mantle
rotund ravine
#

@lost matrix I feel like that question warrants a macro

#

I have felt the need to throw that out a lot

shadow night
#

Maybe static can be used to share a value across instances of the same class or something

lost matrix
#

Hmm

shadow night
eternal night
#

never

quaint mantle
#

Singleton

proud badge
#

Most of my static methods are private static

lost matrix
proud badge
#

huh whats that

proud badge
river oracle
#

Ask them

undone axleBOT
lost matrix
proud badge
#

heres an example of one

rotund ravine
#

Modifies itemstack ๐Ÿ‘€ ๐ŸŽ‹

quiet ice
#

Hello everyone! It's me - geolykt - and I have another highly specific query: Is a object that is stored in a local variable but isn't actively being referenced anywhere considered strongly reachable? Aside from asking why the hell geolykt would do this sort of thing, would I need to do

void myMethod(Object o) {
  someReference = new WeakReference<>(o);
  someOperation();
  Reference.reachabilityFence(o);
}

or is that plainly superfluous?

rotund ravine
#

geol

#

What is this

#

Are you really asking or?

quiet ice
#

Yes, because I have no true idea what classifies as "it can be reached by some thread without traversing any reference objects"

lost matrix
quiet ice
lost matrix
#

But you can easily test this by starting a thread and keeping the object hostage in a while loop ๐Ÿ™‚

quiet ice
#

Nah, I just wanted to check whether I could do a quick and dirty check whether someone was actually calling my method with an autocloseable that was properly wrapped in a try-with-resources. But in that case I'll just drop that idea

lost matrix
# proud badge heres an example of one

I would say that this should not be a static method.
If you pass a String to it in addition to the ItemStack, it could be considered a utility method.

sullen marlin
#

A try with resources is just a try finally

#

You can't detect that

proud badge
#

A lot of my static methods are just methods to obtain which items I should put in a GUI menu

quiet ice
# sullen marlin You can't detect that

Yeah, though I assumed if the reference goes poof that there is great evidence that something was highly wrong with the caller. But as smile says it isn't that easy.

late sonnet
tribal cypress
#

Hey, is there anyway to modify the console output for chat logging? I'm currently making a plugin which gives the ability to change a player's name, which utilizes the Player#setDisplayName method, which changes the player's name in the chat, but also in the console.

This makes the server admin (or others with console access) unable to determine who the player is/was at the time. I was hoping to see a way to modify the console output, so that I can put their real name infront of their fake name.

Yes, I know I can do this via printing a message right under the original, but that'd just clutter up console imo

rotund ravine
#

Make you won chatplugin @tribal cypress

tribal cypress
rotund ravine
#

It will depending on how you do it.

tribal cypress
#

Cancel the message and send it using bukkit broadcast?

#

I guess I answered myself, but I'm still open to other suggestions, as I don't want to override the messaging just cuz of a nickname plugin, y'know

rotund ravine
#

Other solutions will result in a lot of crap.

tribal cypress
#

Ah, alright, thank you then for you advice

proud badge
#

Ok so how I understand it - if I have the Bukkit.runTaskAsyncronously whilst another async task is already running it will wait until that async task is done and only then run the new one?

echo basalt
#

It will schedule for next tick

#

iirc

quiet ice
#

yeah, but that next tick could be in a few ยตs

proud badge
#

What if the async task takes longer than a tick (the original one)

#

Or are async tasks usually fast

quiet ice
#

Well it depends on your code and how other tasks look like

echo basalt
#

I feel like the async executor should have multiple threads

quiet ice
#

Generally you wouldn't need that precision though - if you do, you should think about your design a bit

quiet ice
#

Though, hardware limitations still apply

young knoll
#

Eventually

#

I managed to have like 150 craft worker threads running once

proud badge
#

What would be the best way to check if a block is natural or not without having to make an async task on blockbreakevent to the coreprotect database

clear elm
#

Have I use Java oder Java script for plugins ?

orchid gazelle
#

java

clear elm
#

Thx

ivory sleet
young knoll
#

Yes

#

With no upper bound apparently :p

ivory sleet
#

Yeah iirc it just uses a default configured thread pool

opal juniper
#

sounds fun

ivory sleet
young knoll
#

It wasnโ€™t my fault my loop never ended

#

Okay maybe it was

dry forum
#

would running location.distance every tick cause lag?

quiet ice
young knoll
#

Oops didnโ€™t mean to

quiet ice
#

The only semi-serious thing is that it does a squareroot which is why you should prefer distanceSquared when comparing it with a hardcoded value. But even that is not a serious issue

dry forum
#

alright thanks, also im asuming it returns the amount of blocks between 2 locations or?

young knoll
#

Kinda

#

If the points are lined up on an axis then yes

quaint mantle
#

can some help me

quiet ice
#

It just does dist = sqrt(distSq) and distSq = (this.x - x)ยฒ + (this.y - y)ยฒ + (this.z - z)ยฒ

dry forum
#

oh k thanks

young knoll
#

Yay triangles

#

Well, 3D triangles but yeah

quaint mantle
#

They are just awesome

#

And perfect

#

Not on a computer

#

It's impossible, as the computer draws pixels

#

The monitor*

#

You don't see a circle on a monitor, never

#

Just a set of pixels very close to each other making the shape of a circle

echo basalt
#

just cos, sin

#

except you're downscaling a vectorized shape to a bitmap

wet breach
#

Crt's for example can draw circles

torn shuttle
#

god I hate the cold

quaint mantle
torn shuttle
#

it's miserable to work in

quaint mantle
torn shuttle
wet breach
quaint mantle
#

You take out clotes and you still being hot

#

Cold is better

#

You put a little bit more of clotes

#

And done

quaint mantle
#

Where?

torn shuttle
#

I go to the gym even during winter time, I pay to get sweaty

#

and it's still miserably cold

wet breach
torn shuttle
#

high refresh rate is one, other displays have caught up

wet breach
#

Crts have better color representation especially when it comes to gradients. They are more responsive and handle multiple resolutions better and with ease

torn shuttle
#

to be fair you can buy specialized monitors that beat them in pretty much every aspect

#

they're just more expensive than a $90 lcd monitor

wet breach
#

Also because its an electron beam and not little crystals they can display shapes far better and accurately

wet breach
#

Downsides of crt is size and basically difficult to repair

torn shuttle
#

I don't think crts have any single aspect that they still hold over modern display tech unless you are looking for a balance that is struck only specifically by crts

wet breach
#

Now if you wanted to compare like a crt from the 90's with something modern sure we probably have some lcd that could beat it

wet breach
torn shuttle
#

I mean, you can buy 8k monitors, you can buy 360hz monitors, you can buy monitors made specifically for color accuracy...

wet breach
#

Yes

#

Oh thought you asked a question lol

#

Anyways my point is. There is advantages to having a crt. Does that mean you should switch to one? Probably not lmao

quaint mantle
#

I though those still were drawing pixels

#

Of less colors

torn shuttle
#

no, I'm just saying there's not much of a market for them outside of retro / vintage right now, at least I've never heard of any other group purchasing new crts

wet breach
torn shuttle
#

let's be real everything under gvt is not doing it because crts are good, they are often doing it to fix old systems which used crts and they are not about to update them

wet breach
#

Probably wont find much in the pure civilian consumer area except what you listed

wet breach
torn shuttle
#

yeah, that's called if it ain't broke don't fix it

#

you know what uses that logic? legacy systems

wet breach
#

Me being from military side i know plent of areas you could use newer tech but it wouldnt improve anything.

torn shuttle
#

if you're designing something new in 2023 you're not doing it with crts, least of which because they are getting harder to source by the year

wet breach
#

Not everyone else

torn shuttle
#

yeah for everyone else they're just more expensive

wet breach
#

Cheaper

torn shuttle
#

then you're getting scammed

quaint mantle
#

hey guys how do i make an action bar lasts forever?

torn shuttle
quaint mantle
#

so make it return to itself over and over?

wet breach
torn shuttle
quaint mantle
#

okie then thanks ^^

quaint mantle
wet breach
#

Anyways i am not trying to debate the market on them. Point i was making is they still have uses, they are still produced, and places still use them

torn shuttle
wet breach
quaint mantle
quaint mantle
#

But yes

wet breach
#

Because one area doesnt need it as much all it did was increase supply for the others and thus keeps them cheap

#

They just dont need to mass produce them anymore

torn shuttle
#

I randomly opened aliexpress and I can buy 8inch lcd screens for 16 euros as a replacement for a samsung tab a 8.0 which should have a resolution of 1280x800 pixels which is an absolutely shockingly cheap price for display tech, and you're saying that you can source a crt for cheaper than these random sellers

quaint mantle
wet breach
#

Probably wouldnt be accurate to use tablets as a comparison

torn shuttle
#

it's just the display

#

which is just an led screen

wet breach
#

Yes but crts that small are niche and have been since the late 80's

quaint mantle
torn shuttle
quaint mantle
#

Nesting a code is splitting it in lines

Bukkit.getScheduler().runTaskTimer(plugin, () -> 
  e.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText("ยงaRomanยง5MC!")), 
0, 40);
#

So it's a bit more readable

#

ohhh didn't know that nesting meaned that xd

#

Yeah, just avoid nesting it too much

#

cause errors don't worry

#

but thanks

torn shuttle
#

15.6 inches, random laptop monitor, 61 euros including european tax and it's 1080p

#

and I'm sure you could find cheaper if you weren't just opening a random link

wet breach
torn shuttle
#

I'll be long gone by then, it's 1 am

wet breach
#

Thats fine. I will just ping you

#

And you can read it whenever

torn shuttle
#

this man is out here pinging me awake to win an argument about how crts are cheaper

wet breach
#

Uh no not to wake you lmao

torn shuttle
#

I'll believe you that it is cheaper if it's leftover stuff the US looted from countries it had military theaters in post ww2

#

that's how the english got a lot of cool stuff for cheap

#

portugal too

quaint mantle
quaint mantle
#

it just caused issues with the sound i was running from it and just made both not work with just a huge error line so i made it into the first one i made and they both worked fine now

quaint mantle
#

question is getPluginDirectory remaned to getPluginLoader now?

worldly ingot
#

PES_Think no

#

You probably are looking for getDataFolder()

#

It's always been named that though

subtle folio
#

How do I remove the message that gets sent whenever a player dies?

#

similar to changing the playerJoinEvent message to null, is there something like that for player death event?

subtle folio
#

oh oops i forgot to cast the event thats why

#

thanks karmadev

quaint mantle
#

Np

river oracle
#

anyone have an idea on how I could unify these regex statements
<(.*?[\"])>|<(.*?)>
Basically goal is to match everything inside the tags unless they're in quotes e.g.

With just <(.*?)> this would match out
<example:tag:"<example>text"> -> example:tag:"<example

With my first statement though it correctly matches
<example:tag:"<example>text"> -> example:tag:"<example>text"

echo basalt
river oracle
#

no doing that puts me back to square one

echo basalt
river oracle
#

which is why I needed the ore

echo basalt
#

why doesn't * work

river oracle
echo basalt
#

I wonder if writing a string parser is more efficient tha nregex

carmine mica
#

you making a minimessage clone?

slender elbow
#

megamessage

river oracle
#

just need to adapt an implementation for BungeeChat

#

MineDown is nice and all but prefer the syntax of MiniMessage tbh

slender elbow
#

Keep in mind that MM is not regular so regex won't take you too far

carmine mica
#

๐Ÿคฎ

river oracle
#

was going to do it to grab the tags, but I guess I'll manually parse ๐Ÿฅฒ.

river oracle
slender elbow
#

I mean

#

"all of minimessage" is just mc components

river oracle
quaint mantle
#

Does JUnit have an "assertNotThrows"?

river oracle
#

assertDoesNotThrow

quaint mantle
#

Don't exist

river oracle
#

it should

quaint mantle
#

My bad, I'm using JUnit 4.13.1

#

I'll try with 5

river oracle
#

idk with 4

#

but it does on 5

quaint mantle
#

Yes, JUnit 5 has it

river oracle
#

๐Ÿฅฒ my tokenizer works so far brings joy to my heart

#

legit so cursed thoguh ๐Ÿ’ช but we ball idk how to fucking make a parser

quaint mantle
#

wdym?

river oracle
#

I'm making a MiniMessage syntax parser for BungeeChat

#

idk how tf to make a sophisticated parser I've never made one outside of some basic stuff like string splitting and a little regex

river oracle
#

so I'm basically going from no knowledge to rocket science ๐Ÿš€ but I have a feeling just like every crypto currency to ever exist I'm going to the moon babyyyy ๐ŸŒ•

quaint mantle
#

You might want to take a look at this?

#

Completely not sponsored

river oracle
#

why did you make your own chat components ๐Ÿ’€

quaint mantle
#

I was bored

#

๐Ÿ—ฟ

#

And phonk playlist started to play

river oracle
#

unfortunately my problem is a tad more complex than that

quaint mantle
#

My brain went brrrr

quaint mantle
#

Like, where are you stuck at?

river oracle
#

not stuck atm just balling. I'm tokenizing that shit up rn

#

e.g. you gotta put in your input string than tokenize the shit out of it

quaint mantle
#

I don't get what you mean

#

Kinda late, you better talk to me as a 2yo kid

river oracle
#

well when you tokenize a string you're essentially pulling shit out

echo basalt
#

Hmm should I make a reflection based packet system

#

So I don't have to do the BS writeUUID writeString stuff

river oracle
#

e.g.
<red>hi</red>
is extracted into 2 tokens
[<red>, </red>]

echo basalt
#

I just make a mapper function and scan classes thinkies

river oracle
#

on each token you store a bit more info e.g. 2 ints start and end location

quaint mantle
river oracle
#

why do multiple loop when 1 loop work fine

quaint mantle
#

Multiple loops?

#

No

#

Loop once, replace and go

#

Let me explain

astral pilot
#

is there a way to have bukkit runnable executed at random tick intervals?

river oracle
#

I don't get how regex is any faster here

#

I could do a benchmark but its 11:05pm

#

whatever fuck it

quaint mantle
#

You are thinking about it as <red>hello</red> in red and <red>red</red> in red
The regex doesn't necessariliy need to go through all the match instances.

Make your regex like this:
\\<?<color>(red|blue|cyan|...)\\>\w+\\</red\\>

#

You parse that regex once, replace all the occurrences, and parse again, until you don't have matches/finds

river oracle
#

you'll have to wrap something that runs every tick and use Random

river oracle
quaint mantle
astral pilot
#

ok i see thanks

quaint mantle
# river oracle cool but that regex gets crazy quick

Not really
private final static Pattern COLOR_PATTERN = Pattern.compile("<(?<color>black|dark_blue|dark_green|dark_aqua|dark_red|dark_purple|gold|gray|dark_gray|blue|green|aqua|red|purple|yellow|white|reset)>", Pattern.CASE_INSENSITIVE);
๐Ÿ—ฟ

river oracle
#

are you forgetting everything components can support

#

gradients etc, hover and click events

quaint mantle
# river oracle gradients etc, hover and click events

private final static Pattern CHAT_PATTERN = Pattern.compile("(?<container><chat\\s*(?<click>click=\"(?<clickAction>OPEN_URL|COPY_TEXT|WRITE_TEXT|EXECUTE)\"\\s*content=\"(?<clickContent>\\bhttps?://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]|[\\w\\s&ยง]*)\")?\\s*(?<hover>hover=\"(?<hoverAction>SHOW_TEXT)\"\\s*content=\"(?<hoverText>[a-zA-Z0-9~@#$^*()_+=\\[\\]{}|\\\\,.?: -&ยง]*)\")?>(?<message>[a-zA-Z0-9~@#$^*()_+=\\[\\]{}|\\\\,.?: -&ยง]*)</chat>)", Pattern.CASE_INSENSITIVE + Pattern.MULTILINE);

#

Hover and click support ๐Ÿ—ฟ

#

I said I went crazy

#

For gradients is eazy

#

private final static Pattern COLOR_PATTERN = Pattern.compile("<(?<color>black|dark_blue|dark_green|dark_aqua|dark_red|dark_purple|gold|gray|dark_gray|blue|green|aqua|red|purple|yellow|white|reset)|(?<gradient>#[0-9]{3,6}\:[0-9]{3,6})>", Pattern.CASE_INSENSITIVE);

#

I think this would work

river oracle
#

holy fucking regex

#

wonder how much slower that is than a simple if statement xD

quaint mantle
quaint mantle
#

But what do you prefer?

#

Have like 50 if statements?

#

Or a single statement?

river oracle
#

Reminds me I need to turn my tokenizer into an iterator of sorts for true O(n) performance!

#

cuz rn It requires O(n^2) since I would parse my string twice

river oracle
#

ik I'm kinda doing it as I go here

#

?paste

undone axleBOT
quaint mantle
#

cani see? ๐Ÿฅบ

#

Holy, you read my mind?

river oracle
#

as of now its a queue, but I'm going to switch that

#

switches generally compile into a lookup table so that option is still pretty good

quaint mantle
#

I guess OPEN is < and CLOSE is >

river oracle
#

yea

quaint mantle
#

Explain what would this code do to a string

river oracle
#

I could also use a map, but then I'd have to deal with hashing

river oracle
#

its about the same as this regex
((?<start><)(?<token>([^<>]+)|([^<>]+"(?<inner>[^"]+)"))(?<end>>))+?

quaint mantle
#

So it takes
<red>Hello</red> into
Token@red - Hello?

river oracle
#

major difference is its not separated into groups, however it can be done so pretty easily using iteration over separators :

river oracle
quaint mantle
#

Why is the text content between < >?

river oracle
#

I'm testing my escaping

#

as you can see its inside quotes

#

however, my current approach for that in of itself is flawed so it needs a little rework

quaint mantle
#

The problem with that is that you don't really know what that token is for. Like, it could be a color, an hover element etc, you will require tons of if statements for them

river oracle
#

I need to ensure the tag has been opened inorder for my quote escape to work

river oracle
#

so you can recieve a token and parse it and apply it to the next between it and the next token

quaint mantle
#

You will also need to add an error control. We all know the user does the possible to break the application, he might write <i love cats>Hello world!</what?>

#

What will you do in this case?

quaint mantle
#

I mean, what will you do in your application to manage that case?

river oracle
#

String#startsWith

#

for the interior tag caluse

quaint mantle
#

For each case?

river oracle
#

there aren't many cases

#

you have to remember regex does the same exact thing

#

the only difference is its not frontword facing

quaint mantle
#

colors, hover components, click componentes (you can have both in one), gradients (as you mentioned before), title times, actionbars, contents of the hover and clicks

#

There're a lot of cases actually

river oracle
#

this would give a considerable advantage

#

seeing as Trie's refuse an input as soon as it doesn't match with the 30 or so inputs it would have

quaint mantle
river oracle
#

the downside is it slows down an actual match which is why IMHO it'd be better to just use the if statements and chance it on the bad syntax having to run through all of them

quaint mantle
#

Seems simpler for me

river oracle
#

actually I had an idea with this

undone axleBOT
#

Itโ€™s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

river oracle
#

a Trie would be perfect here I would simply need to modify it to support proccessig the tag as soon as we know its valid rather tahn doing it again

river oracle
#

I also wanted to benchmark against MiniMessage cough my bad adventuretoo to see where I'm at

quaint mantle
#

I didn't benchmark mine

#

Probably will get a surprise

river oracle
#

its pretty easy to do stuff with JMH

#

granted benchmarks take a long time

#

can be like 30 minutes xD

quaint mantle
#

Yeah, but I'm toooooooooooo lazy for doing things like benchmarks

river oracle
#

and you get to hear your computer die as JMH warms up the JVM

quaint mantle
#

As long as my code runs

#

๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ ๐Ÿ—ฟ

#

||joke, I just didn't know about benchmarking since a few weeks ago||

slate tinsel
#

If I want to use "Bukkit.getServer().getOnlinePlayers()" but for all entities what is the easiest, do I have to first loop through all worlds and then loop through each world's entities?

eternal oxide
#

yes

#

but you will only be seeing entities that are loaded

slate tinsel
#

okey

waxen plinth
#

Bukkit.getWorlds().stream().flatMap(World::getEntities)

#

a nested loop works but I'm a streams addict

slate tinsel
#

I have made a code where I save entities in a list. If I check if this entity tries to damage another entity by checking that damager is this entity in "EntityDamageByEntityEvent" should this make it so that no entity can take damage from that entity?

eternal oxide
#

?tas

undone axleBOT
quaint mantle
#

hey, how does redstone work on spigot? So I have heard it skips ticks to optimise it for performance. So like, if i had a 0-tick pulse generator, could it like not activate every single time?

#

I know this is not a discord server for paper but, i am currently running a paper server. I have heard paper servers do TPS catchup to compensate for the skipped ticks, how does it differ from spigot? So like do they move updates to the next game tick or something?

eternal oxide
#

?fork

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

slate tinsel
# eternal oxide ?tas

What I have experienced is that it has not worked, stupid of me not to say so in the question.

For example, I have entity as "FireRocket" but the player can still take damage from the explosion

quaint mantle
#

oh ok.

#

that is fine, but regarding the first question, can i know more about how it skips ticks?

eternal oxide
slate tinsel
#

yes

eternal oxide
#

however I doubt you can have a zero tick pulse

quaint mantle
#

i have heard literally everyone say it breaks redstone probably.

eternal oxide
#

a pulse requires a down pulse

#

you can;t pulse up if you never pulse down

#

ie a zero tick pulse of power level 8 is just going ot give a constant level 8 signal

eternal oxide
slate tinsel
quaint mantle
#

this is the 0-tick pulse generator i am currently using.

eternal oxide
#

they are different damage events

quaint mantle
#

whats a pulse up and pulse down??

eternal oxide
#

if you have a pulse every tick there will never be a down time

slate tinsel
#

Can you retrieve the one that damaged or caused the explosion and make it so that no one is harmed by it even though it should still happen as well as the animaiton should be shown as well

eternal oxide
#

it will be a constant signal

quaint mantle
#

ah okay.

quaint mantle
#

0-tick pulses are actually one gametick perhaps, but they are called 0-ticks because of it being almost 0 redstone ticks perhaps.

#

dont entirely remember how they named this mechanic in redstone but is sometimes used for certain contraptions.

smoky oak
#

0 ticks are used to do stuff in one gametick that shouldnt be done in one game tick
like opening a 5x5 piston door

valid burrow
#

and why would you need to retrieve the damager

#

but yeah with .getDamager i believe you get the exploding entity and with that you can get the cause

slate tinsel
#

Guess I should use the "FireworkExplodeEvent"?

#

Or will it not work as I imagine?

valid burrow
#

are you only trying to cancel damage?

slate tinsel
valid burrow
slate tinsel
valid burrow
#

cause in that case EntityDamageByEntityEvent

#

or something along those lines

slate tinsel
#

From a FireRocket entity contained in a list

valid burrow
valid burrow
valid burrow
#

do

#

event#getDamager

#

and if its the rocket

#

e.setDamage(0)

slate tinsel
#

Okey

umbral ridge
#

hey so I forgot the most basic thing, when I do /setspawn, what could be the reasons that player isn't teleporting to the set spawn? Instead they teleport to a default world spawn?

#

Should I do setSpawnLocation() on a world? And if that's the case, what if player tries /spawn from the end or the nether, then I can't use setSpawnLocation()?

#

Should I teleport the player to spawn on PlayerRespawnEvent?

valid burrow
umbral ridge
valid burrow
#

oh

#

okay

valid burrow
#

from what plugin

umbral ridge
#

my plugin

valid burrow
#

well what is your current method that doesnt work

valid burrow
#

would work

#

no issues

inner mulch
#

is it possible to get the number that a player has set is fov to?

#

or even force the fov

torn badge
#

Purely clientside

valid burrow
inner mulch
#

ok

valid burrow
#

if you lucky you can give them slowness or speed to change their fov if they didnt disable that ig

#

thats about it

umbral ridge
#

is it possible to get the death reason (last harm reason) in PlayerRespawnEvent

valid burrow
#

just log it

#

hashmap

#

cache it until player respawns

#

then remove

hushed spindle
#

im trying to put a text placeholder on an item but annoyingly every time i rename an item or use /give to give myself an item with said placeholder as name it injects some color code on the 2nd character thats interrupting the placeholder

#

how does that work

umbral ridge
#

so hashMap would be gone

hushed spindle
#

like i used the command /give @p diamond_sword{display:{Name:'[{"text":"<lang.material-diamond-dagger>","italic":false}]'}} 1 for example and still it puts that color code

#

same happens if i do it with code

valid burrow
#

but

#

cmon

#

its only respawn messages isnt it?

#

like

hushed spindle
#

or just put it in their persistent data container for the time being

#

remove it on respawn

umbral ridge
hushed spindle
#

yeah

valid burrow
#

yeag

umbral ridge
#

how

hushed spindle
#

Player#getPersistentDataContainer()

valid burrow
#

the same as on any other entity

umbral ridge
#

damn thats easy solution then

#

tnx

valid burrow
#

player is a entity

umbral ridge
#

I though it was only possible for itemstacks

hushed spindle
#

nope entities got em too

#

tile entities too like chests

#

i think

valid burrow
#

yea

#

?pdc

warm mica
tropic saddle
#

?mappings

undone axleBOT
smoky oak
#

im glad this is allowed but also wtf java

inner mulch
smoky oak
#

overriding a method with an abstract one lol

inner mulch
#

oh ok

young knoll
#

Items, entities, block entities, chunks, and worlds all have pdc

#

:p

#

Oh and structures

umbral ridge
#

So on PlayerDeathEvent, how do you get the reason why player died

upper hazel
#

hey why logic from inventory gui click does it apply to the player's inventory??

young knoll
#

You can get the last damage cause

upper hazel
#

how get slot from open inventory

umbral ridge
rapid trout
#

I want to create customs GUI linked to a plugin, for that I will use shader but I'm finding 0 documentation or tutorial, someone know how that works ?

umbral ridge
#

what

slate tinsel
eternal oxide
#

if you cancel you don;t need to alter damage

slate tinsel
#

but if I didn't get it to work with cancel, then setDamage won't work?

umbral ridge
slate tinsel
eternal oxide
#

?nocode <-

undone axleBOT
#

Itโ€™s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

slate tinsel
#

will test once more if it doesn't work, you can see my code ๐Ÿ™‚

valid burrow
#

doesnt make a difference ih

valid burrow
#

maybe the problem is the way you check the damager

molten hearth
#

what is the best way to change a final field via reflection

#

FieldUtils.removeFinalModifier isnt available in java 12+ so idrk

#

do I downgrade to java 8 ๐Ÿ’€ ๐Ÿ™

dry hazel
#

none of them are good

#

your best bet is Unsafe

slender elbow
#

i mean

#

just setAccessible true should work on instance fields

molten hearth
#

yeah but i cant modify them if they're final

#

oh wait

#

sorry i misread

#

well

#

its a static final

dry hazel
#

theUnsafe.putObject(theUnsafe.staticFieldBase(field), theUnsafe.staticFieldOffset(field), value);

half arrow
young knoll
#

You can only get full categories

dry hazel
molten hearth
#

yea im using that rn

#

i think i changed the wrong field rofl

half arrow
#

Ah okay, is there another provider who does supply direct method to a head?

dry hazel
molten hearth
#

nah its good it worked with unsafe

#

allat to change a char ๐Ÿ’€ ๐Ÿ™

dry hazel
#

wouldn't the jvm just inline that since it's a constant

half arrow
# young knoll You can only get full categories

Ok so on initial plugin load, call category GET if local storage doesn't exist already , store locally then when entity type is killed lookup in the stored data for that entity - sound about right?

young knoll
#

Sure

#

Or you could hardcode them all

half arrow
#

Ok might be the way to go

umbral ridge
#

how do you make a player lay down on the floor after they die? for a few seconds? what packets do i have to use or how do achieve this

half arrow
#

some of the default heads are way off the native mc ones for example pig isn't a regular pig head

young knoll
#

Well there is no "regular" pig head

distant wave
#

what does this mean?

half arrow
shadow night
umbral ridge
shadow night
#

I haven't either

umbral ridge
#

๐Ÿ˜ฟ

dry hazel
distant wave
#

not the bukkit one

dry hazel
#

likely that the awt color returns different values than the bukkit one expects then

half arrow
eternal oxide
#

asBungee().getRGB() pass into Color

#

or something close

distant wave
young knoll
#

Vanilla Tweaks datapack has all the mob heads

umbral ridge
#

aren't these basically textures?

#

nvm its an url part ๐Ÿ‘

half arrow
#

Thanks guys

young knoll
#

Yes that is me

#

But those are only a few of the mobs

half arrow
#

Found something - Just need to go through and add textures i guess,

slate tinsel
#

Firework is an entity right?

slender elbow
eternal oxide
#

yes

slate tinsel
#

ElgarL is "yes" to me? or is it to Emily

slender elbow
#

to you

slate tinsel
# eternal oxide ?nocode <-
    @EventHandler
    public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
        DamageBlockedEntity damageBlockedEntity = getDamageBlockedEntity(event.getDamager());
        if (damageBlockedEntity == null) return;
        if (damageBlockedEntity.getEntity().equals(event.getDamager())) {
            event.setCancelled(true);
        }
    }
eternal oxide
#

do some sysouts to see where it fails

#

does it get a DamageBlockEntity?

slate tinsel
#

So it succeeds in running "event.setCancelled(true);" but the players still take damage

brisk estuary
#

is it possible to create a world that is just a cube and a structure inside it? I just need a structure in another dimension, but I don't want to create a whole flat world to do that

#
private void createBarooWorld() {
        World world = WorldCreator.name(WORLD_NAME)
                .generateStructures(false)
                .type(WorldType.FLAT)
                .createWorld();


    }
``` that's what I have right now
eternal oxide
# slate tinsel

put a sysout at the beginning of the event to see if it is firing more than once

eternal oxide
#

not in launch, sysout at top of damage event

slate tinsel
#

No, it doesn't run in the Launch event, it's just another event I have somewhere else in my code

eternal oxide
#

Do as I said

slate tinsel
#

i print in EntityDamageByEntityEvent

#

but i also have this i mine code:

eternal oxide
#

I can't help if you ignore me

slate tinsel
#

sorry, what should I do?

eternal oxide
#

put a sysout at teh top of the damage event so we can see how many times it fires

slate tinsel
#

okey, sorry :/

eternal oxide
#

your logs look fine

slate tinsel
#

should I try with another event or something?

eternal oxide
#

you can't get teh target with that event though ๐Ÿ˜ฆ

slate tinsel
#

In this case, I only want to retrieve the entity that is "Firerocket" therefore no entity should be able to take damage from it

eternal oxide
#

your code is perfect, there has to be something else messing with it

#

another plugin uncancelling the damage event?

#

or somewhere else in your code you uncancel

#

EntityDamageByEntity is the correct event

slate tinsel
#

I only have my own plugin on the server, but can review my code and see if I've done something wrong elsewhere

smoky oak
#

unrelated question but i think i can interject here for a second
I've a small set of UUIDs that get adjusted when it's told to be adjusted (or gets regenerated), but potentially reads that set out much more often than its written to.
Is it better to use LinkedHashSets for very small (<200 entries) sets?

eternal oxide
#

Do you need it ordered?

smoky oak
smoky oak
eternal oxide
#

just a basic hashset then

smoky oak
#

when should i switch in that case?

slate tinsel
# eternal oxide or somewhere else in your code you uncancel

This code checks that the projectile fired by the player does not damage other players, but does not see anything about it that could cause the problem. That is the only EntityDamageByEntityEvent I and the one in my DamageBlockedManager that we are trying to resolve now then

eternal oxide
eternal oxide
smoky oak
eternal oxide
#

no point in Linked

smoky oak
#

thats for iteration then?

eternal oxide
#

uh?

#

Set has an iterator

shadow night
#

What is an "Iterator" object? Recently stumbled upon that in mcp

smoky oak
#

lemme find the conversation

#

guess this asnwers that question

#

some people might want to iterate over it though

#

whats the overhead of a LinkedHashSet compared to a HashSet? anything relevant?

slate tinsel
eternal oxide
eternal oxide
smoky oak
#

like i probably dont, but this is for an api (would be accessible in classes extending it)
is iteration on HashSet not slower than iteration on LinkedHashSet? IkeVodoo said it is

slate tinsel
eternal oxide
#

no both are o(1)

smoky oak
eternal oxide
smoky oak
#

or do you mean the time to obtain the iterator

eternal oxide
#

in performance HashSet is slightly better as it only maintains one backing hashtable

slender elbow
#

"iteration speed" really does not matter

#

whatever you do inside the iterations is gonna be more costly

eternal oxide
#

^

smoky oak
#

thats a fair point, i just like keeping things like that in mind

slate tinsel
# eternal oxide then I have no clue why you can;t cancel the damage from teh firework, unless fi...
            this.fireworkEntity = this.victim.getWorld().spawn(this.victim.getLocation(), Firework.class, firework -> {
                FireworkMeta meta = firework.getFireworkMeta();
                meta.addEffect(EFFECT);
                firework.setFireworkMeta(meta);
                firework.detonate();
            });

            DamageBlockedManager.getInstance().addBlockedDamageEntity(this.fireworkEntity);
    private final FireworkEffect EFFECT = FireworkEffect.builder()
            .flicker(false)
            .trail(false)
            .withColor(Color.RED)
            .with(FireworkEffect.Type.BALL)
            .build();

    private Firework fireworkEntity;
eternal oxide
#

um you detonate before you add to your manager

#

MAY be ok as it won;t actually detonate until the next tick (probably)

slate tinsel
#

Regardless, something good to change, didn't think of it

young knoll
#

Wonder if you could just add pdc to it

#

or metadata

eternal oxide
#

it would be simpler to PDC

slate tinsel
#

That sounds interesting, actually thought about it before

eternal oxide
#

no manager then

slate tinsel
#

I made a utility for it which I then removed :/

smoky oak
#

how does suppress warnings work?

young knoll
#

It gets rid of the yellow

smoky oak
#

but not the warning?

#

so its useless then

young knoll
#

The yellow is the warning

smoky oak
#

it still is in the analysis

quaint mantle
#

The naming for them is so strange

#

It might be a capital D @smoky oak

young knoll
#

Could also just not use the deprecated event :p