#I want to track item frame entities

1 messages · Page 1 of 1 (latest)

glad hill
#

And other question do the objects of still valid Entities may not be synced anymore with the actual entity. (and instead the entity creates a new entity object)

slender canyon
#

Yes entities get new objects every time they are loaded again.

#

Listen to the PlayerInteractEvent

#

For changes

#

And use a Set instead of a List

glad hill
glad hill
glad hill
slender canyon
#

There is no good way to detect that. You could implement your own nms class that does.

#

Or check once every 5 seconds

glad hill
#

Oh do you mean making a new implementation of the entity class?

slender canyon
#

Yes a runnable that is scheduled

glad hill
#

why nms then

slender canyon
#

those are 2 different options

#

nms implementation or polling

glad hill
#

can i have more info about the nms impl, what does it consist in?
Overriding the default CraftBukkit impl of Entity, adding trackers in methods like .setContent() (or whatever the name of the method) before calling super().setContents(..)

#

also do u think its overkill?

slender canyon
#

Not the CraftBukkit implementation. The actual nms implementation. And then override the registry so your custom class is used instead of the vanilla class. Then you can add events to the methods.

glad hill
#

hm interesting, i'll think about it, do u have some template somewhere of sth similar

#

Also one last thing:
NMS & CraftBukkit are 2 seperate implementations?

glad hill
#

Anyway, thank you very much smiling dude!