Class PatternRegistryManifest

java.lang.Object
at.petrak.hexcasting.common.casting.PatternRegistryManifest

public class PatternRegistryManifest extends Object
  • Constructor Details

    • PatternRegistryManifest

      public PatternRegistryManifest()
  • Method Details

    • processRegistry

      public static void processRegistry(@Nullable @Nullable net.minecraft.server.level.ServerLevel overworld)
      Process the registry!

      This no longer checks any kind of per-world-pattern-ness because both this and ScrungledPatternsSave depends on the other to be done first. lol lmao. It just caches signature->action for the non-per-world-pats so it's an O(1) lookup.

    • matchPatternToSpecialHandler

      @Nullable public static @Nullable com.mojang.datafixers.util.Pair<SpecialHandler,net.minecraft.resources.ResourceKey<SpecialHandler.Factory<?>>> matchPatternToSpecialHandler(at.petrak.hexcasting.api.casting.math.HexPattern pat, CastingEnvironment environment)
      Try to match this pattern to a special handler. If one is found, return both the handler and its key.
    • matchPattern

      public static PatternShapeMatch matchPattern(at.petrak.hexcasting.api.casting.math.HexPattern pat, CastingEnvironment environment, boolean checkForAlternateStrokeOrders)
      Try to match this pattern to an action, whether via a normal pattern, a per-world pattern, or the machinations of a special handler.
      Parameters:
      checkForAlternateStrokeOrders - if this is true, will check if the pattern given is an erroneous stroke order for a per-world pattern.
    • getCanonicalStrokesPerWorld

      @Nullable public static @Nullable at.petrak.hexcasting.api.casting.math.HexPattern getCanonicalStrokesPerWorld(net.minecraft.resources.ResourceKey<ActionRegistryEntry> key, net.minecraft.server.level.ServerLevel overworld)