Class RegisterMaterialAtlasesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterMaterialAtlasesEvent
- All Implemented Interfaces:
net.neoforged.fml.event.IModBusEvent
public class RegisterMaterialAtlasesEvent
extends net.neoforged.bus.api.Event
implements net.neoforged.fml.event.IModBusEvent
Fired for registering texture atlases that will be used with
Material
or
other systems which retrieve the atlas via Minecraft.getTextureAtlas(ResourceLocation)
or
ModelManager.getAtlas(ResourceLocation)
.
If an atlas is registered via this event, then it must NOT be used through a TextureAtlasHolder
.
This event fires during startup when the ModelManager
is constructed.
This event is not cancellable.
This event is fired on the mod-specific event bus, only on the logical client.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegisterMaterialAtlasesEvent
(Map<net.minecraft.resources.ResourceLocation, net.minecraft.resources.ResourceLocation> atlases) -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(net.minecraft.resources.ResourceLocation atlasLocation, net.minecraft.resources.ResourceLocation atlasInfoLocation) Register a texture atlas with the given name and info location
-
Field Details
-
atlases
private final Map<net.minecraft.resources.ResourceLocation,net.minecraft.resources.ResourceLocation> atlases
-
-
Constructor Details
-
RegisterMaterialAtlasesEvent
@Internal public RegisterMaterialAtlasesEvent(Map<net.minecraft.resources.ResourceLocation, net.minecraft.resources.ResourceLocation> atlases)
-
-
Method Details
-
register
public void register(net.minecraft.resources.ResourceLocation atlasLocation, net.minecraft.resources.ResourceLocation atlasInfoLocation) Register a texture atlas with the given name and info location- Parameters:
atlasLocation
- The name of the texture atlasatlasInfoLocation
- The location of the atlas info JSON relative to theatlases
directory
-