Package foundry.veil.api
Class CodecReloadListener<T>
java.lang.Object
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,T>>
foundry.veil.api.CodecReloadListener<T>
- Type Parameters:
T
- The type of mapped data to return
- All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener
- Direct Known Subclasses:
FramebufferManager
,PostProcessingManager
public abstract class CodecReloadListener<T>
extends net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.ResourceLocation,T>>
Loads files similarly to
SimpleJsonResourceReloadListener
,
but also decodes them using the provided codec.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCodecReloadListener
(com.mojang.serialization.Codec<T> codec, net.minecraft.resources.FileToIdConverter converter) Creates a new codec reload listener. -
Method Summary
Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
apply, reload
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
codec
-
converter
protected final net.minecraft.resources.FileToIdConverter converter
-
-
Constructor Details
-
CodecReloadListener
public CodecReloadListener(com.mojang.serialization.Codec<T> codec, net.minecraft.resources.FileToIdConverter converter) Creates a new codec reload listener.- Parameters:
codec
- The codec to use when deserializing filesconverter
- The converter to use for listing files
-
-
Method Details
-
prepare
-