Package vazkii.botania.common.crafting
Record Class BlockTypeIngredient
java.lang.Object
java.lang.Record
vazkii.botania.common.crafting.BlockTypeIngredient
- All Implemented Interfaces:
Predicate<net.minecraft.world.level.block.state.BlockState>,StateIngredient
public record BlockTypeIngredient(net.minecraft.world.level.block.Block block)
extends Record
implements StateIngredient
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBlockTypeIngredient(net.minecraft.world.level.block.Block block) Creates an instance of aBlockTypeIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.booleanIndicates 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.state.BlockState> booleantest(net.minecraft.world.level.block.state.BlockState blockState) 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
-
BlockTypeIngredient
public BlockTypeIngredient(net.minecraft.world.level.block.Block block) Creates an instance of aBlockTypeIngredientrecord class.- Parameters:
block- the value for theblockrecord component
-
-
Method Details
-
test
public boolean test(net.minecraft.world.level.block.state.BlockState blockState) - 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. -
block
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-