Class RegisterSpriteSourcesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterSpriteSourcesEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterSpriteSourcesEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Fired to allow mods to register their own SpriteSource codecs.
This event is fired once during the construction of the
Minecraft
instance or
before datagen when client datagen is enabled.
This event is not cancellable.
This event is fired on the mod-specific event bus, only on the logical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExtraCodecs.LateBoundIdMapper
<ResourceLocation, com.mojang.serialization.MapCodec<? extends SpriteSource>> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterSpriteSourcesEvent
(ExtraCodecs.LateBoundIdMapper<ResourceLocation, com.mojang.serialization.MapCodec<? extends SpriteSource>> idMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(ResourceLocation id, com.mojang.serialization.MapCodec<? extends SpriteSource> codec)
-
Field Details
-
idMapper
private final ExtraCodecs.LateBoundIdMapper<ResourceLocation,com.mojang.serialization.MapCodec<? extends SpriteSource>> idMapper
-
-
Constructor Details
-
RegisterSpriteSourcesEvent
@Internal public RegisterSpriteSourcesEvent(ExtraCodecs.LateBoundIdMapper<ResourceLocation, com.mojang.serialization.MapCodec<? extends SpriteSource>> idMapper)
-
-
Method Details
-
register
public void register(ResourceLocation id, com.mojang.serialization.MapCodec<? extends SpriteSource> codec)
-