Class GuiTextures
java.lang.Object
codechicken.lib.gui.modular.sprite.GuiTextures
Gui texture handler implementation.
This sets up a custom atlas that will be populated with all textures in "modid:textures/gui/"
Created by brandon3055 on 21/10/2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a cached Material for the specified gui texture.getUncached(String texture) Use this to retrieve a new uncached material for the specified gui texture.voidinit(net.minecraftforge.eventbus.api.IEventBus bus) Called to initialize theGuiTextureshelper
-
Constructor Details
-
GuiTextures
-
-
Method Details
-
init
public void init(net.minecraftforge.eventbus.api.IEventBus bus) Called to initialize theGuiTextureshelper- Parameters:
bus- Your mod event bus.
-
getAtlasHolder
- Returns:
- The underlying
ModAtlasHolderinstance.
-
get
Returns a cached Material for the specified gui texture. Warning: Do not use this if you intend to use the material with multiple render types. The material will cache the first render type it is used with. Instead usegetUncached(String)- Parameters:
texture- The texture path relative to "modid:gui/"
-
get
-
getter
-
getUncached
Use this to retrieve a new uncached material for the specified gui texture. Feel free to hold onto the returned material. Storing it somewhere is more efficient than recreating it every render frame.- Parameters:
texture- The texture path relative to "modid:gui/"- Returns:
- A new Material for the specified gui texture.
-