Class ItemLayerModelBuilder<T extends ModelBuilder<T>>
java.lang.Object
net.minecraftforge.client.model.generators.CustomLoaderBuilder<T>
net.minecraftforge.client.model.generators.loaders.ItemLayerModelBuilder<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap
<ForgeFaceData> private final it.unimi.dsi.fastutil.ints.IntSet
private final Map
<ResourceLocation, it.unimi.dsi.fastutil.ints.IntSet> Fields inherited from class net.minecraftforge.client.model.generators.CustomLoaderBuilder
existingFileHelper, loaderId, parent, visibility
-
Constructor Summary
ModifierConstructorDescriptionprotected
ItemLayerModelBuilder
(T parent, ExistingFileHelper existingFileHelper) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ModelBuilder<T>>
ItemLayerModelBuilder<T> begin
(T parent, ExistingFileHelper existingFileHelper) color
(int color, int... layers) Marks a set of layers to be rendered with a specific color.emissive
(int blockLight, int skyLight, int... layers) Marks a set of layers to be rendered emissively.renderType
(String renderType, int... layers) Set the render type for a set of layers.renderType
(ResourceLocation renderType, int... layers) Set the render type for a set of layers.com.google.gson.JsonObject
toJson
(com.google.gson.JsonObject json) Methods inherited from class net.minecraftforge.client.model.generators.CustomLoaderBuilder
end, visibility
-
Field Details
-
faceData
-
renderTypes
-
layersWithRenderTypes
private final it.unimi.dsi.fastutil.ints.IntSet layersWithRenderTypes
-
-
Constructor Details
-
ItemLayerModelBuilder
-
-
Method Details
-
begin
public static <T extends ModelBuilder<T>> ItemLayerModelBuilder<T> begin(T parent, ExistingFileHelper existingFileHelper) -
emissive
Marks a set of layers to be rendered emissively.- Parameters:
blockLight
- The block light (0-15)skyLight
- The sky light (0-15)layers
- the layers that will render unlit- Returns:
- this builder
- Throws:
NullPointerException
- iflayers
isnull
IllegalArgumentException
- iflayers
is emptyIllegalArgumentException
- if any entry inlayers
is smaller than 0
-
color
Marks a set of layers to be rendered with a specific color.- Parameters:
color
- The color, in ARGB.layers
- the layers that will render with color- Returns:
- this builder
- Throws:
NullPointerException
- iflayers
isnull
IllegalArgumentException
- iflayers
is emptyIllegalArgumentException
- if any entry inlayers
is smaller than 0
-
renderType
Set the render type for a set of layers.- Parameters:
renderType
- the render type. Must be registered viaRegisterNamedRenderTypesEvent
layers
- the layers that will use this render type- Returns:
- this builder
- Throws:
NullPointerException
- ifrenderType
isnull
NullPointerException
- iflayers
isnull
IllegalArgumentException
- iflayers
is emptyIllegalArgumentException
- if any entry inlayers
is smaller than 0IllegalArgumentException
- if any entry inlayers
already has a render type
-
renderType
Set the render type for a set of layers.- Parameters:
renderType
- the render type. Must be registered viaRegisterNamedRenderTypesEvent
layers
- the layers that will use this render type- Returns:
- this builder
- Throws:
NullPointerException
- ifrenderType
isnull
NullPointerException
- iflayers
isnull
IllegalArgumentException
- iflayers
is emptyIllegalArgumentException
- if any entry inlayers
is smaller than 0IllegalArgumentException
- if any entry inlayers
already has a render type
-
toJson
public com.google.gson.JsonObject toJson(com.google.gson.JsonObject json) - Overrides:
toJson
in classCustomLoaderBuilder<T extends ModelBuilder<T>>
-