Interface ConnectionPredicate
- All Known Implementing Classes:
AndConnectionPredicate,IsSameBlockConnectionPredicate,IsSameStateConnectionPredicate,MatchBlockConnectionPredicate,NotConnectionPredicate,OrConnectionPredicate
public interface ConnectionPredicate
A predicate used to determine whether a model should connect to with another block.
Created 27/04/2023 by SuperMartijn642
-
Method Summary
Modifier and TypeMethodDescriptiondefault ConnectionPredicateand(ConnectionPredicate... predicates) Adds a requirement to this predicate.Serializer<? extends ConnectionPredicate>default ConnectionPredicatenegate()Negates the output of this resource condition.default ConnectionPredicateor(ConnectionPredicate... predicates) Adds an alternative to this predicate.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.
-
Method Details
-
shouldConnect
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) Determines whether the model should connect to the given direction.- 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
-
getSerializer
Serializer<? extends ConnectionPredicate> getSerializer()- Returns:
- the serializer for this predicate
-
and
Adds a requirement to this predicate. -
or
Adds an alternative to this predicate. -
negate
Negates the output of this resource condition.
-