Package codechicken.multipart.api.part
Interface PartialOcclusionPart
- All Superinterfaces:
MultiPart
- All Known Implementing Classes:
CornerMicroblockPart,EdgeMicroblockPart,FaceMicroblockPart,HollowMicroblockPart,PostMicroblockPart,StandardMicroblockPart
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 Summary
Modifier and TypeMethodDescriptiondefault booleanReturn true if this part may be completely obscurednet.minecraft.world.phys.shapes.VoxelShapeThe VoxelShape to use for Partial occlusion tests, this shape must not be occluded by any otherPartialOcclusionPart's shape, unlessallowCompleteOcclusion()returns true.Methods inherited from interface codechicken.multipart.api.part.MultiPart
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, capCache, click, getBlockSupportShape, getCloneStack, getCollisionShape, getDrops, getExplosionResistance, getInteractionShape, getLightEmission, getModelData, getPlacementSound, getRenderBounds, getRenderOcclusionShape, getShape, getStrength, getType, getVisualShape, harvest, hasLevel, hasTile, invalidateConvertedTile, level, load, occlusionTest, onAdded, onChunkLoad, onChunkUnload, onConverted, onEntityCollision, onEntityStanding, onMoved, onNeighborBlockChanged, onPartChanged, onRemoved, onWorldJoin, onWorldSeparate, pos, preRemove, readDesc, readUpdate, save, scheduledTick, scheduleTick, sendUpdate, tile, useItemOn, useWithoutItem, writeDesc
-
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 otherPartialOcclusionPart's shape, unlessallowCompleteOcclusion()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
-