From 475eb4b55f51eb4aba6a83fe28c9ca87047f6711 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Sat, 9 Jun 2018 17:03:07 +0100 Subject: [PATCH] Revert "Fixed warning in stack tooltip event." This reverts commit 1614f71 --- src/main/java/techreborn/events/StackToolTipEvent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/techreborn/events/StackToolTipEvent.java b/src/main/java/techreborn/events/StackToolTipEvent.java index aca1b22f5..0559681a8 100644 --- a/src/main/java/techreborn/events/StackToolTipEvent.java +++ b/src/main/java/techreborn/events/StackToolTipEvent.java @@ -83,7 +83,8 @@ public class StackToolTipEvent { Block block = Block.getBlockFromItem(item); if (block != null && (block instanceof BlockContainer || block instanceof ITileEntityProvider) && block.getRegistryName().getResourceDomain().contains("techreborn")) { - TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().world, block.getDefaultState()); + TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().world, + block.getStateFromMeta(event.getItemStack().getItemDamage())); if (tile instanceof IListInfoProvider) { ((IListInfoProvider) tile).addInfo(event.getToolTip(), false); }