T
- Self type, for simpler chaining of methods.public class ModelBuilder<T extends ModelBuilder<T>> extends ModelFile
修飾子とタイプ | クラスと説明 |
---|---|
class |
ModelBuilder.ElementBuilder |
static class |
ModelBuilder.FaceRotation |
static class |
ModelBuilder.Perspective |
class |
ModelBuilder.TransformsBuilder |
ModelFile.ExistingModelFile, ModelFile.UncheckedModelFile
修飾子とタイプ | フィールドと説明 |
---|---|
protected boolean |
ambientOcclusion |
protected java.util.List<ModelBuilder.ElementBuilder> |
elements |
protected ExistingFileHelper |
existingFileHelper |
protected boolean |
gui3d |
protected ModelFile |
parent |
protected java.util.Map<java.lang.String,java.lang.String> |
textures |
protected ModelBuilder.TransformsBuilder |
transforms |
修飾子 | コンストラクタと説明 |
---|---|
protected |
ModelBuilder(ResourceLocation outputLocation,
ExistingFileHelper existingFileHelper) |
修飾子とタイプ | メソッドと説明 |
---|---|
T |
ao(boolean ao) |
ModelBuilder.ElementBuilder |
element() |
ModelBuilder.ElementBuilder |
element(int index)
Get an existing element builder
|
protected boolean |
exists() |
T |
gui3d(boolean gui3d) |
T |
parent(ModelFile parent)
Set the parent model for the current model.
|
T |
texture(java.lang.String key,
ResourceLocation texture)
Set the texture for a given dictionary key.
|
T |
texture(java.lang.String key,
java.lang.String texture)
Set the texture for a given dictionary key.
|
com.google.gson.JsonObject |
toJson() |
ModelBuilder.TransformsBuilder |
transforms() |
assertExistence, getLocation, getUncheckedLocation
@Nullable protected ModelFile parent
protected final java.util.Map<java.lang.String,java.lang.String> textures
protected final ModelBuilder.TransformsBuilder transforms
protected final ExistingFileHelper existingFileHelper
protected boolean ambientOcclusion
protected boolean gui3d
protected final java.util.List<ModelBuilder.ElementBuilder> elements
protected ModelBuilder(ResourceLocation outputLocation, ExistingFileHelper existingFileHelper)
public T parent(ModelFile parent)
parent
- the parent modeljava.lang.NullPointerException
- if parent
is null
java.lang.IllegalStateException
- if parent
does not exist
public T texture(java.lang.String key, java.lang.String texture)
key
- the texture keytexture
- the texture, can be another key e.g. "#all"
java.lang.NullPointerException
- if key
is null
java.lang.NullPointerException
- if texture
is null
java.lang.IllegalStateException
- if texture
is not a key (does not start
with '#'
) and does not exist in any
known resource packpublic T texture(java.lang.String key, ResourceLocation texture)
key
- the texture keytexture
- the texturejava.lang.NullPointerException
- if key
is null
java.lang.NullPointerException
- if texture
is null
java.lang.IllegalStateException
- if texture
is not a key (does not start
with '#'
) and does not exist in any
known resource packpublic ModelBuilder.TransformsBuilder transforms()
public T ao(boolean ao)
public T gui3d(boolean gui3d)
public ModelBuilder.ElementBuilder element()
public ModelBuilder.ElementBuilder element(int index)
index
- the index of the existing element builderjava.lang.IndexOutOfBoundsException
- if index is out of boundspublic com.google.gson.JsonObject toJson()