@Override public boolean readBoolean() { return buf.readBoolean(); }
@Override public boolean readBoolean() { return buf.readBoolean(); }
@Override public boolean readBoolean() { return buf.readBoolean(); }
@Override public boolean readBoolean() { return buf.readBoolean(); }
@Override public boolean readBoolean() { return buf.readBoolean(); }
@Override public boolean readBoolean() { return buf.readBoolean(); }
@Override public boolean readBoolean() { return byteBuf.readBoolean(); }
@Override public boolean readBoolean() { checkReadableBytes(1); return buffer.readBoolean(); }
@Override public boolean readBoolean() { checkReadableBytes(1); return buffer.readBoolean(); }
@Override public boolean readBoolean() { checkReadableBytes(1); return buffer.readBoolean(); }
@Override public PlayerUpdateMessage decode(ByteBuf buffer) throws IOException { boolean onGround = buffer.readBoolean(); return new PlayerUpdateMessage(onGround); }
@Override public JoinGameMessage decode(ByteBuf buffer) throws IOException { int id = buffer.readInt(); byte gameMode = buffer.readByte(); int dimension = buffer.readInt(); byte difficulty = buffer.readByte(); byte maxPlayers = buffer.readByte(); String levelType = ByteBufUtils.readUTF8(buffer); boolean reducedDebug = buffer.readBoolean(); return new JoinGameMessage(id, gameMode, dimension, difficulty, maxPlayers, levelType, reducedDebug); }
@Override public FlowRequestData decode(ByteBuf source) { if (source.readableBytes() >= 12) { FlowRequestData requestData = new FlowRequestData() .setFlowId(source.readLong()) .setCount(source.readInt()); if (source.readableBytes() >= 1) { requestData.setPriority(source.readBoolean()); } return requestData; } return null; } }
@Override public CraftRecipeRequestMessage decode(ByteBuf buf) throws IOException { int windowId = buf.readByte(); int recipeId = ByteBufUtils.readVarInt(buf); boolean makeAll = buf.readBoolean(); return new CraftRecipeRequestMessage(windowId, recipeId, makeAll); }
@Override public RelativeEntityPositionRotationMessage decode(ByteBuf buf) throws IOException { int id = ByteBufUtils.readVarInt(buf); short x = buf.readShort(); short y = buf.readShort(); short z = buf.readShort(); int rotation = buf.readByte(); int pitch = buf.readByte(); boolean ground = buf.readBoolean(); return new RelativeEntityPositionRotationMessage(id, x, y, z, rotation, pitch, ground); }
@Override public EntityTeleportMessage decode(ByteBuf buf) throws IOException { int id = ByteBufUtils.readVarInt(buf); double x = buf.readDouble(); double y = buf.readDouble(); double z = buf.readDouble(); int rotation = buf.readByte(); int pitch = buf.readByte(); boolean ground = buf.readBoolean(); return new EntityTeleportMessage(id, x, y, z, rotation, pitch, ground); }
@Override public PlayerLookMessage decode(ByteBuf buffer) throws IOException { float yaw = buffer.readFloat(); float pitch = buffer.readFloat(); boolean onGround = buffer.readBoolean(); return new PlayerLookMessage(yaw, pitch, onGround); }
@Override public ClientSettingsMessage decode(ByteBuf buf) throws IOException { String locale = ByteBufUtils.readUTF8(buf); int viewDistance = buf.readByte(); int chatFlags = ByteBufUtils.readVarInt(buf); boolean colors = buf.readBoolean(); int skinFlags = buf.readUnsignedByte(); int hand = ByteBufUtils.readVarInt(buf); return new ClientSettingsMessage(locale, viewDistance, chatFlags, colors, skinFlags, hand); }
@Override public RelativeEntityPositionMessage decode(ByteBuf buf) throws IOException { int id = ByteBufUtils.readVarInt(buf); short deltaX = buf.readShort(); short deltaY = buf.readShort(); short deltaZ = buf.readShort(); boolean onGround = buf.readBoolean(); return new RelativeEntityPositionMessage(id, deltaX, deltaY, deltaZ, onGround); }
@Override public PlayerPositionLookMessage decode(ByteBuf buffer) throws IOException { double x = buffer.readDouble(); double y = buffer.readDouble(); double z = buffer.readDouble(); float yaw = buffer.readFloat(); float pitch = buffer.readFloat(); boolean onGround = buffer.readBoolean(); return new PlayerPositionLookMessage(onGround, x, y, z, yaw, pitch); }