[MC-7254] Furnace Tile Entities reproducing - Internal performance bug Created: 12/Jan/13  Updated: 03/May/17  Resolved: 04/Mar/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.7
Fix Version/s: Snapshot 13w10a

Type: Bug
Reporter: Lukas Tenbrink Assignee: [Mojang] Jeb (Jens Bergensten)
Resolution: Fixed Votes: 2
Labels: block-entity, furnace, performance
Environment:

Windows 7


Issue Links:
Relates
relates to MC-9018 Faceless Furnace/Furnace Duplication. Resolved
Confirmation Status: Unconfirmed

 Description   

When producing code similar to the furnace's, I stumbled upon a bug. For furnaces, it's only a performance bug, but it can potentially become a 'real' one in other instances.
When a furnace gets lit or runs out of fuel, it changes its block ID. For that, it caches the tile entity, and then sets original one over the new one that's generated. The 'new' tile entity stays in the arrays though, producing a ghost tile entity (that still gets updated!) every time the furnace state is changed.

What I expected to happen was...:
The newly produced tile entity to get deleted.

What actually happened was...:
It got reproduced and became a ghost in the tile entity arrays.

Steps to Reproduce:
*Keep track of all furnace entities in game.
*Light a furnace
*Let it run out of fuel
*Watch the number of furnace tile entities growing.

Solution:
I know you don't use the same names as MCP does, but I did this:

Before setting a tile entity (setBlockTileEntity) inside World, make sure to run through all tile entity inside addedTileEntityList and loadedTileEntityList, and delete all with the same x, y, and z coord.



 Comments   
Comment by [Mojang] Jeb (Jens Bergensten) [ 04/Mar/13 ]

Thanks for this bug report!

Generated at Sun Jan 12 12:13:54 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.