Search in sources :

Example 1 with BlockEntityDataPacket

use of org.dragonet.protocol.packets.BlockEntityDataPacket in project DragonProxy by DragonetMC.

the class PCUpdateTileEntityPacketTranslator method translate.

public PEPacket[] translate(UpstreamSession session, ServerUpdateTileEntityPacket packet) {
    BlockEntityDataPacket data = new BlockEntityDataPacket();
    data.blockPosition = new BlockPosition(packet.getPosition());
    data.tag = ItemBlockTranslator.translateBlockEntityToPE(packet.getNBT());
    return new PEPacket[] { data };
}
Also used : BlockPosition(org.dragonet.common.maths.BlockPosition) PEPacket(org.dragonet.protocol.PEPacket) BlockEntityDataPacket(org.dragonet.protocol.packets.BlockEntityDataPacket)

Aggregations

BlockPosition (org.dragonet.common.maths.BlockPosition)1 PEPacket (org.dragonet.protocol.PEPacket)1 BlockEntityDataPacket (org.dragonet.protocol.packets.BlockEntityDataPacket)1