public static class VariantBlockStateBuilder.PartialBlockstate extends java.lang.Object implements java.util.function.Predicate<BlockState>
Modifier and Type | Field and Description |
---|---|
private VariantBlockStateBuilder |
outerBuilder |
private Block |
owner |
private java.util.SortedMap<IProperty<?>,java.lang.Comparable<?>> |
setStates |
Constructor and Description |
---|
PartialBlockstate(Block owner,
java.util.Map<IProperty<?>,java.lang.Comparable<?>> setStates,
VariantBlockStateBuilder outerBuilder) |
PartialBlockstate(Block owner,
VariantBlockStateBuilder outerBuilder) |
Modifier and Type | Method and Description |
---|---|
VariantBlockStateBuilder.PartialBlockstate |
addModels(ConfiguredModel... models)
Add models to the current state's variant.
|
private void |
checkValidOwner() |
static java.util.Comparator<VariantBlockStateBuilder.PartialBlockstate> |
comparingByProperties() |
boolean |
equals(java.lang.Object o) |
Block |
getOwner() |
java.util.SortedMap<IProperty<?>,java.lang.Comparable<?>> |
getSetStates() |
int |
hashCode() |
ConfiguredModel.Builder<VariantBlockStateBuilder> |
modelForState()
Creates a builder for models to assign to this state, which when completed
via
ConfiguredModel.Builder.addModel() will assign the resultant set
of models to this state. |
VariantBlockStateBuilder.PartialBlockstate |
partialState()
Complete this state without adding any new models, and return a new partial
state via the parent builder.
|
VariantBlockStateBuilder |
setModels(ConfiguredModel... models)
Set this variant's models, and return the parent builder.
|
boolean |
test(BlockState blockState) |
java.lang.String |
toString() |
<T extends java.lang.Comparable<T>> |
with(IProperty<T> prop,
T value) |
private final Block owner
private final java.util.SortedMap<IProperty<?>,java.lang.Comparable<?>> setStates
@Nullable private final VariantBlockStateBuilder outerBuilder
PartialBlockstate(Block owner, @Nullable VariantBlockStateBuilder outerBuilder)
PartialBlockstate(Block owner, java.util.Map<IProperty<?>,java.lang.Comparable<?>> setStates, @Nullable VariantBlockStateBuilder outerBuilder)
public <T extends java.lang.Comparable<T>> VariantBlockStateBuilder.PartialBlockstate with(IProperty<T> prop, T value)
private void checkValidOwner()
public ConfiguredModel.Builder<VariantBlockStateBuilder> modelForState()
ConfiguredModel.Builder.addModel()
will assign the resultant set
of models to this state.ConfiguredModel.Builder
public VariantBlockStateBuilder.PartialBlockstate addModels(ConfiguredModel... models)
setModels(ConfiguredModel...)
.models
- The models to add.this
java.lang.NullPointerException
- If the parent builder is null
public VariantBlockStateBuilder setModels(ConfiguredModel... models)
models
- The models to setjava.lang.NullPointerException
- If the parent builder is null
public VariantBlockStateBuilder.PartialBlockstate partialState()
addModels(ConfiguredModel...)
.VariantBlockStateBuilder.partialState()
.java.lang.NullPointerException
- If the parent builder is null
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Block getOwner()
public java.util.SortedMap<IProperty<?>,java.lang.Comparable<?>> getSetStates()
public boolean test(BlockState blockState)
test
in interface java.util.function.Predicate<BlockState>
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Comparator<VariantBlockStateBuilder.PartialBlockstate> comparingByProperties()