Fixed warning in stack tooltip event.

This commit is contained in:
drcrazy 2018-05-25 17:51:52 +03:00
parent 1ad23439eb
commit 1614f71244

View file

@ -83,8 +83,7 @@ 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.getStateFromMeta(event.getItemStack().getItemDamage()));
TileEntity tile = block.createTileEntity(Minecraft.getMinecraft().world, block.getDefaultState());
if (tile instanceof IListInfoProvider) {
((IListInfoProvider) tile).addInfo(event.getToolTip(), false);
}