Search in sources :

Example 1 with SpawnPaintingMessage

use of net.glowstone.net.message.play.entity.SpawnPaintingMessage in project Glowstone by GlowstoneMC.

the class SpawnPaintingCodec method decode.

@Override
public SpawnPaintingMessage decode(ByteBuf buf) throws IOException {
    int id = ByteBufUtils.readVarInt(buf);
    String title = ByteBufUtils.readUTF8(buf);
    BlockVector vector = GlowBufUtils.readBlockPosition(buf);
    int facing = buf.readByte();
    return new SpawnPaintingMessage(id, title, vector.getBlockX(), vector.getBlockY(), vector.getBlockZ(), facing);
}
Also used : SpawnPaintingMessage(net.glowstone.net.message.play.entity.SpawnPaintingMessage) BlockVector(org.bukkit.util.BlockVector)

Aggregations

SpawnPaintingMessage (net.glowstone.net.message.play.entity.SpawnPaintingMessage)1 BlockVector (org.bukkit.util.BlockVector)1