Storage Drawers: Natura Pack

Storage Drawers: Natura Pack

9M Downloads

Drawer Controller stops ticking if corresponding Tile Entity is deleted by some other plugin

PolyacovYury opened this issue ยท 2 comments

commented

Browsed through the issue tracker and saw a similar issue, which was resolved.

I play on a MC 1.12.2 server with SD 5.3.6 and ClearMob installed. Basically, if a chunk that contains any Controller gets reloaded, Controller stops being a TileEntity.

I would suggest converting a getTileEntity(world, pos) function call on line 182 of BlockController.java to a getTileEntitySafe call, so that if a Controller receives a tick and its Entity is deleted for some reason - it would be re-created similarly to other events such as player right-clicking it with a Drawer Key.

And yes, I know that we could whitelist Controller Tile Entities in our plugin config. But imagine someone not knowing of this trying to solve it without a debugger at hand..

commented

Can I ask more about why a TileEntity is deleted from a block? What about drawer blocks, which carry actual inventory data?

commented

I'll be honest - I don't remember, why exactly I wrote the header how I wrote it.
It looks like CLearMob had nothing to do with this. The issue stemmed from simply reloading a chunk.
It also seems to have been fixed by either Sponge or Forge update a long time ago..