use of com.loohp.interactionvisualizer.objectholders.BoundingBox in project InteractionVisualizer by LOOHP.
the class V1_11 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_11_R1.BlockPosition blockpos = new net.minecraft.server.v1_11_R1.BlockPosition(pos.getX(), pos.getY(), pos.getZ());
WorldServer world = ((CraftWorld) pos.getWorld()).getHandle();
AxisAlignedBB box = world.getType(blockpos).d(world, blockpos);
List<BoundingBox> boxes = new ArrayList<>(1);
boxes.add(new BoundingBox(box.a + pos.getX(), box.b + pos.getY(), box.c + pos.getZ(), box.d + pos.getX(), box.e + pos.getY(), box.f + pos.getZ()));
return boxes;
}
use of com.loohp.interactionvisualizer.objectholders.BoundingBox in project InteractionVisualizer by LOOHP.
the class V1_12 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_12_R1.BlockPosition blockpos = new net.minecraft.server.v1_12_R1.BlockPosition(pos.getX(), pos.getY(), pos.getZ());
WorldServer world = ((CraftWorld) pos.getWorld()).getHandle();
AxisAlignedBB box = world.getType(blockpos).d(world, blockpos);
List<BoundingBox> boxes = new ArrayList<>(1);
boxes.add(new BoundingBox(box.a + pos.getX(), box.b + pos.getY(), box.c + pos.getZ(), box.d + pos.getX(), box.e + pos.getY(), box.f + pos.getZ()));
return boxes;
}
use of com.loohp.interactionvisualizer.objectholders.BoundingBox in project InteractionVisualizer by LOOHP.
the class V1_13_1 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_13_R2.BlockPosition blockpos = new net.minecraft.server.v1_13_R2.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());
}
use of com.loohp.interactionvisualizer.objectholders.BoundingBox in project InteractionVisualizer by LOOHP.
the class V1_14 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_14_R1.BlockPosition blockpos = new net.minecraft.server.v1_14_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());
}
use of com.loohp.interactionvisualizer.objectholders.BoundingBox in project InteractionVisualizer by LOOHP.
the class V1_15 method getBoundingBoxes.
public List<BoundingBox> getBoundingBoxes(BlockPosition pos) {
net.minecraft.server.v1_15_R1.BlockPosition blockpos = new net.minecraft.server.v1_15_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