public class OrConnectionPredicate extends java.lang.Object implements ConnectionPredicate
| Modifier and Type | Field and Description |
|---|---|
static Serializer<OrConnectionPredicate> |
SERIALIZER |
| Constructor and Description |
|---|
OrConnectionPredicate(java.util.List<ConnectionPredicate> predicates) |
| Modifier and Type | Method and Description |
|---|---|
Serializer<? extends ConnectionPredicate> |
getSerializer() |
boolean |
isSensitive()
Determines whether this connection predicate depends on the level and should always be reevaluated.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, negate, orpublic static final Serializer<OrConnectionPredicate> SERIALIZER
public OrConnectionPredicate(java.util.List<ConnectionPredicate> predicates)
public 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 directionpublic boolean 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 directionpublic 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 ConnectionPredicateSensitiveConnectionPredicatepublic Serializer<? extends ConnectionPredicate> getSerializer()
getSerializer in interface ConnectionPredicate