public class MultiPartBlockStateBuilder.PartBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
com.google.common.collect.Multimap<IProperty<?>,java.lang.Comparable<?>> |
conditions |
BlockStateProvider.ConfiguredModelList |
models |
boolean |
useOr |
Constructor and Description |
---|
PartBuilder(BlockStateProvider.ConfiguredModelList models) |
Modifier and Type | Method and Description |
---|---|
boolean |
canApplyTo(Block b) |
<T extends java.lang.Comparable<T>> |
condition(IProperty<T> prop,
T... values)
Set a condition for this part, which consists of a property and a set of
valid values.
|
MultiPartBlockStateBuilder |
end() |
(package private) com.google.gson.JsonObject |
toJson() |
MultiPartBlockStateBuilder.PartBuilder |
useOr() |
public BlockStateProvider.ConfiguredModelList models
public boolean useOr
public final com.google.common.collect.Multimap<IProperty<?>,java.lang.Comparable<?>> conditions
PartBuilder(BlockStateProvider.ConfiguredModelList models)
public MultiPartBlockStateBuilder.PartBuilder useOr()
@SafeVarargs public final <T extends java.lang.Comparable<T>> MultiPartBlockStateBuilder.PartBuilder condition(IProperty<T> prop, T... values)
T
- the type of the property valueprop
- the propertyvalues
- a set of valid valuesjava.lang.NullPointerException
- if prop
is null
java.lang.NullPointerException
- if values
is null
java.lang.IllegalArgumentException
- if values
is emptyjava.lang.IllegalArgumentException
- if prop
has already been configuredjava.lang.IllegalArgumentException
- if prop
is not applicable to the
current block's statepublic MultiPartBlockStateBuilder end()
com.google.gson.JsonObject toJson()
public boolean canApplyTo(Block b)