public interface SensitiveConnectionPredicate extends ConnectionPredicate
ConnectionPredicate which by default makes the connection predicate sensitive.
Created 22/02/2024 by SuperMartijn642
| Modifier and Type | Method and Description |
|---|---|
default boolean |
isSensitive()
Determines whether this connection predicate depends on the level and should always be reevaluated.
|
default boolean |
shouldConnect(net.minecraft.util.Direction side,
net.minecraft.block.BlockState ownState,
net.minecraft.block.BlockState otherState,
net.minecraft.block.BlockState blockInFront,
ConnectionDirection direction)
Determines whether the model should connect to the given direction.
|
boolean |
shouldConnect(net.minecraft.world.IBlockReader level,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction side,
net.minecraft.block.BlockState ownState,
net.minecraft.block.BlockState otherState,
net.minecraft.block.BlockState blockInFront,
ConnectionDirection direction)
Determines whether the model should connect to the given direction.
|
and, getSerializer, negate, ordefault boolean shouldConnect(net.minecraft.util.Direction side,
@Nullable
net.minecraft.block.BlockState ownState,
net.minecraft.block.BlockState otherState,
net.minecraft.block.BlockState blockInFront,
ConnectionDirection direction)
ConnectionPredicateshouldConnect in interface ConnectionPredicateside - 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 of otherstatedirection - direction to checktrue if the texture should connect in the given directionboolean shouldConnect(net.minecraft.world.IBlockReader level,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction side,
@Nullable
net.minecraft.block.BlockState ownState,
net.minecraft.block.BlockState otherState,
net.minecraft.block.BlockState blockInFront,
ConnectionDirection direction)
ConnectionPredicateConnectionPredicate.shouldConnect(Direction, BlockState, BlockState, BlockState, ConnectionDirection).
If this method should be used, ConnectionPredicate.isSensitive() must return true.shouldConnect in interface ConnectionPredicateside - 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 of otherstatedirection - direction to checktrue if the texture should connect in the given directiondefault boolean isSensitive()
ConnectionPredicatetrue is returned ConnectionPredicate.shouldConnect(Direction, BlockState, BlockState, BlockState, ConnectionDirection) may throw an IllegalStateException.
If false is returned, it is assumed that the connection predicate may be cached for the values supplied in ConnectionPredicate.shouldConnect(Direction, BlockState, BlockState, BlockState, ConnectionDirection).isSensitive in interface ConnectionPredicateSensitiveConnectionPredicate