BG-Software-LLC / WildStacker

Stacked drops, stacked entities, stacked blocks and stacked spawners in one plugin!
https://bg-software.com/wildstacker/
GNU General Public License v3.0
90 stars 36 forks source link

NBTInjector #602

Closed ArefyNetwork closed 2 years ago

ArefyNetwork commented 2 years ago

Minecraft's Version

1.8.8 paper

Plugin's Version

Dev build latest 349

Describe the bug

I created a ticket some days ago (https://github.com/BG-Software-LLC/WildStacker/issues/592) but I'm still having issues with it, it now detects nbtinjector but throw some errors

https://pastebin.com/cgrH5KDL

Sorry to not answer before on the closed ticket, didn't see github notifications

Thanks!

To Reproduce

-

Additional Information

No response

OmerBenGera commented 2 years ago

The error comes from NBTInjector. It fails to patch some entities - any clue why?

ArefyNetwork commented 2 years ago

The error comes from NBTInjector. It fails to patch some entities - any clue why?

What do you mean? I'm using item-nbt-api-plugin-2.11.0 and nbtinjector enabled on config

Basically holograms aren't showing (for spawners/blocks), still having error from above on console with [item-nbt-api-plugin-2.11.0] latest dev build version

https://i.gyazo.com/7fef503c4d4fade9206e412c797e9186.gif

Thanks again Omer!

OmerBenGera commented 2 years ago

The error comes from NBTInjector. It fails to patch some entities - any clue why?

What do you mean? I'm using item-nbt-api-plugin-2.11.0 and nbtinjector enabled on config

Basically holograms aren't showing (for spawners/blocks), still having error from above on console with [item-nbt-api-plugin-2.11.0] latest dev build version

https://i.gyazo.com/7fef503c4d4fade9206e412c797e9186.gif

Thanks again Omer!

WS uses NBTInjector in order to save the stack amounts. However, when doing so, NBTInjector fails to patch the entities and save the custom data. Do you have any clue why would it happen? If not, try contacting their support as I dont know why it fails.

ArefyNetwork commented 2 years ago

https://m.arefy.net/aa4i1Fu.png

They answered me that, so you should implement something to clean scoreboard.dat every x time I guess, as it's keeping bigger when I've too many players using spawners, etc. Also the weird thing it's that I've to remove scoreboard.dat after x days to avoid crashes (when scoreboard it's too big, it starts crashing the server), so to avoid leaking data, you should clean it like I said every x time

https://github.com/BG-Software-LLC/WildStacker/issues/554 Yesterday I had even a file bigger than that one, and that was the reason of daily crashes

Thanks again :)

tr7zw commented 2 years ago

Hey, nbtapi dev here. Few small things:

OmerBenGera commented 2 years ago

Hey, nbtapi dev here. Few small things:

  • I highly recommend against using the nbtinjector, due to the issues it can and will cause
  • In regards to the leaking scoreboard, you need to make sure to remove data of despawning/killed mobs. Otherwise it just keeps getting bigger and bigger
  • The cleanest method for 1.8-1.13 to store custom data on entities is to use an item on them. Items have no nbt restrictions, and for, idk, zombies, you can put a button on their head(so it's not visible) and then store all custom data in there.

Hey, thanks for replying :)

@ArefyNetwork I think the only good solution is to make another plugin that will change code of the Entity class and add support for such thing. Similar to NBTInjector, but simpler one that modifies the code of Minecraft when the server loads. What do you think about this approach?

ArefyNetwork commented 2 years ago

Yeah, or something like removing leaked data on scoreboard on server reset would be good too, as it's the main issue right now.

Thanks again!

tr7zw commented 2 years ago

Just listening to the entity death/despawn event and removing any data related to the entity might already help. Old mc versions afaik didn't do that themselves.

OmerBenGera commented 2 years ago

Just listening to the entity death/despawn event and removing any data related to the entity might already help. Old mc versions afaik didn't do that themselves.

Already been done before, not helpful when having clearlag and other plugins that constantly removing entities.

OmerBenGera commented 2 years ago

Yeah, or something like removing leaked data on scoreboard on server reset would be good too, as it's the main issue right now.

Thanks again!

Can't directly remove scoreboard data as it's not possible to track when entities are removed from the world and never come back.

OmerBenGera commented 2 years ago

Hey, please join our discord server and send me your discord tag here. I made the external plugin and I want you to test it out :)

tr7zw commented 2 years ago

I don't have any good way to test it(been doing fabric/forge modding the past 2 years mainly). Best case reach me on Discord via the nbtapi/mod discord linked in every readme.

OmerBenGera commented 2 years ago

I don't have any good way to test it(been doing fabric/forge modding the past 2 years mainly). Best case reach me on Discord via the nbtapi/mod discord linked in every readme.

Hey, I meant that @ArefyNetwork will message me - I came with a solution that doesn't require NBTInjector/nbtapi anymore. Thanks for responding and helping :)

OmerBenGera commented 2 years ago

@ArefyNetwork

OmerBenGera commented 2 years ago

I am closing this for now. You can find a download link in https://hub.bg-software.com/job/Other/job/EntityDataContainer/

There are also instructions on how to use it.