Class SRuntimeRegistry

java.lang.Object
net.lcc.sollib.api.common.data.runtime.SRuntimeRegistry

public class SRuntimeRegistry extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.gson.Gson
     
    static final SRuntimeRegistry
     
    static final SolLogger
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addDefault(net.minecraft.resources.ResourceLocation target, String content)
    Dynamically adds the specified data if it doesn't exist already (on each reload)
    addDefault(net.minecraft.resources.ResourceLocation target, String content, Supplier<Boolean> activationRule)
    Dynamically adds the specified data if activationRule is met and it doesn't exist already (on each reload)
    addJson(net.minecraft.resources.ResourceLocation target, UnaryOperator<com.google.gson.JsonObject> function)
    Dynamically changes the specified data if activationRule is met (on each reload)
    In case the targeted data doesn't exist, a null value will be passed to function
    addJson(net.minecraft.resources.ResourceLocation target, UnaryOperator<com.google.gson.JsonObject> function, Supplier<Boolean> activationRule)
    Dynamically changes the specified data if activationRule is met (on each reload)
    Only applied if activationRule is met for that specific reload
    In case the targeted data doesn't exist, a null value will be passed to function
    addRemoval(net.minecraft.resources.ResourceLocation target, Supplier<Boolean> activationRule)
    Dynamically removes the specified data if activationRule is met (on each reload)
    addText(net.minecraft.resources.ResourceLocation target, UnaryOperator<String> function)
    Dynamically changes the specified data if activationRule is met (on each reload)
    In case the targeted data doesn't exist, a null value will be passed to function
    addText(net.minecraft.resources.ResourceLocation target, UnaryOperator<String> function, Supplier<Boolean> activationRule)
    Dynamically changes the specified data if activationRule is met (on each reload)
    Only applied if activationRule is met for that specific reload
    In case the targeted data doesn't exist, a null value will be passed to function
    net.minecraft.server.packs.resources.Resource
    apply(net.minecraft.resources.ResourceLocation target, net.minecraft.server.packs.resources.Resource original)
     
    void
     
    List<net.minecraft.resources.ResourceLocation>
    findMatching(String startingPath, Predicate<net.minecraft.resources.ResourceLocation> allowedPathPredicate)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INSTANCE

      public static final SRuntimeRegistry INSTANCE
    • LOG

      public static final SolLogger LOG
    • GSON

      public static final com.google.gson.Gson GSON
  • Method Details

    • addRemoval

      public RuntimeData addRemoval(net.minecraft.resources.ResourceLocation target, Supplier<Boolean> activationRule)
      Dynamically removes the specified data if activationRule is met (on each reload)
    • addDefault

      public RuntimeData addDefault(net.minecraft.resources.ResourceLocation target, String content)
      Dynamically adds the specified data if it doesn't exist already (on each reload)
    • addDefault

      public RuntimeData addDefault(net.minecraft.resources.ResourceLocation target, String content, Supplier<Boolean> activationRule)
      Dynamically adds the specified data if activationRule is met and it doesn't exist already (on each reload)
    • addJson

      public RuntimeData addJson(net.minecraft.resources.ResourceLocation target, UnaryOperator<com.google.gson.JsonObject> function)
      Dynamically changes the specified data if activationRule is met (on each reload)
      In case the targeted data doesn't exist, a null value will be passed to function
    • addJson

      public RuntimeData addJson(net.minecraft.resources.ResourceLocation target, UnaryOperator<com.google.gson.JsonObject> function, Supplier<Boolean> activationRule)
      Dynamically changes the specified data if activationRule is met (on each reload)
      Only applied if activationRule is met for that specific reload
      In case the targeted data doesn't exist, a null value will be passed to function
    • addText

      public RuntimeData addText(net.minecraft.resources.ResourceLocation target, UnaryOperator<String> function)
      Dynamically changes the specified data if activationRule is met (on each reload)
      In case the targeted data doesn't exist, a null value will be passed to function
    • addText

      public RuntimeData addText(net.minecraft.resources.ResourceLocation target, UnaryOperator<String> function, Supplier<Boolean> activationRule)
      Dynamically changes the specified data if activationRule is met (on each reload)
      Only applied if activationRule is met for that specific reload
      In case the targeted data doesn't exist, a null value will be passed to function
    • apply

      @Internal public net.minecraft.server.packs.resources.Resource apply(net.minecraft.resources.ResourceLocation target, net.minecraft.server.packs.resources.Resource original)
    • findMatching

      @Internal public List<net.minecraft.resources.ResourceLocation> findMatching(String startingPath, Predicate<net.minecraft.resources.ResourceLocation> allowedPathPredicate)
    • clean

      @Internal public void clean()