Class MultiPartBlockStateBuilder.PartBuilder
java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.MultiPartBlockStateBuilder.PartBuilder
- Enclosing class:
- MultiPartBlockStateBuilder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.google.common.collect.Multimap<net.minecraft.world.level.block.state.properties.Property<?>,Comparable<?>> boolean -
Method Summary
Modifier and TypeMethodDescriptionbooleancanApplyTo(net.minecraft.world.level.block.Block b) final <T extends Comparable<T>>
MultiPartBlockStateBuilder.PartBuildercondition(net.minecraft.world.level.block.state.properties.Property<T> prop, T... values) Set a condition for this part, which consists of a property and a set of valid values.end()Allows having nested groups of conditions if there are not any normal conditions.useOr()Makes this part get applied if any of the conditions/condition groups are true, instead of all of them needing to be true.
-
Field Details
-
conditions
public final com.google.common.collect.Multimap<net.minecraft.world.level.block.state.properties.Property<?>,Comparable<?>> conditions -
nestedConditionGroups
-
models
-
useOr
public boolean useOr
-
-
Method Details
-
useOr
Makes this part get applied if any of the conditions/condition groups are true, instead of all of them needing to be true. -
condition
@SafeVarargs public final <T extends Comparable<T>> MultiPartBlockStateBuilder.PartBuilder condition(net.minecraft.world.level.block.state.properties.Property<T> prop, T... values) Set a condition for this part, which consists of a property and a set of valid values. Can be called multiple times for multiple different properties.- Type Parameters:
T- the type of the property value- Parameters:
prop- the propertyvalues- a set of valid values- Returns:
- this builder
- Throws:
NullPointerException- ifpropisnullNullPointerException- ifvaluesisnullIllegalArgumentException- ifvaluesis emptyIllegalArgumentException- ifprophas already been configuredIllegalArgumentException- ifpropis not applicable to the current block's stateIllegalStateException- if!nestedConditionGroups.isEmpty()
-
nestedGroup
Allows having nested groups of conditions if there are not any normal conditions.- Throws:
IllegalStateException- if!conditions.isEmpty()
-
end
-
canApplyTo
public boolean canApplyTo(net.minecraft.world.level.block.Block b)
-