Class ItemLayersModelBuilder<T extends ModelBuilder<T>>
java.lang.Object
net.minecraftforge.client.model.generators.CustomLoaderBuilder<T>
net.minecraftforge.client.model.generators.loaders.ItemLayersModelBuilder<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.ints.IntSet
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
ItemLayersModelBuilder
(T parent, ExistingFileHelper existingFileHelper) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ModelBuilder<T>>
ItemLayersModelBuilder<T>begin
(T parent, ExistingFileHelper existingFileHelper) emissive
(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
-
emissiveLayers
private final it.unimi.dsi.fastutil.ints.IntSet emissiveLayers -
renderTypes
-
layersWithRenderTypes
private final it.unimi.dsi.fastutil.ints.IntSet layersWithRenderTypes
-
-
Constructor Details
-
ItemLayersModelBuilder
-
-
Method Details
-
begin
public static <T extends ModelBuilder<T>> ItemLayersModelBuilder<T> begin(T parent, ExistingFileHelper existingFileHelper) -
emissive
Marks a set of layers to be rendered emissively.- Parameters:
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
-
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>>
-