类 VariantBlockStateBuilder
java.lang.Object
net.minecraftforge.client.model.generators.VariantBlockStateBuilder
- 所有已实现的接口:
IGeneratedBlockState
@Deprecated(since="1.21.4",
forRemoval=true)
public class VariantBlockStateBuilder
extends Object
implements IGeneratedBlockState
已过时, 待删除: 此 API 元素将从以后的版本中删除。
Builder for variant-type blockstates, i.e. non-multipart blockstates. Should
not be manually instantiated, instead use
BlockStateProvider.getVariantBuilder(Block)
.
Variants can either be set via
setModels(PartialBlockstate, ConfiguredModel...)
or
addModels(PartialBlockstate, ConfiguredModel...)
, where model(s) can
be assigned directly to partial states
, or builder
style via partialState()
and its subsequent methods.
This class also provides the convenience methods
forAllStates(Function)
and
forAllStatesExcept(Function, Property...)
for cases where the model
for each variant can be decided dynamically based on the state's property
values.
- 另请参阅:
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final Set
<BlockState> 已过时, 待删除: 此 API 元素将从以后的版本中删除。private final Map
<VariantBlockStateBuilder.PartialBlockstate, BlockStateProvider.ConfiguredModelList> 已过时, 待删除: 此 API 元素将从以后的版本中删除。private final Block
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addModels
(VariantBlockStateBuilder.PartialBlockstate state, ConfiguredModel... models) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Assign some models to a givenpartial state
.private boolean
已过时, 待删除: 此 API 元素将从以后的版本中删除。forAllStates
(Function<BlockState, ConfiguredModel[]> mapper) 已过时, 待删除: 此 API 元素将从以后的版本中删除。forAllStatesExcept
(Function<BlockState, ConfiguredModel[]> mapper, Property<?>... ignored) 已过时, 待删除: 此 API 元素将从以后的版本中删除。已过时, 待删除: 此 API 元素将从以后的版本中删除。getOwner()
已过时, 待删除: 此 API 元素将从以后的版本中删除。已过时, 待删除: 此 API 元素将从以后的版本中删除。setModels
(VariantBlockStateBuilder.PartialBlockstate state, ConfiguredModel... model) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Assign some models to a givenpartial state
, throwing an exception if the state has already been configured.com.google.gson.JsonObject
toJson()
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
字段详细资料
-
owner
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
models
private final Map<VariantBlockStateBuilder.PartialBlockstate,BlockStateProvider.ConfiguredModelList> models已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
coveredStates
已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
构造器详细资料
-
VariantBlockStateBuilder
VariantBlockStateBuilder(Block owner) 已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
-
方法详细资料
-
getModels
public Map<VariantBlockStateBuilder.PartialBlockstate,BlockStateProvider.ConfiguredModelList> getModels()已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
getOwner
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
toJson
public com.google.gson.JsonObject toJson()已过时, 待删除: 此 API 元素将从以后的版本中删除。- 指定者:
toJson
在接口中IGeneratedBlockState
-
addModels
public VariantBlockStateBuilder addModels(VariantBlockStateBuilder.PartialBlockstate state, ConfiguredModel... models) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Assign some models to a givenpartial state
.- 参数:
state
- Thepartial state
for which to add the modelsmodels
- A set of models to add to this state- 返回:
- this builder
- 抛出:
NullPointerException
- ifstate
isnull
IllegalArgumentException
- ifmodels
is emptyIllegalArgumentException
- ifstate
's owning block differs from the builder'sIllegalArgumentException
- ifstate
partially matches another state which has already been configured
-
setModels
public VariantBlockStateBuilder setModels(VariantBlockStateBuilder.PartialBlockstate state, ConfiguredModel... model) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Assign some models to a givenpartial state
, throwing an exception if the state has already been configured. Otherwise, simply callsaddModels(PartialBlockstate, ConfiguredModel...)
.- 参数:
state
- Thepartial state
for which to set the modelsmodel
- A set of models to assign to this state- 返回:
- this builder
- 抛出:
IllegalArgumentException
- ifstate
has already been configured- 另请参阅:
-
disjointToAll
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
partialState
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
forAllStates
已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
forAllStatesExcept
public VariantBlockStateBuilder forAllStatesExcept(Function<BlockState, ConfiguredModel[]> mapper, Property<?>... ignored) 已过时, 待删除: 此 API 元素将从以后的版本中删除。
-
ModelProvider