Class VoxelShapeComponentsFactoryHandlerCableCenter.Component

java.lang.Object
org.cyclops.integrateddynamics.block.shapes.VoxelShapeComponentsFactoryHandlerCableCenter.Component
All Implemented Interfaces:
VoxelShapeComponents.IComponent
Direct Known Subclasses:
VoxelShapeComponentsFactoryHandlerCableConnections.Component
Enclosing class:
VoxelShapeComponentsFactoryHandlerCableCenter

public static class VoxelShapeComponentsFactoryHandlerCableCenter.Component extends Object implements VoxelShapeComponents.IComponent
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    destroy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean saveState)
    Destroy this component
    net.minecraft.client.resources.model.BakedModel
    getBreakingBaseModel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
     
    net.minecraft.world.item.ItemStack
    getCloneItemStack(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
    Get the pick block item.
    net.minecraft.core.Direction
     
    net.minecraft.world.phys.shapes.VoxelShape
    getShape(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos blockPos, net.minecraft.world.phys.shapes.CollisionContext selectionContext)
    Get the shape of this component.
    getStateId(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos blockPos)
     
    boolean
     
    net.minecraft.world.InteractionResult
    onBlockActivated(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, BlockRayTraceResultComponent hit)
    When this component has been activated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Component

      public Component()
  • Method Details

    • getStateId

      public String getStateId(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos blockPos)
      Specified by:
      getStateId in interface VoxelShapeComponents.IComponent
      Parameters:
      blockState - The block state.
      world - The world.
      blockPos - The position.
      Returns:
      Unique identifier for the component's state.
    • getShape

      public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos blockPos, net.minecraft.world.phys.shapes.CollisionContext selectionContext)
      Description copied from interface: VoxelShapeComponents.IComponent
      Get the shape of this component.
      Specified by:
      getShape in interface VoxelShapeComponents.IComponent
      Parameters:
      blockState - The block state.
      world - The world.
      blockPos - The position.
      selectionContext - The selection context.
      Returns:
      The shape.
    • getCloneItemStack

      public net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
      Description copied from interface: VoxelShapeComponents.IComponent
      Get the pick block item.
      Specified by:
      getCloneItemStack in interface VoxelShapeComponents.IComponent
      Parameters:
      world - The world
      pos - The position
      Returns:
      The item.
    • destroy

      public boolean destroy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean saveState)
      Description copied from interface: VoxelShapeComponents.IComponent
      Destroy this component
      Specified by:
      destroy in interface VoxelShapeComponents.IComponent
      Parameters:
      world - The world
      pos - The position
      player - The player destroying the component.
      saveState - If the component state should be saved in the dropped item.
      Returns:
      If the complete block was destroyed
    • getBreakingBaseModel

      @Nullable public net.minecraft.client.resources.model.BakedModel getBreakingBaseModel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
      Specified by:
      getBreakingBaseModel in interface VoxelShapeComponents.IComponent
      Parameters:
      world - The world
      pos - The position
      Returns:
      The model that will be used to render the breaking overlay.
    • onBlockActivated

      public net.minecraft.world.InteractionResult onBlockActivated(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, BlockRayTraceResultComponent hit)
      Description copied from interface: VoxelShapeComponents.IComponent
      When this component has been activated.
      Specified by:
      onBlockActivated in interface VoxelShapeComponents.IComponent
      Parameters:
      state - The block state.
      world - The world.
      blockPos - The position.
      player - The player.
      hand - The hand.
      hit - The ray trace result.
      Returns:
      Action result.
    • getRaytraceDirection

      @Nullable public net.minecraft.core.Direction getRaytraceDirection()
      Specified by:
      getRaytraceDirection in interface VoxelShapeComponents.IComponent
      Returns:
      The direction this component points at.
    • isRaytraceLastForFace

      public boolean isRaytraceLastForFace()
      Specified by:
      isRaytraceLastForFace in interface VoxelShapeComponents.IComponent
      Returns:
      If this component should only be raytraced if no other components matched for this face.