Class MatchBlockConnectionPredicate

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

public class MatchBlockConnectionPredicate extends Object implements ConnectionPredicate
Created 28/04/2023 by SuperMartijn642
  • Field Details

  • Constructor Details

    • MatchBlockConnectionPredicate

      public MatchBlockConnectionPredicate(net.minecraft.world.level.block.Block block)
  • 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