Class DefaultConnectionPredicates

java.lang.Object
com.supermartijn642.fusion.api.predicate.DefaultConnectionPredicates

public final class DefaultConnectionPredicates extends Object
Used to create instances of the default ConnectionPredicates provided by Fusion.

Created 28/04/2023 by SuperMartijn642

  • Constructor Details

    • DefaultConnectionPredicates

      public DefaultConnectionPredicates()
  • Method Details

    • and

      public static ConnectionPredicate and(ConnectionPredicate... predicates)
      Combines the given predicates such that all predicates should be satisfied.
      Parameters:
      predicates - predicates which need to be satisfied
    • or

      public static ConnectionPredicate or(ConnectionPredicate... predicates)
      Combines the given predicates such that at least one predicate should be satisfied.
      Parameters:
      predicates - predicates of which any must be satisfied
    • not

      public static ConnectionPredicate not(ConnectionPredicate predicate)
      Inverts the given predicate.
      Parameters:
      predicate - predicate of which the inverse will be taken
    • isSameBlock

      public static ConnectionPredicate isSameBlock()
      Creates a predicate which is satisfied if the block in the connection direction is the same as the block of the model itself.
    • isSameState

      public static ConnectionPredicate isSameState()
      Creates a predicate which is satisfied if the block state in the connection direction is the same as the block state of the model itself.
    • matchBlock

      public static ConnectionPredicate matchBlock(net.minecraft.world.level.block.Block block)
      Creates a predicate which is satisfied if the block in the connection direction is the same as the provided block.
      Parameters:
      block - block which should be matched