예제 #1
0
 public PacketKeyPress(
     int key, boolean pressDown, MovementInputFromOptions input, ScreenType type) {
   this.key = key;
   this.pressDown = pressDown;
   this.settingKeys[0] = (byte) input.gameSettings.keyBindForward.keyCode;
   this.settingKeys[1] = (byte) input.gameSettings.keyBindLeft.keyCode;
   this.settingKeys[2] = (byte) input.gameSettings.keyBindBack.keyCode;
   this.settingKeys[3] = (byte) input.gameSettings.keyBindRight.keyCode;
   this.settingKeys[4] = (byte) input.gameSettings.keyBindJump.keyCode;
   this.settingKeys[5] = (byte) input.gameSettings.keyBindInventory.keyCode;
   this.settingKeys[6] = (byte) input.gameSettings.keyBindDrop.keyCode;
   this.settingKeys[7] = (byte) input.gameSettings.keyBindChat.keyCode;
   this.settingKeys[8] = (byte) input.gameSettings.keyBindToggleFog.keyCode;
   this.settingKeys[9] = (byte) input.gameSettings.keyBindSneak.keyCode;
   this.screenType = type.getCode();
 }
예제 #2
0
 public void writeData(SpoutOutputStream output) throws IOException {
   output.writeInt(type.getCode());
 }
예제 #3
0
 public void readData(SpoutInputStream input) throws IOException {
   type = ScreenType.getType(input.readInt());
 }