use of net.minecraft.client.network.ClientPlayNetworkHandler in project Client by MatHax.
the class GhostCommand method execute.
private void execute(int radius) {
ClientPlayNetworkHandler conn = mc.getNetworkHandler();
if (conn == null)
return;
BlockPos pos = mc.player.getBlockPos();
for (int dx = -radius; dx <= radius; dx++) for (int dy = -radius; dy <= radius; dy++) for (int dz = -radius; dz <= radius; dz++) {
PlayerActionC2SPacket packet = new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.ABORT_DESTROY_BLOCK, new BlockPos(pos.getX() + dx, pos.getY() + dy, pos.getZ() + dz), Direction.UP);
conn.sendPacket(packet);
}
}
Aggregations