@Override public float readFloat() { return buf.readFloat(); }
@Override public float readFloat() { return buf.readFloat(); }
@Override public float readFloat() { return buf.readFloat(); }
@Override public float readFloat() { return byteBuf.readFloat(); }
@Override public float readFloat() { checkReadableBytes(4); return buffer.readFloat(); }
@Override public float readFloat() { checkReadableBytes(4); return buffer.readFloat(); }
@Override public Object read(final PostgreSQLPacketPayload payload) { return payload.getByteBuf().readFloat(); }
@Override public float readFloat() { checkReadableBytes(4); return buffer.readFloat(); }
@Override public SteerVehicleMessage decode(ByteBuf buf) throws IOException { float sideways = buf.readFloat(); float forward = buf.readFloat(); int flags = buf.readUnsignedByte(); boolean jump = (flags & 0x1) != 0; boolean unmount = (flags & 0x2) != 0; return new SteerVehicleMessage(sideways, forward, jump, unmount); }
@Override public StateChangeMessage decode(ByteBuf buffer) throws IOException { int reason = buffer.readByte(); float value = buffer.readFloat(); return new StateChangeMessage(reason, value); }
return true; case ClusterConstants.PARAM_TYPE_FLOAT: params.add(source.readFloat()); return true; case ClusterConstants.PARAM_TYPE_BYTE:
@Override public BlockPlacementMessage decode(ByteBuf buf) throws IOException { BlockVector pos = GlowBufUtils.readBlockPosition(buf); int direction = buf.readByte(); int hand = ByteBufUtils.readVarInt(buf); float cursorX = buf.readFloat(); float cursorY = buf.readFloat(); float cursorZ = buf.readFloat(); return new BlockPlacementMessage(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ(), direction, hand, cursorX, cursorY, cursorZ); }
@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); }
@Override public PositionRotationMessage decode(ByteBuf buffer) throws IOException { double x = buffer.readDouble(); double y = buffer.readDouble(); double z = buffer.readDouble(); float rotation = buffer.readFloat(); float pitch = buffer.readFloat(); int flags = buffer.readUnsignedByte(); int teleportId = ByteBufUtils.readVarInt(buffer); return new PositionRotationMessage(x, y, z, rotation, pitch, flags, teleportId); }
@Override public ExperienceMessage decode(ByteBuf buffer) throws IOException { float barValue = buffer.readFloat(); int level = ByteBufUtils.readVarInt(buffer); int totalExp = ByteBufUtils.readVarInt(buffer); return new ExperienceMessage(barValue, level, totalExp); }
@Override public InteractEntityMessage decode(ByteBuf buf) throws IOException { int id = ByteBufUtils.readVarInt(buf); int action = ByteBufUtils.readVarInt(buf); if (action == Action.INTERACT_AT.ordinal()) { float targetX = buf.readFloat(); float targetY = buf.readFloat(); float targetZ = buf.readFloat(); int hand = ByteBufUtils.readVarInt(buf); return new InteractEntityMessage(id, action, targetX, targetY, targetZ, hand); } else if (action == Action.INTERACT.ordinal()) { int hand = ByteBufUtils.readVarInt(buf); return new InteractEntityMessage(id, action, hand); } return new InteractEntityMessage(id, action); }