Class MatchStateConnectionPredicate

java.lang.Object
com.supermartijn642.fusion.predicate.MatchStateConnectionPredicate
All Implemented Interfaces:
ConnectionPredicate

public class MatchStateConnectionPredicate extends Object implements ConnectionPredicate
Created 22/02/2024 by SuperMartijn642
  • Field Details

  • Constructor Details

    • MatchStateConnectionPredicate

      public MatchStateConnectionPredicate(net.minecraft.world.level.block.Block block, List<Pair<net.minecraft.world.level.block.state.properties.Property<?>,Set<?>>> properties)
    • MatchStateConnectionPredicate

      @SafeVarargs public MatchStateConnectionPredicate(net.minecraft.world.level.block.Block block, Pair<net.minecraft.world.level.block.state.properties.Property<?>,?>... propertyPair)
  • 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: ConnectionPredicate
      Determines whether the model should connect to the given direction.
      Specified by:
      shouldConnect in interface ConnectionPredicate
      Parameters:
      side - side of the block which the relevant texture is on
      ownState - state of the block itself
      otherState - state of the block in the connection direction
      blockInFront - state in front of otherstate
      direction - direction to check
      Returns:
      true if the texture should connect in the given direction
    • getSerializer

      public Serializer<? extends ConnectionPredicate> getSerializer()
      Specified by:
      getSerializer in interface ConnectionPredicate
      Returns:
      the serializer for this predicate