10111213141516
public final class SpawnPositionCodec implements Codec<SpawnPositionMessage> { @Override public SpawnPositionMessage decode(ByteBuf buffer) throws IOException { BlockVector pos = GlowBufUtils.readBlockPosition(buffer); return new SpawnPositionMessage(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()); }
16171819202122
@Override public SpawnPositionMessage decode(ChannelBuffer buffer) throws IOException { int x = buffer.readInt(); int y = buffer.readInt(); int z = buffer.readInt(); return new SpawnPositionMessage(x, y, z); }