mojira.dev
MC-82703

Block Entities are not properly removed when 64 or more blocks are changed at the same time in a single chunk

The bug

This is a rendering bug to do with Tile Entities in a chunk. I have provided screenshots which aim to show how to reproduce too.

If you have 64 or more Tile Entities within the same chunk and then "delete" them, using either /fill, /clone or (if they are signs) retracting them using pistons, when you place a new Tile Entity in that same spot, the previous Tile Entity will render over that or instead of the new Tile Entity.

For example, if you have a wall of 64 chests, do /fill to get rid of them and then place a beacon down where one chest was, you'll get a chest that's rendered inside a beacon. If you place a sign down you get an error that says "Unable to locate sign".

All rendering errors and effects are cleared with a relog, so perhaps this has something to do with the way chunks are updated or saved?

How to reproduce

  1. Press F3+G to make sure the blocks you are filling are in the same chunk

  2. Use for example the /fill command to place 64 or more tile entities

    /fill ~1 ~ ~ ~5 ~4 ~4 enchanting_table
  3. Use for example the /fill command again to replace these tile entities with different tile entities

    /fill ~1 ~ ~ ~5 ~4 ~4 ender_chest

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 14

Another thing that happens here is if you replace some written signs with air, the text of the old sign shows up at the gui "edit sign message" where you can enter the text for the sign. You can delete it there but if you leave it, it will show up even after a reload as you've written it.

Actually, this is /fill command not doing its job right. Fill command doesn't destroy old tile entities, just their blocks and since MC has custom renderers for some tile entities, old renderer remains.

As old tile entity remains in the same place and when placing another you create a new one, you end up with two tile entities in the same place and a new block which actually opens new GUI.

This is /fill and similar commands not (re)moving tile entities as they are supposed to.

Also, the reason this glitch resets after restarting the world is because Minecraft tries to validate tile entities when they load and see if their block is still there (which fill doesn't) and destroys them if their block doesn't exist.

It is weird however that /fill does work below 63. This is probably another bug that has to do with chunk update inconsistencies.

Confirmed for 15w49b

Confirmed for 15w50a

Confirmed for 15w51a & 15w51b.

4 more comments

Can confirm for MC 1.12.1.

sa bug sa me soule je vien juste de l avoir

Brian Santos da Fonseca

Also happens in 18w06a. Gets fixed upon chunk reload. Filling Ender Chests into Enchantment tables also caused the following crash:

[media]

[Mod] redstonehelper

Please create a separate ticket for your crash.

Fixed in 1.13-pre6, along with MC-123432 and MC-123363. Old block entities are now explicitly cleared when the chunk loads, both for a full chunk column load and a partial change (which is what this was triggered on).

samasaurus6

(Unassigned)

Confirmed

/clone, /fill, block, block-entity, chunk, client, packet

Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w49b, Minecraft 15w50a, Minecraft 15w51b, ..., Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w02a, Minecraft 18w06a, Minecraft 18w20c

Minecraft 1.13-pre6

Retrieved