|
1 | 1 | package cofh.thermalfoundation.item; |
2 | 2 |
|
3 | | -import cofh.api.block.IBlockConfigGui; |
| 3 | +import cofh.api.block.IConfigGui; |
4 | 4 | import cofh.api.block.IBlockInfo; |
5 | 5 | import cofh.api.tileentity.ITileInfo; |
6 | 6 | import cofh.core.item.ItemMulti; |
@@ -58,31 +58,27 @@ private boolean doMultimeterUseFirst(ItemStack stack, EntityPlayer player, World |
58 | 58 | ArrayList<ITextComponent> info = new ArrayList<>(); |
59 | 59 |
|
60 | 60 | if (ServerHelper.isClientWorld(world)) { |
61 | | - if (block instanceof IBlockConfigGui || block instanceof IBlockInfo) { |
62 | | - ServerHelper.sendItemUsePacket(world, pos, side, hand, hitX, hitY, hitZ); |
| 61 | + if (block instanceof IConfigGui || block instanceof IBlockInfo) { |
63 | 62 | return true; |
64 | 63 | } |
65 | 64 | TileEntity tile = world.getTileEntity(pos); |
66 | 65 | return tile instanceof ITileInfo; |
67 | 66 | } |
68 | | - if (player.isSneaking() && block instanceof IBlockConfigGui) { |
69 | | - if (((IBlockConfigGui) block).openConfigGui(world, pos, side, player)) { |
| 67 | + if (player.isSneaking() && block instanceof IConfigGui) { |
| 68 | + if (((IConfigGui) block).openConfigGui(world, pos, side, player)) { |
70 | 69 | return true; |
71 | 70 | } |
72 | 71 | } |
73 | 72 | if (block instanceof IBlockInfo) { |
74 | 73 | ((IBlockInfo) (block)).getBlockInfo(info, world, pos, side, player, false); |
75 | | - |
76 | 74 | ChatHelper.sendIndexedChatMessagesToPlayer(player, info); |
77 | 75 | info.clear(); |
78 | 76 | return true; |
79 | 77 | } else { |
80 | 78 | TileEntity tile = world.getTileEntity(pos); |
81 | 79 | if (tile instanceof ITileInfo) { |
82 | | - if (ServerHelper.isServerWorld(world)) { |
83 | | - ((ITileInfo) tile).getTileInfo(info, side, player, false); |
84 | | - ChatHelper.sendIndexedChatMessagesToPlayer(player, info); |
85 | | - } |
| 80 | + ((ITileInfo) tile).getTileInfo(info, side, player, false); |
| 81 | + ChatHelper.sendIndexedChatMessagesToPlayer(player, info); |
86 | 82 | info.clear(); |
87 | 83 | return true; |
88 | 84 | } |
|
0 commit comments