[SPIGOT-5367] Invalid tile entities after running /setblock immediately after placing them. Created: 11/Oct/19  Updated: 19/Oct/19

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Michael Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None
Environment:

Windows 10


Attachments: Zip Archive te_test.zip    
Issue Links:
Problem/Incident
is caused by SPIGOT-5372 Incorrect spawner generation making b... Resolved
Version: CraftBukkit version git-Spigot-94af569-d6b3edd (MC: 1.14.4)
Guidelines Read: Yes

 Description   

I have a datapack that has the user place a "fake" block (in this case a blast furnace) that is then replaced with a different block (in this case a barrel) + an armor stand with a custom model in the same tick the block is placed (using an advancement trigger).

The following happens after placing the blast furnace:

  1. The console prints the error 
    Block entity invalid: minecraft:blast_furnace @ BlockPosition{x=76, y=72, z=78}
    
  1. The block visually changes to a barrel, but can't be broken or interacted with.
  2. /data get prints the following: 
    {CookTime: 0s, CustomName: '{"italic":false,"color":"dark_aqua","translate":"mech.block.machine_crafting_table"}', x: 76, BurnTime: 0s, y: 72, z: 78, Items: [], RecipesUsedSize: 0s, id: "minecraft:blast_furnace", CookTimeTotal: 200s}
    

Attached is a simple datapack that will reproduce the issue. I've had multiple reports of this issue from different people trying to use my datapack on their server, so this is not an isolated incident.

 

 



 Comments   
Comment by md_5 [ 19/Oct/19 ]

No, I'm pretty sure Vanilla is also creating the invalid tile entity for a small period of time — it's just not warned about before it's removed.

Comment by Michael [ 19/Oct/19 ]

Bukkit fixes the tile entity as of the latest version.

While it does work, I think for this issue it's a band aid solution as Spigot is creating the invalid tile entity, where as in SPIGOT-5372 vanilla is creating the invalid tile entity. The end result is the same but the cause is different. Either way, the fix seems to work fine for the moment.

Comment by md_5 [ 19/Oct/19 ]

Not being able to break the block seems to be a duplicate of SPIGOT-5372 which has been fixed (did you neglect to include the full console log in the report). I can break the block just fine on the latest version.

Bukkit will print a warning: "Bukkit will attempt to fix this, but there may be additional damage that we cannot recover." but thats something else; and has been happening with plugins using the place event for years.

Comment by Michael [ 14/Oct/19 ]

With some further investigation, this issue can also be replicated by creating a repeating command block with this command and placing a blast furnace on top of it:

execute if block ~ ~1 ~ minecraft:blast_furnace run setblock ~ ~1 ~ minecraft:barrel
Comment by Michael [ 14/Oct/19 ]

On a vanilla server, the placed tile entity (a blast furnace) is replaced with the new tile entity (a barrel) without any bugs occurring. In Spigot, the blocks are swapped so the blast furnace is set to a barrel, but the tile entities are not swapped, so the tile entity is still a blast furnace after placing the barrel (presumably, the blast furnace tile entity is never deleted, and new barrel somehow gets attached to it). Having a blast furnace tile entity attached to a barrel is rather buggy.

Comment by md_5 [ 14/Oct/19 ]

What happens on Vanilla server...

Generated at Tue Apr 15 11:10:20 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.