mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Only rename the dropped item if the TE is nameable. Fixes #5455
This commit is contained in:
1 file changed
+5
-2
@@ -48,8 +48,11 @@ public abstract class BlockMekanismContainer extends BlockContainer {
|
||||
}
|
||||
player.addExhaustion(0.005F);
|
||||
if (!world.isRemote) {
|
||||
Block.spawnAsEntity(world, pos,
|
||||
getDropItem(state, world, pos).setStackDisplayName(((IWorldNameable) te).getName()));
|
||||
ItemStack dropItem = getDropItem(state, world, pos);
|
||||
if (te instanceof IWorldNameable) {
|
||||
dropItem.setStackDisplayName(((IWorldNameable) te).getName());
|
||||
}
|
||||
Block.spawnAsEntity(world, pos, dropItem);
|
||||
}
|
||||
//Set it to air like the flower pot's harvestBlock method
|
||||
world.setBlockToAir(pos);
|
||||
|
||||
Reference in new issue
Block a user