Package codechicken.microblock.part.edge
Class PostMicroblockPart
java.lang.Object
codechicken.multipart.api.part.BaseMultipart
codechicken.microblock.part.MicroblockPart
codechicken.microblock.part.edge.PostMicroblockPart
- All Implemented Interfaces:
MultiPart,NormalOcclusionPart,PartialOcclusionPart
public class PostMicroblockPart
extends MicroblockPart
implements PartialOcclusionPart, NormalOcclusionPart
Created by covers1624 on 21/10/22.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final codechicken.lib.vec.Cuboid6[]static final net.minecraft.world.phys.shapes.VoxelShape[]@Nullable codechicken.lib.vec.Cuboid6@Nullable codechicken.lib.vec.Cuboid6Fields inherited from class codechicken.microblock.part.MicroblockPart
material, shape -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncodechicken.lib.vec.Cuboid6intThe Micro factory that controls placement from item stack form.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.voidonAdded()Called when this part is added to the block space.voidonPartChanged(@Nullable MultiPart part) Called when a part is added or removed from this block space.voidreadUpdate(codechicken.lib.data.MCDataInput packet) Read a packet sent viaMultiPart.sendUpdate(java.util.function.Consumer<codechicken.lib.data.MCDataOutput>).voidMethods 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.multipart.api.part.MultiPart
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, capCache, click, getBlockSupportShape, getCloneStack, getCollisionShape, getDrops, getExplosionResistance, getInteractionShape, getLightEmission, getModelData, getPlacementSound, getRenderBounds, getRenderOcclusionShape, getStrength, getType, getVisualShape, harvest, hasLevel, hasTile, invalidateConvertedTile, level, load, onChunkLoad, onChunkUnload, onConverted, onEntityCollision, onEntityStanding, onMoved, onNeighborBlockChanged, onRemoved, onWorldJoin, onWorldSeparate, pos, preRemove, readDesc, save, scheduledTick, scheduleTick, sendUpdate, tile, useItemOn, useWithoutItem, writeDescMethods inherited from interface codechicken.multipart.api.part.PartialOcclusionPart
allowCompleteOcclusion
-
Field Details
-
aBounds
public static final codechicken.lib.vec.Cuboid6[] aBounds -
aShapes
public static final net.minecraft.world.phys.shapes.VoxelShape[] aShapes -
renderBounds1
@Nullable public @Nullable codechicken.lib.vec.Cuboid6 renderBounds1 -
renderBounds2
@Nullable public @Nullable codechicken.lib.vec.Cuboid6 renderBounds2
-
-
Constructor Details
-
PostMicroblockPart
-
-
Method Details
-
getMicroFactory
- Specified by:
getMicroFactoryin classMicroblockPart
-
getBounds
public codechicken.lib.vec.Cuboid6 getBounds()- 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(). -
getItemFactoryId
public int getItemFactoryId()Description copied from class:MicroblockPartThe Micro factory that controls placement from item stack form.- Specified by:
getItemFactoryIdin classMicroblockPart- Returns:
- The id of said factory.
-
getRenderCuboids
- Specified by:
getRenderCuboidsin classMicroblockPart
-
getOcclusionShape
public net.minecraft.world.phys.shapes.VoxelShape getOcclusionShape()- Specified by:
getOcclusionShapein interfaceNormalOcclusionPart
-
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- Returns:
- the VoxelShape for partial occlusion tests.
-
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- Parameters:
nPart- The part to run the test against.- Returns:
trueif both this part andnpartare able to share this block space.
-
onPartChanged
Description copied from interface:MultiPartCalled when a part is added or removed from this block space.- Specified by:
onPartChangedin interfaceMultiPart- Parameters:
part- The part which changed. May benullif multiple parts are changed.
-
onAdded
public void onAdded()Description copied from interface:MultiPartCalled when this part is added to the block space. -
readUpdate
public void readUpdate(codechicken.lib.data.MCDataInput packet) Description copied from interface:MultiPartRead a packet sent viaMultiPart.sendUpdate(java.util.function.Consumer<codechicken.lib.data.MCDataOutput>).- Specified by:
readUpdatein interfaceMultiPart- Overrides:
readUpdatein classMicroblockPart- Parameters:
packet- THe packet to read.
-
recalcBounds
public void recalcBounds()
-