类 ConfiguredModel
java.lang.Object
net.minecraftforge.client.model.generators.ConfiguredModel
已过时, 待删除: 此 API 元素将从以后的版本中删除。
Represents a model with blockstate configurations, e.g. rotation, uvlock, and
random weight.
Can be manually constructed, created by static factory such as
allYRotations(ModelFile, int, boolean)
, or created by builder via
builder()
.
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.
-
嵌套类概要
嵌套类修饰符和类型类说明static class
已过时, 待删除: 此 API 元素将从以后的版本中删除。A builder forConfiguredModel
s, which can contain a callback for processing the finished result. -
字段概要
字段修饰符和类型字段说明static final int
已过时, 待删除: 此 API 元素将从以后的版本中删除。The default random weight of configured models, used by convenience overloads.final ModelFile
已过时, 待删除: 此 API 元素将从以后的版本中删除。final int
已过时, 待删除: 此 API 元素将从以后的版本中删除。final int
已过时, 待删除: 此 API 元素将从以后的版本中删除。final boolean
已过时, 待删除: 此 API 元素将从以后的版本中删除。final int
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
构造器概要
构造器构造器说明ConfiguredModel
(ModelFile model) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Construct a newConfiguredModel
with the default rotation (0, 0), uvlock (false), anddefault random weight
.ConfiguredModel
(ModelFile model, int rotationX, int rotationY, boolean uvLock) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Construct a newConfiguredModel
with thedefault random weight
.ConfiguredModel
(ModelFile model, int rotationX, int rotationY, boolean uvLock, int weight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Construct a newConfiguredModel
. -
方法概要
修饰符和类型方法说明static ConfiguredModel[]
allRotations
(ModelFile model, boolean uvlock) 已过时, 待删除: 此 API 元素将从以后的版本中删除。static ConfiguredModel[]
allRotations
(ModelFile model, boolean uvlock, int weight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。static ConfiguredModel[]
allYRotations
(ModelFile model, int x, boolean uvlock) 已过时, 待删除: 此 API 元素将从以后的版本中删除。static ConfiguredModel[]
allYRotations
(ModelFile model, int x, boolean uvlock, int weight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。static ConfiguredModel.Builder
<?> builder()
已过时, 待删除: 此 API 元素将从以后的版本中删除。Create a new unownedConfiguredModel.Builder
.(专用程序包) static ConfiguredModel.Builder
<MultiPartBlockStateBuilder.PartBuilder> 已过时, 待删除: 此 API 元素将从以后的版本中删除。(专用程序包) static ConfiguredModel.Builder
<VariantBlockStateBuilder> 已过时, 待删除: 此 API 元素将从以后的版本中删除。(专用程序包) static void
checkRotation
(int rotationX, int rotationY) 已过时, 待删除: 此 API 元素将从以后的版本中删除。(专用程序包) static void
checkWeight
(int weight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。(专用程序包) com.google.gson.JsonObject
toJSON
(boolean includeWeight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。private static IntStream
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
字段详细资料
-
DEFAULT_WEIGHT
public static final int DEFAULT_WEIGHT已过时, 待删除: 此 API 元素将从以后的版本中删除。The default random weight of configured models, used by convenience overloads.- 另请参阅:
-
model
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
rotationX
public final int rotationX已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
rotationY
public final int rotationY已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
uvLock
public final boolean uvLock已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
weight
public final int weight已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
构造器详细资料
-
ConfiguredModel
已过时, 待删除: 此 API 元素将从以后的版本中删除。Construct a newConfiguredModel
.- 参数:
model
- the underlying modelrotationX
- x-rotation to apply to the modelrotationY
- y-rotation to apply to the modeluvLock
- if uvlock should be enabledweight
- the random weight of the model- 抛出:
NullPointerException
- ifmodel
isnull
IllegalArgumentException
- if x and/or y rotation are not valid (seeBlockModelRotation
)IllegalArgumentException
- if weight is less than or equal to zero
-
ConfiguredModel
已过时, 待删除: 此 API 元素将从以后的版本中删除。Construct a newConfiguredModel
with thedefault random weight
.- 参数:
model
- the underlying modelrotationX
- x-rotation to apply to the modelrotationY
- y-rotation to apply to the modeluvLock
- if uvlock should be enabled- 抛出:
NullPointerException
- ifmodel
isnull
IllegalArgumentException
- if x and/or y rotation are not valid (seeBlockModelRotation
)
-
ConfiguredModel
已过时, 待删除: 此 API 元素将从以后的版本中删除。Construct a newConfiguredModel
with the default rotation (0, 0), uvlock (false), anddefault random weight
.- 抛出:
NullPointerException
- ifmodel
isnull
-
-
方法详细资料
-
validRotations
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
allYRotations
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
allYRotations
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
allRotations
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
allRotations
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
checkRotation
static void checkRotation(int rotationX, int rotationY) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
checkWeight
static void checkWeight(int weight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
toJSON
com.google.gson.JsonObject toJSON(boolean includeWeight) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
builder
已过时, 待删除: 此 API 元素将从以后的版本中删除。Create a new unownedConfiguredModel.Builder
.- 返回:
- the builder
- 另请参阅:
-
builder
static ConfiguredModel.Builder<VariantBlockStateBuilder> builder(VariantBlockStateBuilder outer, VariantBlockStateBuilder.PartialBlockstate state) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
builder
static ConfiguredModel.Builder<MultiPartBlockStateBuilder.PartBuilder> builder(MultiPartBlockStateBuilder outer) 已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
ModelProvider