Package vazkii.botania.common.crafting
Record Class BlockStateIngredient
java.lang.Object
java.lang.Record
vazkii.botania.common.crafting.BlockStateIngredient
- All Implemented Interfaces:
Predicate<net.minecraft.world.level.block.state.BlockState>,StateIngredient
public record BlockStateIngredient(net.minecraft.world.level.block.state.BlockState state)
extends Record
implements StateIngredient
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBlockStateIngredient(net.minecraft.world.level.block.state.BlockState state) Creates an instance of aBlockStateIngredientrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable List<net.minecraft.network.chat.Component> A description tooltip to display in areas like JEI recipes.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) net.minecraft.world.level.block.state.BlockStatestate()Returns the value of thestaterecord component.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.
-
Constructor Details
-
BlockStateIngredient
public BlockStateIngredient(net.minecraft.world.level.block.state.BlockState state) Creates an instance of aBlockStateIngredientrecord class.- Parameters:
state- the value for thestaterecord 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
-
descriptionTooltip
Description copied from interface:StateIngredientA description tooltip to display in areas like JEI recipes.- Specified by:
descriptionTooltipin 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. -
state
public net.minecraft.world.level.block.state.BlockState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-