Advertisement
tahg

Untitled

Sep 26th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. protected void channelRead0(ChannelHandlerContext ctx, IronChestMessage msg) throws Exception
  2. {
  3. System.out.println("Hi from the chest handler");
  4. World world = IronChest.proxy.getClientWorld();
  5. TileEntity te = world.getTileEntity(new BlockPos(msg.x, msg.y, msg.z));
  6. System.out.println(te == null ? "No tile" : te.getClass().getSimpleName());
  7. if (te instanceof TileEntityIronChest)
  8. {
  9. System.out.println("Yep, it's a chest");
  10. TileEntityIronChest icte = (TileEntityIronChest) te;
  11. icte.setFacing(msg.facing);
  12. icte.handlePacketData(msg.type, msg.itemStacks);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement