Package vazkii.botania.common.crafting
Record Class BlockTagIngredient
java.lang.Object
java.lang.Record
vazkii.botania.common.crafting.BlockTagIngredient
- All Implemented Interfaces:
Predicate<net.minecraft.world.level.block.state.BlockState>,StateIngredient
public record BlockTagIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag)
extends Record
implements StateIngredient
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBlockTagIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) Creates an instance of aBlockTagIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.List<net.minecraft.world.level.block.state.BlockState> List<net.minecraft.world.item.ItemStack> getType()final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.block.state.BlockStatepick(net.minecraft.util.RandomSource random) Stream<net.minecraft.world.level.block.Block> resolve()Stream<net.minecraft.world.level.block.state.BlockState> net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag()Returns the value of thetagrecord component.booleantest(net.minecraft.world.level.block.state.BlockState state) toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface vazkii.botania.api.recipe.StateIngredient
descriptionTooltip
-
Constructor Details
-
BlockTagIngredient
public BlockTagIngredient(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) Creates an instance of aBlockTagIngredientrecord class.- Parameters:
tag- the value for thetagrecord component
-
-
Method Details
-
resolve
-
test
public boolean test(net.minecraft.world.level.block.state.BlockState state) - Specified by:
testin interfacePredicate<net.minecraft.world.level.block.state.BlockState>- Specified by:
testin interfaceStateIngredient
-
pick
public net.minecraft.world.level.block.state.BlockState pick(net.minecraft.util.RandomSource random) - Specified by:
pickin interfaceStateIngredient
-
getType
- Specified by:
getTypein interfaceStateIngredient
-
getDisplayedStacks
- Specified by:
getDisplayedStacksin interfaceStateIngredient
-
getDisplayed
- Specified by:
getDisplayedin interfaceStateIngredient
-
streamBlockStates
- Specified by:
streamBlockStatesin interfaceStateIngredient
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
tag
public net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag()Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-