use of net.glowstone.net.message.play.game.BlockActionMessage in project Glowstone by GlowstoneMC.
the class ChestEntity method update.
@Override
public void update(GlowPlayer player) {
super.update(player);
player.getSession().send(new BlockActionMessage(block.getX(), block.getY(), block.getZ(), 1, viewers == 0 ? 0 : 1, block.getTypeId()));
}
use of net.glowstone.net.message.play.game.BlockActionMessage in project Glowstone by GlowstoneMC.
the class BlockActionCodec method decode.
@Override
public BlockActionMessage decode(ByteBuf buf) throws IOException {
BlockVector vector = GlowBufUtils.readBlockPosition(buf);
int data1 = buf.readByte();
int data2 = buf.readByte();
int blockType = ByteBufUtils.readVarInt(buf);
return new BlockActionMessage(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ(), data1, data2, blockType);
}
Aggregations