Class ConfiguredModel.Builder<T>
java.lang.Object
net.minecraftforge.client.model.generators.ConfiguredModel.Builder<T>
- Type Parameters:
- T- the type of the owning builder, which supplied the callback, and will be returned upon completion.
- Enclosing class:
- ConfiguredModel
A builder for 
ConfiguredModels, which can contain a callback for
 processing the finished result. If no callback is available (e.g. in the case
 of ConfiguredModel.builder()), some methods will not be available.
 
 Multiple models can be configured at once through the use of
 nextModel().
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final @Nullable Function<ConfiguredModel[],T> private ModelFileprivate final List<ConfiguredModel>private intprivate intprivate booleanprivate int
- 
Constructor SummaryConstructorsConstructorDescriptionBuilder()Builder(@Nullable Function<ConfiguredModel[], T> callback, List<ConfiguredModel> otherModels) 
- 
Method SummaryModifier and TypeMethodDescriptionaddModel()Apply the contained callback and return the owning builder object.build()Build all configured models and return them as an array.Build the most recent model, as ifnextModel()was never called.Set the underlying model object for this configured model.Complete the current model and return a new builder instance with the same callback, and storing all previously built models.rotationX(int value) Set the x-rotation for this model.rotationY(int value) Set the y-rotation for this model.uvLock(boolean value) weight(int value) Set the random weight for this model.
- 
Field Details- 
model
- 
callback
- 
otherModels
- 
rotationXprivate int rotationX
- 
rotationYprivate int rotationY
- 
uvLockprivate boolean uvLock
- 
weightprivate int weight
 
- 
- 
Constructor Details- 
BuilderBuilder()
- 
BuilderBuilder(@Nullable @Nullable Function<ConfiguredModel[], T> callback, List<ConfiguredModel> otherModels) 
 
- 
- 
Method Details- 
modelFileSet the underlying model object for this configured model.- Parameters:
- model- the model
- Returns:
- this builder
- Throws:
- NullPointerException- if- modelis- null
 
- 
rotationXSet the x-rotation for this model.- Parameters:
- value- the x-rotation value
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if- valueis not a valid x-rotation (see- BlockModelRotation)
 
- 
rotationYSet the y-rotation for this model.- Parameters:
- value- the y-rotation value
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if- valueis not a valid y-rotation (see- BlockModelRotation)
 
- 
uvLock
- 
weightSet the random weight for this model.- Parameters:
- value- the weight value
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if- valueis less than or equal to zero
 
- 
buildLastBuild the most recent model, as ifnextModel()was never called. Useful for single-model builders.- Returns:
- the most recently configured model
 
- 
buildBuild all configured models and return them as an array.- Returns:
- the array of built models.
 
- 
addModelApply the contained callback and return the owning builder object. What the callback does is not defined by this class, but most likely it adds the built models to the current variant being configured.Known callbacks include: - Returns:
- the owning builder object
- Throws:
- NullPointerException- if there is no owning builder (and thus no callback)
 
- 
nextModelComplete the current model and return a new builder instance with the same callback, and storing all previously built models.- Returns:
- a new builder for configuring the next model
 
 
-