[SPIGOT-611] Tile data not cleaned up when replacing various blocks Created: 23/Feb/15 Updated: 25/Jun/16 Resolved: 25/Jun/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Mark Summers | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
Spigot 1.8, bug is new and was not present in the builds available at the end of December 2014 |
Issue Links: |
|
Description |
This may effect any block with an inventory or tile data, my users have reported it with enchanting tables, signs, and other blocks. But in my test case I used a furnace and I can verify it occurs with that block. Basically if your plugin replaces a furnace with, say, a chest, and fills the inventory of the chest, the chest will then be empty and you may (but will not always) get this on the server console: [Server thread/ERROR]: Block at 10,008,134,9,945 is CHEST but has net.minecraft.server.v1_8_R1.TileEntityFurnace@3224f772. Bukkit will attempt to fix this, but there may be additional damage that we cannot recover. I am not sure the exact build where this started, however I can confirm it does not happen with: but it does happen with: The code I am using to replace the block is similar to: Where x,y,z refers to a block that is a furnace. |
Comments |
Comment by Adam Taylor [ 22/Apr/15 ] |
It still happens. |
Comment by Mark Summers [ 01/Apr/15 ] |
I can say for sure that it still happens with comparators as described in |
Comment by Thinkofname [ 29/Mar/15 ] |
Does this still happen? I changed tile entity handling a few versions ago |
Comment by Mark Summers [ 02/Mar/15 ] |
Just in case anyone works on this bug, the error reported in |
Comment by Mark Summers [ 24/Feb/15 ] |
Thanks Black Hole, I can confirm that this works. If I blank out any block with an inventory plus signs before I replace it, that seems to work. Still, I would like to leave this open as it did work without that workaround before, and this slows down the process. It's for Movecraft, a plugin that moves large crafts around the server, and it needs to process 10s of thousands of blocks a second. So every bit of speed matters. |
Comment by Black Hole [ 24/Feb/15 ] |
As a workaround you could set the block to air before applying the new state. |
Comment by Mark Summers [ 23/Feb/15 ] |
I went ahead and added a: [15:40:57 ERROR]: Block at 9,999,124,10,351 is CHEST but has net.minecraft.server.v1_8_R1.TileEntityFurnace@542b4a52. Bukkit will attempt to fix this, but there may be additional damage that we cannot recover. On the server console, and the chest is empty. It's also curious that this did not happen on the builds of Spigot 1.8 from December. |
Comment by Antony Riley [ 23/Feb/15 ] |
Generally if you don't call BlockState.update() after modifying a BlockState, it does not update. |