use of net.minecraft.server.v1_16_R3.VoxelShape in project InteractionVisualizer by LOOHP.
the class V1_13 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_13_R1.BlockPosition blockpos = new net.minecraft.server.v1_13_R1.BlockPosition(pos.getX(), pos.getY(), pos.getZ());
WorldServer world = ((CraftWorld) pos.getWorld()).getHandle();
VoxelShape shape = world.getType(blockpos).g(world, blockpos);
return shape.d().stream().map(each -> new BoundingBox(each.a + pos.getX(), each.b + pos.getY(), each.c + pos.getZ(), each.d + pos.getX(), each.e + pos.getY(), each.f + pos.getZ())).collect(Collectors.toList());
}
use of net.minecraft.server.v1_16_R3.VoxelShape in project InteractionVisualizer by LOOHP.
the class V1_16 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_16_R1.BlockPosition blockpos = new net.minecraft.server.v1_16_R1.BlockPosition(pos.getX(), pos.getY(), pos.getZ());
WorldServer world = ((CraftWorld) pos.getWorld()).getHandle();
VoxelShape shape = world.getType(blockpos).getShape(world, blockpos);
return shape.d().stream().map(each -> new BoundingBox(each.minX + pos.getX(), each.minY + pos.getY(), each.minZ + pos.getZ(), each.maxX + pos.getX(), each.maxY + pos.getY(), each.maxZ + pos.getZ())).collect(Collectors.toList());
}
Aggregations