Package codechicken.lib.raytracer
Class MultiIndexedVoxelShape
java.lang.Object
net.minecraft.world.phys.shapes.VoxelShape
codechicken.lib.raytracer.MultiIndexedVoxelShape
public class MultiIndexedVoxelShape
extends net.minecraft.world.phys.shapes.VoxelShape
A VoxelShape implementation, produces a
VoxelShapeBlockHitResult when ray traced.
Whilst similar to IndexedVoxelShape, will ray trace each sub-component provided, returning the closest.
The sub-component will have its outline automatically rendered appropriately.
Created by covers1624 on 5/12/20.
-
Field Summary
Fields inherited from class net.minecraft.world.phys.shapes.VoxelShape
shape -
Constructor Summary
ConstructorsConstructorDescriptionMultiIndexedVoxelShape(com.google.common.collect.ImmutableSet<IndexedVoxelShape> shapes) Construct a MultiIndexedVoxelShape, using the combination of all the sub-components as this VoxelShape.MultiIndexedVoxelShape(net.minecraft.world.phys.shapes.VoxelShape merged, com.google.common.collect.ImmutableSet<IndexedVoxelShape> shapes) Constructs a MultiIndexedVoxelShape, using the provided VoxelShape as this shape, whilst still RayTracing against all the sub-components. -
Method Summary
Methods inherited from class net.minecraft.world.phys.shapes.VoxelShape
bounds, closestPointTo, collide, collideX, findIndex, forAllBoxes, forAllEdges, get, getFaceShape, isEmpty, max, max, min, min, move, optimize, toAabbs, toString
-
Constructor Details
-
MultiIndexedVoxelShape
Construct a MultiIndexedVoxelShape, using the combination of all the sub-components as this VoxelShape.- Parameters:
shapes- The sub-components.
-
MultiIndexedVoxelShape
public MultiIndexedVoxelShape(net.minecraft.world.phys.shapes.VoxelShape merged, com.google.common.collect.ImmutableSet<IndexedVoxelShape> shapes) Constructs a MultiIndexedVoxelShape, using the provided VoxelShape as this shape, whilst still RayTracing against all the sub-components.- Parameters:
merged- The base shape.shapes- The sub-components.
-
-
Method Details
-
getCoords
public it.unimi.dsi.fastutil.doubles.DoubleList getCoords(net.minecraft.core.Direction.Axis axis) - Specified by:
getCoordsin classnet.minecraft.world.phys.shapes.VoxelShape
-
clip
@Nullable public VoxelShapeBlockHitResult clip(net.minecraft.world.phys.Vec3 start, net.minecraft.world.phys.Vec3 end, net.minecraft.core.BlockPos pos) - Overrides:
clipin classnet.minecraft.world.phys.shapes.VoxelShape
-