Class VariantBlockStateBuilder.PartialBlockstate
java.lang.Object
net.minecraftforge.client.model.generators.VariantBlockStateBuilder.PartialBlockstate
- All Implemented Interfaces:
Predicate<BlockState>
- Enclosing class:
- VariantBlockStateBuilder
public static class VariantBlockStateBuilder.PartialBlockstate
extends Object
implements Predicate<BlockState>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final @Nullable VariantBlockStateBuilder
private final Block
private final SortedMap<Property<?>,
Comparable<?>> -
Constructor Summary
ConstructorDescriptionPartialBlockstate
(Block owner, @Nullable VariantBlockStateBuilder outerBuilder) PartialBlockstate
(Block owner, Map<Property<?>, Comparable<?>> setStates, @Nullable VariantBlockStateBuilder outerBuilder) -
Method Summary
Modifier and TypeMethodDescriptionaddModels
(ConfiguredModel... models) Add models to the current state's variant.private void
boolean
getOwner()
SortedMap<Property<?>,
Comparable<?>> int
hashCode()
Creates a builder for models to assign to this state, which when completed viaConfiguredModel.Builder.addModel()
will assign the resultant set of models to this state.Complete this state without adding any new models, and return a new partial state via the parent builder.setModels
(ConfiguredModel... models) Set this variant's models, and return the parent builder.boolean
test
(BlockState blockState) toString()
<T extends Comparable<T>>
VariantBlockStateBuilder.PartialBlockstate
-
Field Details
-
owner
-
setStates
-
outerBuilder
-
-
Constructor Details
-
PartialBlockstate
PartialBlockstate(Block owner, @Nullable @Nullable VariantBlockStateBuilder outerBuilder) -
PartialBlockstate
PartialBlockstate(Block owner, Map<Property<?>, Comparable<?>> setStates, @Nullable @Nullable VariantBlockStateBuilder outerBuilder)
-
-
Method Details
-
with
public <T extends Comparable<T>> VariantBlockStateBuilder.PartialBlockstate with(Property<T> prop, T value) -
checkValidOwner
private void checkValidOwner() -
modelForState
Creates a builder for models to assign to this state, which when completed viaConfiguredModel.Builder.addModel()
will assign the resultant set of models to this state.- Returns:
- the model builder
- See Also:
-
addModels
Add models to the current state's variant. For use when it is more convenient to add multiple sets of models, as a replacement forsetModels(ConfiguredModel...)
.- Parameters:
models
- The models to add.- Returns:
this
- Throws:
NullPointerException
- If the parent builder isnull
-
setModels
Set this variant's models, and return the parent builder.- Parameters:
models
- The models to set- Returns:
- The parent builder instance
- Throws:
NullPointerException
- If the parent builder isnull
-
partialState
Complete this state without adding any new models, and return a new partial state via the parent builder. For use after callingaddModels(ConfiguredModel...)
.- Returns:
- A fresh partial state as specified by
VariantBlockStateBuilder.partialState()
. - Throws:
NullPointerException
- If the parent builder isnull
-
equals
-
hashCode
public int hashCode() -
getOwner
-
getSetStates
-
test
- Specified by:
test
in interfacePredicate<BlockState>
-
toString
-
comparingByProperties
-