Package petrolpark.mc.petrolsparts.util
Class ShaftHelper
java.lang.Object
petrolpark.mc.petrolsparts.util.ShaftHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.Direction.AxisgetAxisForShaftPlacementHelper(net.minecraft.world.level.block.state.BlockState state) static booleanisShaftLike(net.minecraft.world.level.block.state.BlockState state) static booleanisShaftLikeAssemblage(net.minecraft.world.level.block.state.BlockState state) static booleanisStateForShaftPlacementHelper(net.minecraft.world.level.block.state.BlockState state) static booleanisTargetingShaftPart(net.minecraft.core.BlockPos pos, petrolpark.mc.library.core.world.block.multiPart.MultiPartBlock<?> block, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player)
-
Field Details
-
SHAFT_PLACEMENT_HELPER_ACTIVATION_STATE_PREDICATE
public static final Predicate<net.minecraft.world.level.block.state.BlockState> SHAFT_PLACEMENT_HELPER_ACTIVATION_STATE_PREDICATE -
SHAFT_PLACEMENT_HELPER_STATE_PREDICATE
public static final Predicate<net.minecraft.world.level.block.state.BlockState> SHAFT_PLACEMENT_HELPER_STATE_PREDICATE -
SHAFT_PLACEMENT_HELPER_AXIS_FUNCTION
public static final Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction.Axis> SHAFT_PLACEMENT_HELPER_AXIS_FUNCTION
-
-
Constructor Details
-
ShaftHelper
public ShaftHelper()
-
-
Method Details
-
isShaftLikeAssemblage
public static boolean isShaftLikeAssemblage(net.minecraft.world.level.block.state.BlockState state) -
isTargetingShaftPart
public static boolean isTargetingShaftPart(net.minecraft.core.BlockPos pos, petrolpark.mc.library.core.world.block.multiPart.MultiPartBlock<?> block, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.player.Player player) -
isShaftLike
public static boolean isShaftLike(net.minecraft.world.level.block.state.BlockState state) - Parameters:
state-- Returns:
trueif the state is functionally just a Shaft, and has the propertyBlockStateProperties.AXIS
-
isStateForShaftPlacementHelper
public static boolean isStateForShaftPlacementHelper(net.minecraft.world.level.block.state.BlockState state) - Parameters:
state-- Returns:
trueif the state can be expanded upon by the Shaft block Placement Helper The state is not guaranteed to have the propertyBlockStateProperties.AXIS
-
getAxisForShaftPlacementHelper
@Nullable public static net.minecraft.core.Direction.Axis getAxisForShaftPlacementHelper(net.minecraft.world.level.block.state.BlockState state)
-