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 net.minecraft.util.ExtraCodecs.LateBoundIdMapper
<net.minecraft.resources.ResourceLocation, com.mojang.serialization.MapCodec<? extends net.minecraft.client.renderer.texture.atlas.SpriteSource>> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterSpriteSourcesEvent
(net.minecraft.util.ExtraCodecs.LateBoundIdMapper<net.minecraft.resources.ResourceLocation, com.mojang.serialization.MapCodec<? extends net.minecraft.client.renderer.texture.atlas.SpriteSource>> idMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(net.minecraft.resources.ResourceLocation id, com.mojang.serialization.MapCodec<? extends net.minecraft.client.renderer.texture.atlas.SpriteSource> codec)
-
Field Details
-
idMapper
private final net.minecraft.util.ExtraCodecs.LateBoundIdMapper<net.minecraft.resources.ResourceLocation,com.mojang.serialization.MapCodec<? extends net.minecraft.client.renderer.texture.atlas.SpriteSource>> idMapper
-
-
Constructor Details
-
RegisterSpriteSourcesEvent
@Internal public RegisterSpriteSourcesEvent(net.minecraft.util.ExtraCodecs.LateBoundIdMapper<net.minecraft.resources.ResourceLocation, com.mojang.serialization.MapCodec<? extends net.minecraft.client.renderer.texture.atlas.SpriteSource>> idMapper)
-
-
Method Details
-
register
public void register(net.minecraft.resources.ResourceLocation id, com.mojang.serialization.MapCodec<? extends net.minecraft.client.renderer.texture.atlas.SpriteSource> codec)
-