Advertisement
Benjamin_Loison

interact(EntityPlayer player) - ForgeToBukkit

Oct 24th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1.         @SideOnly(Side.CLIENT)
  2.         public boolean interact(EntityPlayer player) {
  3.                 EntityClientPlayerMP playerMP = (EntityClientPlayerMP) player;
  4.                 DataWatcher dw = this.getDataWatcher();
  5.                 ByteArrayDataOutput out = ByteStreams.newDataOutput();
  6.                 out.writeUTF("chestcommands open " + dw.getWatchableObjectString(21));
  7.                 out.writeUTF(dw.getWatchableObjectString(22));
  8.                 if (!player.isSneaking()) {
  9.                         C17PacketCustomPayload packet = new C17PacketCustomPayload("ForgeToBukkit", out.toByteArray());
  10.                         playerMP.sendQueue.addToSendQueue(packet);
  11.                 }
  12.                 return true;
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement