Search in sources :

Example 1 with BlockBreakAnimationMessage

use of net.glowstone.net.message.play.game.BlockBreakAnimationMessage in project Glowstone by GlowstoneMC.

the class BlockBreakAnimationCodec method decode.

@Override
public BlockBreakAnimationMessage decode(ByteBuf buf) throws IOException {
    int entityId = ByteBufUtils.readVarInt(buf);
    BlockVector vector = GlowBufUtils.readBlockPosition(buf);
    int destroyStage = buf.readByte();
    return new BlockBreakAnimationMessage(entityId, vector.getBlockX(), vector.getBlockY(), vector.getBlockZ(), destroyStage);
}
Also used : BlockVector(org.bukkit.util.BlockVector) BlockBreakAnimationMessage(net.glowstone.net.message.play.game.BlockBreakAnimationMessage)

Aggregations

BlockBreakAnimationMessage (net.glowstone.net.message.play.game.BlockBreakAnimationMessage)1 BlockVector (org.bukkit.util.BlockVector)1