类 ModelBuilder<T extends ModelBuilder<T>>
java.lang.Object
net.minecraftforge.client.model.generators.ModelFile
net.minecraftforge.client.model.generators.ModelBuilder<T>
- 类型参数:
T
- Self type, for simpler chaining of methods. In 1.21.4 Mojang exposed their data generators for their models. So it should be feasible to just use theirs. If you find something lacking feel free to open a PR so that we can extend it.
- 直接已知子类:
BlockModelBuilder
,ItemModelBuilder
@Deprecated(since="1.21.4",
forRemoval=true)
public class ModelBuilder<T extends ModelBuilder<T>>
extends ModelFile
已过时, 待删除: 此 API 元素将从以后的版本中删除。
General purpose model builder, contains all the commonalities between item
and block models.
- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明class
已过时, 待删除: 此 API 元素将从以后的版本中删除。static enum
已过时, 待删除: 此 API 元素将从以后的版本中删除。class
已过时, 待删除: 此 API 元素将从以后的版本中删除。class
已过时, 待删除: 此 API 元素将从以后的版本中删除。从类继承的嵌套类/接口 net.minecraftforge.client.model.generators.ModelFile
ModelFile.ExistingModelFile, ModelFile.UncheckedModelFile
-
字段概要
字段修饰符和类型字段说明protected boolean
已过时, 待删除: 此 API 元素将从以后的版本中删除。protected CustomLoaderBuilder
<T> 已过时, 待删除: 此 API 元素将从以后的版本中删除。protected final List
<ModelBuilder<T>.ElementBuilder> 已过时, 待删除: 此 API 元素将从以后的版本中删除。protected final ExistingFileHelper
已过时, 待删除: 此 API 元素将从以后的版本中删除。protected UnbakedModel.GuiLight
已过时, 待删除: 此 API 元素将从以后的版本中删除。protected @Nullable ModelFile
已过时, 待删除: 此 API 元素将从以后的版本中删除。protected String
已过时, 待删除: 此 API 元素将从以后的版本中删除。protected String
已过时, 待删除: 此 API 元素将从以后的版本中删除。private final ModelBuilder<T>.RootTransformsBuilder
已过时, 待删除: 此 API 元素将从以后的版本中删除。已过时, 待删除: 此 API 元素将从以后的版本中删除。protected final ModelBuilder<T>.TransformsBuilder
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
构造器概要
构造器限定符构造器说明protected
ModelBuilder
(ResourceLocation outputLocation, ExistingFileHelper existingFileHelper) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
方法概要
修饰符和类型方法说明ao
(boolean ao) 已过时, 待删除: 此 API 元素将从以后的版本中删除。<L extends CustomLoaderBuilder<T>>
LcustomLoader
(BiFunction<T, ExistingFileHelper, L> customLoaderFactory) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use a custom loader instead of the vanilla elements.element()
已过时, 待删除: 此 API 元素将从以后的版本中删除。element
(int index) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Get an existing element builderprotected boolean
exists()
已过时, 待删除: 此 API 元素将从以后的版本中删除。int
已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the number of elements in this model builder。guiLight
(UnbakedModel.GuiLight light) 已过时, 待删除: 此 API 元素将从以后的版本中删除。已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the parent model for the current model.renderType
(String renderType) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render type for this model.renderType
(String renderType, String renderTypeFast) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render types for this model.renderType
(ResourceLocation renderType) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render type for this model.renderType
(ResourceLocation renderType, ResourceLocation renderTypeFast) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render types for this model.已过时, 待删除: 此 API 元素将从以后的版本中删除。private T
self()
已过时, 待删除: 此 API 元素将从以后的版本中删除。private Number
serializeFloat
(float f) 已过时, 待删除: 此 API 元素将从以后的版本中删除。private String
serializeLocOrKey
(String tex) 已过时, 待删除: 此 API 元素将从以后的版本中删除。private com.google.gson.JsonArray
serializeVector3f
(org.joml.Vector3f vec) 已过时, 待删除: 此 API 元素将从以后的版本中删除。已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the texture for a given dictionary key.texture
(String key, ResourceLocation texture) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the texture for a given dictionary key.com.google.gson.JsonObject
toJson()
已过时, 待删除: 此 API 元素将从以后的版本中删除。已过时, 待删除: 此 API 元素将从以后的版本中删除。从类继承的方法 net.minecraftforge.client.model.generators.ModelFile
assertExistence, getLocation, getUncheckedLocation
-
字段详细资料
-
parent
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
textures
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
transforms
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
existingFileHelper
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
renderType
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
renderTypeFast
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
ambientOcclusion
protected boolean ambientOcclusion已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
guiLight
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
elements
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
customLoader
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
rootTransforms
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
构造器详细资料
-
ModelBuilder
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
方法详细资料
-
self
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
exists
protected boolean exists()已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
parent
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the parent model for the current model.- 参数:
parent
- the parent model- 返回:
- this builder
- 抛出:
NullPointerException
- ifparent
isnull
IllegalStateException
- ifparent
does notexist
-
texture
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the texture for a given dictionary key.- 参数:
key
- the texture keytexture
- the texture, can be another key e.g."#all"
- 返回:
- this builder
- 抛出:
NullPointerException
- ifkey
isnull
NullPointerException
- iftexture
isnull
IllegalStateException
- iftexture
is not a key (does not start with'#'
) and does not exist in any known resource pack
-
texture
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the texture for a given dictionary key.- 参数:
key
- the texture keytexture
- the texture- 返回:
- this builder
- 抛出:
NullPointerException
- ifkey
isnull
NullPointerException
- iftexture
isnull
IllegalStateException
- iftexture
is not a key (does not start with'#'
) and does not exist in any known resource pack
-
renderType
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render type for this model. Any render types to be used must be registered viaRegisterNamedRenderTypesEvent
.Consider using renderType(String, String) if you need to set a render type for fast graphics.
- 参数:
renderType
- the render type- 返回:
- this builder
- 抛出:
NullPointerException
- ifrenderType
isnull
- 另请参阅:
-
renderType
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render types for this model. Any render types to be used must be registered viaRegisterNamedRenderTypesEvent
.- 参数:
renderType
- the render type for fancy graphicsrenderTypeFast
- the render type for fast graphics- 返回:
- this builder
- 抛出:
NullPointerException
- ifrenderType
isnull
-
renderType
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render type for this model. Any render types to be used must be registered viaRegisterNamedRenderTypesEvent
.Consider using renderType(ResourceLocation, ResourceLocation) if you need to set a render type for fast graphics.
- 参数:
renderType
- the render type- 返回:
- this builder
- 抛出:
NullPointerException
- ifrenderType
isnull
- 另请参阅:
-
renderType
已过时, 待删除: 此 API 元素将从以后的版本中删除。Set the render types for this model. Any render types to be used must be registered viaRegisterNamedRenderTypesEvent
.- 参数:
renderType
- the render type for fancy graphicsrenderTypeFast
- the render type for fast graphics- 返回:
- this builder
- 抛出:
NullPointerException
- ifrenderType
isnull
-
transforms
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
ao
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
guiLight
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
element
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
element
已过时, 待删除: 此 API 元素将从以后的版本中删除。Get an existing element builder- 参数:
index
- the index of the existing element builder- 返回:
- the element builder
- 抛出:
IndexOutOfBoundsException
- if index is out of bounds
-
getElementCount
public int getElementCount()已过时, 待删除: 此 API 元素将从以后的版本中删除。返回 the number of elements in this model builder。- 返回:
- the number of elements in this model builder
-
customLoader
public <L extends CustomLoaderBuilder<T>> L customLoader(BiFunction<T, ExistingFileHelper, L> customLoaderFactory) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Use a custom loader instead of the vanilla elements.- 参数:
customLoaderFactory
- function that returns the custom loader to set, given this and theexistingFileHelper
- 返回:
- the custom loader builder
-
rootTransforms
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
toJson
@VisibleForTesting public com.google.gson.JsonObject toJson()已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
serializeLocOrKey
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
serializeVector3f
private com.google.gson.JsonArray serializeVector3f(org.joml.Vector3f vec) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
serializeFloat
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
ModelProvider