Code cleanup on EntityListComponent

This commit is contained in:
noil 2020-12-18 22:57:51 -05:00
parent 5297ccbfbe
commit a2ca3d8c4b
1 changed files with 4 additions and 5 deletions

View File

@ -287,11 +287,10 @@ public final class EntityListComponent extends DraggableHudComponent {
final NBTTagCompound tag = itemStack.getTagCompound(); final NBTTagCompound tag = itemStack.getTagCompound();
if (tag != null && tag.hasKey("BlockEntityTag", 10)) { if (tag != null && tag.hasKey("BlockEntityTag", 10)) {
final NBTTagCompound entityTag = tag.getCompoundTag("BlockEntityTag"); final NBTTagCompound entityTag = tag.getCompoundTag("BlockEntityTag");
final TileEntityShulkerBox tileEntityShulkerBox = new TileEntityShulkerBox();
final TileEntityShulkerBox te = new TileEntityShulkerBox(); tileEntityShulkerBox.setWorld(mc.world);
te.setWorld(mc.world); tileEntityShulkerBox.readFromNBT(entityTag);
te.readFromNBT(entityTag); mc.displayGuiScreen(new GuiShulkerBox(mc.player.inventory, tileEntityShulkerBox));
mc.displayGuiScreen(new GuiShulkerBox(mc.player.inventory, te));
} else { } else {
Seppuku.INSTANCE.errorChat("This shulker box is empty"); Seppuku.INSTANCE.errorChat("This shulker box is empty");
} }