-
Notifications
You must be signed in to change notification settings - Fork 0
Texture Handling
Ancient edited this page Mar 27, 2026
·
1 revision
PulseLib binds all texture to own atlas, to let animated textures work. But, thanks Mojang, textures can't be added to atlas at runtime. To handle it was added workaround with custom event called CustomEvents.PLibRegisterTextureEvent To use it, just subscribe to Mod Event Bus and add all your textures will be added to atlas.
Textures have to be added accordingly to textures folder and without extension. So, if you texture placed in:
example_mod:textures/block/example_block/0.png right path in code will be: block/example_block/0
Somewhere in renderer class:
private static final ResourceLocation TEXTURE = ResourceLocation.fromNamespaceAndPath("example_mod", "block/catcher/0");
public static void registerTextures(final CustomEvents.PLibRegisterTextureEvent event)
{
event.addTextureLocation(TEXTURE);
}Start
Basics
In depth
Specifics