Class VoxelShapeComponentsFactoryHandlerParts.Component
java.lang.Object
org.cyclops.integrateddynamics.block.shapes.VoxelShapeComponentsFactoryHandlerParts.Component
- All Implemented Interfaces:
- VoxelShapeComponents.IComponent
- Enclosing class:
- VoxelShapeComponentsFactoryHandlerParts
public static class VoxelShapeComponentsFactoryHandlerParts.Component
extends Object
implements VoxelShapeComponents.IComponent
- 
Constructor SummaryConstructorsConstructorDescriptionComponent(net.minecraft.core.Direction direction, IPartContainer partContainer) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleandestroy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, boolean saveState) Destroy this componentnet.minecraft.world.item.ItemStackgetCloneItemStack(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Get the pick block item.getPart()net.minecraft.core.Directionnet.minecraft.world.phys.shapes.VoxelShapegetShape(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) booleannet.minecraft.world.InteractionResultonBlockActivated(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.
- 
Constructor Details- 
Component
 
- 
- 
Method Details- 
getPart
- 
getStateIdpublic String getStateId(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos blockPos) - Specified by:
- getStateIdin interface- VoxelShapeComponents.IComponent
- Parameters:
- blockState- The block state.
- world- The world.
- blockPos- The position.
- Returns:
- Unique identifier for the component's state.
 
- 
getShapepublic 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.IComponentGet the shape of this component.- Specified by:
- getShapein interface- VoxelShapeComponents.IComponent
- Parameters:
- blockState- The block state.
- world- The world.
- blockPos- The position.
- selectionContext- The selection context.
- Returns:
- The shape.
 
- 
getCloneItemStackpublic net.minecraft.world.item.ItemStack getCloneItemStack(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Description copied from interface:VoxelShapeComponents.IComponentGet the pick block item.- Specified by:
- getCloneItemStackin interface- VoxelShapeComponents.IComponent
- Parameters:
- world- The world
- pos- The position
- Returns:
- The item.
 
- 
destroypublic 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.IComponentDestroy this component- Specified by:
- destroyin 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
 
- 
onBlockActivatedpublic 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.IComponentWhen this component has been activated.- Specified by:
- onBlockActivatedin 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:
- getRaytraceDirectionin interface- VoxelShapeComponents.IComponent
- Returns:
- The direction this component points at.
 
- 
isRaytraceLastForFacepublic boolean isRaytraceLastForFace()- Specified by:
- isRaytraceLastForFacein interface- VoxelShapeComponents.IComponent
- Returns:
- If this component should only be raytraced if no other components matched for this face.
 
 
-