Class JsonCodecReloadListener<T>
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement>>
dev.latvian.mods.klib.util.JsonReloadListener
dev.latvian.mods.klib.util.JsonCodecReloadListener<T>
- All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener
- Direct Known Subclasses:
JsonCodecReloadListener.Dummy, JsonRegistryReloadListener
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier, net.minecraft.server.packs.resources.PreparableReloadListener.SharedState, net.minecraft.server.packs.resources.PreparableReloadListener.StateKey<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.mojang.serialization.Codec<T> final com.google.gson.JsonObjectFields inherited from class JsonReloadListener
rootPath, rootPathOffset -
Constructor Summary
ConstructorsConstructorDescriptionJsonCodecReloadListener(String rootPath, com.mojang.serialization.Codec<T> codec) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement> from, net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profiler) protected abstract voidapply(net.minecraft.server.packs.resources.ResourceManager resourceManager, Map<net.minecraft.resources.Identifier, T> map) protected Tnet.neoforged.neoforge.common.conditions.ConditionalOps<com.google.gson.JsonElement> wrapOps(net.minecraft.resources.Identifier id, net.neoforged.neoforge.common.conditions.ConditionalOps<com.google.gson.JsonElement> ops, com.google.gson.JsonElement json) Methods inherited from class JsonReloadListener
onlyRoot, prepareMethods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reloadMethods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener
getContext, getRegistryLookup, injectContext, makeConditionalOps, makeConditionalOpsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName, prepareSharedState
-
Field Details
-
codec
-
includeId
-
defaultProperties
public final com.google.gson.JsonObject defaultProperties
-
-
Constructor Details
-
JsonCodecReloadListener
-
-
Method Details
-
finalize
-
wrapOps
public net.neoforged.neoforge.common.conditions.ConditionalOps<com.google.gson.JsonElement> wrapOps(net.minecraft.resources.Identifier id, net.neoforged.neoforge.common.conditions.ConditionalOps<com.google.gson.JsonElement> ops, com.google.gson.JsonElement json) -
apply
protected void apply(Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement> from, net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profiler) - Specified by:
applyin classnet.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.Identifier, com.google.gson.JsonElement>>
-
apply
-