Class SRuntimeRegistry
java.lang.Object
net.lcc.sollib.api.common.data.runtime.SRuntimeRegistry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.gson.Gsonstatic final SRuntimeRegistrystatic final SolLogger -
Method Summary
Modifier and TypeMethodDescriptionaddDefault(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 functionaddJson(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 functionaddRemoval(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 functionaddText(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 functionnet.minecraft.server.packs.resources.Resourceapply(net.minecraft.resources.ResourceLocation target, net.minecraft.server.packs.resources.Resource original) voidclean()List<net.minecraft.resources.ResourceLocation> findMatching(String startingPath, Predicate<net.minecraft.resources.ResourceLocation> allowedPathPredicate)
-
Field Details
-
INSTANCE
-
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
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
-
clean
@Internal public void clean()
-