コード例 #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
ファイル: PacketOpenScreen.java プロジェクト: hapm/Spoutcraft
 public void writeData(SpoutOutputStream output) throws IOException {
   output.writeInt(type.getCode());
 }
コード例 #3
0
ファイル: PacketOpenScreen.java プロジェクト: hapm/Spoutcraft
 public void readData(SpoutInputStream input) throws IOException {
   type = ScreenType.getType(input.readInt());
 }