Class AndConnectionPredicate
java.lang.Object
com.supermartijn642.fusion.predicate.AndConnectionPredicate
- All Implemented Interfaces:
ConnectionPredicate
Created 28/04/2023 by SuperMartijn642
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSerializer<? extends ConnectionPredicate>booleanDetermines whether this connection predicate depends on the level and should always be reevaluated.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.supermartijn642.fusion.api.predicate.ConnectionPredicate
and, negate, or
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
AndConnectionPredicate
-
-
Method Details
-
shouldConnect
public 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
public 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
public 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:
-
getSerializer
- Specified by:
getSerializerin interfaceConnectionPredicate- Returns:
- the serializer for this predicate
-