Interface SensitiveConnectionPredicate
- All Superinterfaces:
ConnectionPredicate
- All Known Implementing Classes:
IsFaceVisibleConnectionPredicate
Convenience extension for
ConnectionPredicate which by default makes the connection predicate sensitive.
Created 22/02/2024 by SuperMartijn642
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDetermines whether this connection predicate depends on the level and should always be reevaluated.default booleanshouldConnect(net.minecraft.core.Direction side, @Nullable net.minecraft.world.level.block.state.BlockState ownState, net.minecraft.world.level.block.state.BlockState otherState, net.minecraft.world.level.block.state.BlockState blockInFront, ConnectionDirection direction) Determines whether the model should connect to the given direction.booleanshouldConnect(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, @Nullable net.minecraft.world.level.block.state.BlockState ownState, net.minecraft.world.level.block.state.BlockState otherState, net.minecraft.world.level.block.state.BlockState blockInFront, ConnectionDirection direction) Determines whether the model should connect to the given direction.Methods inherited from interface com.supermartijn642.fusion.api.predicate.ConnectionPredicate
and, getSerializer, negate, or
-
Method Details
-
shouldConnect
default boolean shouldConnect(net.minecraft.core.Direction side, @Nullable @Nullable net.minecraft.world.level.block.state.BlockState ownState, net.minecraft.world.level.block.state.BlockState otherState, net.minecraft.world.level.block.state.BlockState blockInFront, ConnectionDirection direction) Description copied from interface:ConnectionPredicateDetermines whether the model should connect to the given direction.- Specified by:
shouldConnectin interfaceConnectionPredicate- Parameters:
side- side of the block which the relevant texture is onownState- state of the block itselfotherState- state of the block in the connection directionblockInFront- state in front ofotherstatedirection- direction to check- Returns:
trueif the texture should connect in the given direction
-
shouldConnect
boolean shouldConnect(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, @Nullable @Nullable net.minecraft.world.level.block.state.BlockState ownState, net.minecraft.world.level.block.state.BlockState otherState, net.minecraft.world.level.block.state.BlockState blockInFront, ConnectionDirection direction) Description copied from interface:ConnectionPredicateDetermines whether the model should connect to the given direction. Sensitive version ofConnectionPredicate.shouldConnect(Direction, BlockState, BlockState, BlockState, ConnectionDirection). If this method should be used,ConnectionPredicate.isSensitive()must returntrue.- Specified by:
shouldConnectin interfaceConnectionPredicateside- side of the block which the relevant texture is onownState- state of the block itselfotherState- state of the block in the connection directionblockInFront- state in front ofotherstatedirection- direction to check- Returns:
trueif the texture should connect in the given direction
-
isSensitive
default boolean isSensitive()Description copied from interface:ConnectionPredicateDetermines whether this connection predicate depends on the level and should always be reevaluated. Iftrueis returnedConnectionPredicate.shouldConnect(Direction, BlockState, BlockState, BlockState, ConnectionDirection)may throw anIllegalStateException. Iffalseis returned, it is assumed that the connection predicate may be cached for the values supplied inConnectionPredicate.shouldConnect(Direction, BlockState, BlockState, BlockState, ConnectionDirection).- Specified by:
isSensitivein interfaceConnectionPredicate- See Also:
-