Class 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 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

      public HollowMicroblockPart(MicroMaterial material)
  • Method Details

    • getHoleSize

      public int getHoleSize()
    • getMicroFactory

      public StandardMicroFactory getMicroFactory()
      Specified by:
      getMicroFactory in class StandardMicroblockPart
    • getBounds

      public codechicken.lib.vec.Cuboid6 getBounds()
      Specified by:
      getBounds in interface IMicroOcclusion
      Specified by:
      getBounds in interface IMicroShrinkRender
      Specified by:
      getBounds in class MicroblockPart
    • getShape

      public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.phys.shapes.CollisionContext context)
      Description copied from interface: MultiPart
      Maps to BlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext).

      The returned shape here will be used in keys of maps and such. Please ensure that it is cached within the part, to avoid memory churn.

      Specified by:
      getShape in interface MultiPart
    • getPartialOcclusionShape

      public net.minecraft.world.phys.shapes.VoxelShape getPartialOcclusionShape()
      Description copied from interface: PartialOcclusionPart
      The VoxelShape to use for Partial occlusion tests, this shape must not be occluded by any other PartialOcclusionPart's shape, unless PartialOcclusionPart.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:
      getPartialOcclusionShape in interface PartialOcclusionPart
      Overrides:
      getPartialOcclusionShape in class StandardMicroblockPart
      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: MultiPart
      Maps to BlockBehaviour.getCollisionShape(BlockState, BlockGetter, BlockPos, CollisionContext).

      The returned shape here will be used in keys of maps and such. Please ensure that it is cached within the part, to avoid memory churn.

      Specified by:
      getCollisionShape in interface MultiPart
    • getInteractionShape

      public net.minecraft.world.phys.shapes.VoxelShape getInteractionShape()
      Description copied from interface: MultiPart
      Maps to BlockBehaviour.getInteractionShape(BlockState, BlockGetter, BlockPos).

      The returned shape here will be used in keys of maps and such. Please ensure that it is cached within the part, to avoid memory churn.

      Specified by:
      getInteractionShape in interface MultiPart
    • getOcclusionShape

      public net.minecraft.world.phys.shapes.VoxelShape getOcclusionShape()
      Specified by:
      getOcclusionShape in interface NormalOcclusionPart
    • allowCompleteOcclusion

      public boolean allowCompleteOcclusion()
      Description copied from interface: PartialOcclusionPart
      Return true if this part may be completely obscured
      Specified by:
      allowCompleteOcclusion in interface PartialOcclusionPart
    • occlusionTest

      public boolean occlusionTest(MultiPart nPart)
      Description copied from interface: MultiPart
      Perform an occlusion test to determine weather this part and npart can 'fit' into this block space.
      Specified by:
      occlusionTest in interface MultiPart
      Specified by:
      occlusionTest in interface NormalOcclusionPart
      Overrides:
      occlusionTest in class StandardMicroblockPart
      Parameters:
      nPart - The part to run the test against.
      Returns:
      true if both this part and npart are able to share this block space.
    • redstoneConductionMap

      public int redstoneConductionMap()
      Description copied from interface: FacePart
      Return 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:
      redstoneConductionMap in interface FacePart
    • getRenderCuboids

      public Iterable<MaskedCuboid> getRenderCuboids(boolean isInventory)
      Overrides:
      getRenderCuboids in class StandardMicroblockPart
    • recalcBounds

      public void recalcBounds()
      Overrides:
      recalcBounds in class StandardMicroblockPart