Class HollowMicroblockPart
java.lang.Object
codechicken.multipart.api.part.BaseMultipart
codechicken.microblock.part.MicroblockPart
codechicken.microblock.part.StandardMicroblockPart
codechicken.microblock.part.hollow.HollowMicroblockPart
- All Implemented Interfaces:
IMicroOcclusion,IMicroShrinkRender,FacePart,MultiPart,NormalOcclusionPart,PartialOcclusionPart,SlottedPart
public class HollowMicroblockPart
extends StandardMicroblockPart
implements FacePart, NormalOcclusionPart
Created by covers1624 on 20/10/22.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final codechicken.lib.vec.Cuboid6[]static final codechicken.lib.vec.Cuboid6[][]static final net.minecraft.world.phys.shapes.VoxelShape[]Fields inherited from class codechicken.microblock.part.StandardMicroblockPart
renderBounds, renderMaskFields inherited from class codechicken.microblock.part.MicroblockPart
material, shape -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if this part may be completely obscuredcodechicken.lib.vec.Cuboid6net.minecraft.world.phys.shapes.VoxelShapegetCollisionShape(net.minecraft.world.phys.shapes.CollisionContext context) Maps toBlockBehaviour.getCollisionShape(BlockState, BlockGetter, BlockPos, CollisionContext).intnet.minecraft.world.phys.shapes.VoxelShapeMaps toBlockBehaviour.getInteractionShape(BlockState, BlockGetter, BlockPos).net.minecraft.world.phys.shapes.VoxelShapenet.minecraft.world.phys.shapes.VoxelShapeThe VoxelShape to use for Partial occlusion tests, this shape must not be occluded by any otherPartialOcclusionPart's shape, unlessPartialOcclusionPart.allowCompleteOcclusion()returns true.getRenderCuboids(boolean isInventory) net.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.phys.shapes.CollisionContext context) Maps toBlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext).booleanocclusionTest(MultiPart nPart) Perform an occlusion test to determine weather this part andnpartcan 'fit' into this block space.voidintReturn the redstone conduction map for which signal can pass through this part on the face.Methods inherited from class codechicken.microblock.part.StandardMicroblockPart
getItemFactoryId, getPriorityClass, getSlot, getSlotMask, onAdded, onPartChanged, readUpdateMethods inherited from class codechicken.microblock.part.MicroblockPart
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, getCloneStack, getDrops, getExplosionResistance, getLightEmission, getMaterial, getShapeSlot, getSize, getStrength, getType, isTransparent, load, readDesc, save, sendShapeUpdate, setShape, writeDescMethods inherited from class codechicken.multipart.api.part.BaseMultipart
bind, hasTile, tileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface codechicken.microblock.part.IMicroOcclusion
getMaterial, getSizeMethods inherited from interface codechicken.microblock.part.IMicroShrinkRender
getSize, isTransparentMethods inherited from interface codechicken.multipart.api.part.MultiPart
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, capCache, click, getBlockSupportShape, getCloneStack, getDrops, getExplosionResistance, getLightEmission, getModelData, getPlacementSound, getRenderBounds, getRenderOcclusionShape, getStrength, getType, getVisualShape, harvest, hasLevel, hasTile, invalidateConvertedTile, level, load, onAdded, onChunkLoad, onChunkUnload, onConverted, onEntityCollision, onEntityStanding, onMoved, onNeighborBlockChanged, onPartChanged, onRemoved, onWorldJoin, onWorldSeparate, pos, preRemove, readDesc, readUpdate, save, scheduledTick, scheduleTick, sendUpdate, tile, useItemOn, useWithoutItem, writeDescMethods inherited from interface codechicken.multipart.api.part.SlottedPart
getSlotMask
-
Field Details
-
pBoxes
public static final codechicken.lib.vec.Cuboid6[][] pBoxes -
pShapes
public static final net.minecraft.world.phys.shapes.VoxelShape[] pShapes -
occBounds
public static final codechicken.lib.vec.Cuboid6[] occBounds
-
-
Constructor Details
-
HollowMicroblockPart
-
-
Method Details
-
getHoleSize
public int getHoleSize() -
getMicroFactory
- Specified by:
getMicroFactoryin classStandardMicroblockPart
-
getBounds
public codechicken.lib.vec.Cuboid6 getBounds()- Specified by:
getBoundsin interfaceIMicroOcclusion- Specified by:
getBoundsin interfaceIMicroShrinkRender- Specified by:
getBoundsin classMicroblockPart
-
getShape
public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.phys.shapes.CollisionContext context) Description copied from interface:MultiPartMaps toBlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext).If this shape changes after initial placement, call
TileMultipart.markShapeChange(). -
getPartialOcclusionShape
public net.minecraft.world.phys.shapes.VoxelShape getPartialOcclusionShape()Description copied from interface:PartialOcclusionPartThe VoxelShape to use for Partial occlusion tests, this shape must not be occluded by any otherPartialOcclusionPart's shape, unlessPartialOcclusionPart.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().- Specified by:
getPartialOcclusionShapein interfacePartialOcclusionPart- Overrides:
getPartialOcclusionShapein classStandardMicroblockPart- Returns:
- the VoxelShape for partial occlusion tests.
-
getCollisionShape
public net.minecraft.world.phys.shapes.VoxelShape getCollisionShape(net.minecraft.world.phys.shapes.CollisionContext context) Description copied from interface:MultiPartMaps toBlockBehaviour.getCollisionShape(BlockState, BlockGetter, BlockPos, CollisionContext).If this shape changes after initial placement, call
TileMultipart.markShapeChange().- Specified by:
getCollisionShapein interfaceMultiPart
-
getInteractionShape
public net.minecraft.world.phys.shapes.VoxelShape getInteractionShape()Description copied from interface:MultiPartMaps toBlockBehaviour.getInteractionShape(BlockState, BlockGetter, BlockPos).If this shape changes after initial placement, call
TileMultipart.markShapeChange().- Specified by:
getInteractionShapein interfaceMultiPart
-
getOcclusionShape
public net.minecraft.world.phys.shapes.VoxelShape getOcclusionShape()- Specified by:
getOcclusionShapein interfaceNormalOcclusionPart
-
allowCompleteOcclusion
public boolean allowCompleteOcclusion()Description copied from interface:PartialOcclusionPartReturn true if this part may be completely obscured- Specified by:
allowCompleteOcclusionin interfacePartialOcclusionPart
-
occlusionTest
Description copied from interface:MultiPartPerform an occlusion test to determine weather this part andnpartcan 'fit' into this block space.- Specified by:
occlusionTestin interfaceMultiPart- Specified by:
occlusionTestin interfaceNormalOcclusionPart- Overrides:
occlusionTestin classStandardMicroblockPart- Parameters:
nPart- The part to run the test against.- Returns:
trueif both this part andnpartare able to share this block space.
-
redstoneConductionMap
public int redstoneConductionMap()Description copied from interface:FacePartReturn the redstone conduction map for which signal can pass through this part on the face. Eg, hollow covers return 0x10 as signal can pass through the center hole.- Specified by:
redstoneConductionMapin interfaceFacePart
-
getRenderCuboids
- Overrides:
getRenderCuboidsin classStandardMicroblockPart
-
recalcBounds
public void recalcBounds()- Overrides:
recalcBoundsin classStandardMicroblockPart
-