use of com.github.steveice10.mc.protocol.data.game.world.block.ExplodedBlockRecord in project DragonProxy by DragonetMC.
the class PCExplosionTranslator method translate.
@Override
public PEPacket[] translate(UpstreamSession session, ServerExplosionPacket packet) {
ExplodePacket pk = new ExplodePacket();
pk.position = new Vector3F(packet.getX(), packet.getY(), packet.getZ());
pk.radius = packet.getRadius();
pk.destroyedBlocks = new ArrayList<>(packet.getExploded().size());
for (ExplodedBlockRecord record : packet.getExploded()) pk.destroyedBlocks.add(new BlockPosition(record.getX(), record.getY(), record.getZ()));
return new PEPacket[] { pk };
}
Aggregations