Package codechicken.multipart.api
Class NormalOcclusionTest
java.lang.Object
codechicken.multipart.api.NormalOcclusionTest
Utilities for performing a 'normal' occlusion test, where no Shape may obstruct the other in any capacity.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NormalOcclusionPartof(net.minecraft.world.phys.shapes.VoxelShape shape) Wraps the givenVoxelShapeto aNormalOcclusionPartfor the purpose of occlusion testing.static booleantest(NormalOcclusionPart part1, MultiPart part2) Test if part1 is occluded by part2 in any way.
-
Constructor Details
-
NormalOcclusionTest
public NormalOcclusionTest()
-
-
Method Details
-
test
Test if part1 is occluded by part2 in any way.Checks both
NormalOcclusionPart.getOcclusionShape()andPartialOcclusionPart.getPartialOcclusionShape()on part2.- Parameters:
part1- The first part.part2- The other part.- Returns:
- If part1 is occluded by part2 in any way.
-
of
Wraps the givenVoxelShapeto aNormalOcclusionPartfor the purpose of occlusion testing.- Parameters:
shape- The shape.- Returns:
- The wrapped VoxelShape part.
-