Class VariantBlockStateBuilder.PartialBlockstate
java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.VariantBlockStateBuilder.PartialBlockstate
- All Implemented Interfaces:
Predicate<net.minecraft.world.level.block.state.BlockState>
- Enclosing class:
- VariantBlockStateBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaddModels(ConfiguredModel... models) Add models to the current state's variant.booleannet.minecraft.world.level.block.BlockgetOwner()SortedMap<net.minecraft.world.level.block.state.properties.Property<?>,Comparable<?>> inthashCode()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.booleantest(net.minecraft.world.level.block.state.BlockState blockState) toString()<T extends Comparable<T>>
VariantBlockStateBuilder.PartialBlockstatewith(net.minecraft.world.level.block.state.properties.Property<T> prop, T value)
-
Method Details
-
comparingByProperties
-
with
public <T extends Comparable<T>> VariantBlockStateBuilder.PartialBlockstate with(net.minecraft.world.level.block.state.properties.Property<T> prop, T value) -
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
public net.minecraft.world.level.block.Block getOwner() -
getSetStates
public SortedMap<net.minecraft.world.level.block.state.properties.Property<?>,Comparable<?>> getSetStates() -
test
public boolean test(net.minecraft.world.level.block.state.BlockState blockState) -
toString
-