Interface PartialOcclusionPart

All Superinterfaces:
MultiPart
All Known Implementing Classes:
CornerMicroblockPart, EdgeMicroblockPart, FaceMicroblockPart, HollowMicroblockPart, PostMicroblockPart, StandardMicroblockPart

public interface PartialOcclusionPart extends MultiPart
This class provides a special type of occlusion model used by microblocks. The partial occlusion test defines bounding boxes that may intersect, so long as no part is completely obscured by a combination of the others. Partial bounding boxes may not intersect with normal bounding boxes from NormalOcclusionPart

This part marker is managed by the mixin trait TPartialOcclusionTile.

  • Method Details

    • getPartialOcclusionShape

      net.minecraft.world.phys.shapes.VoxelShape getPartialOcclusionShape()
      The VoxelShape to use for Partial occlusion tests, this shape must not be occluded by any other PartialOcclusionPart's shape, unless allowCompleteOcclusion() returns true.

      It is expected that this method return some form of cached instance that does NOT change each call, unless some internal state has changed.

      If this shape changes after initial placement, call TileMultipart.markShapeChange().

      Returns:
      the VoxelShape for partial occlusion tests.
    • allowCompleteOcclusion

      default boolean allowCompleteOcclusion()
      Return true if this part may be completely obscured