Beispiel #1
0
 /**
  * Encode the data of this dragging from inventory to container command and put the values into
  * the buffer.
  *
  * @param writer the interface that allows writing data to the network communication system
  */
 @Override
 public void encode(final NetCommWriter writer) {
   writer.writeByte(sourceSlot);
   writer.writeByte(targetContainer);
   writer.writeInt(targetX);
   writer.writeInt(targetY);
   writer.writeByte((byte) 0); // Counter
 }
 /** {@inheritDoc} */
 @Override
 public void encodeUse(final NetCommWriter writer) {
   writer.writeByte((byte) AbstractReference.CONTAINER);
   writer.writeByte(containerID);
   writer.writeByte(containerItem);
 }