Revert "Fixed warning in stack tooltip event."

This reverts commit 1614f71
This commit is contained in:
modmuss50 2018-06-09 17:03:07 +01:00
parent c15f808686
commit 475eb4b55f
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82

View file

@ -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);
}