Record Class ExtrusionRecipe.Input
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.common.processing.extrusion.ExtrusionRecipe.Input
- All Implemented Interfaces:
net.minecraft.world.item.crafting.RecipeInput
- Enclosing class:
ExtrusionRecipe
public static record ExtrusionRecipe.Input(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction extrusionDirection)
extends Record
implements net.minecraft.world.item.crafting.RecipeInput
-
Constructor Summary
ConstructorsConstructorDescriptionInput(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction extrusionDirection) Creates an instance of aInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.core.DirectionReturns the value of theextrusionDirectionrecord component.net.minecraft.world.item.ItemStackgetItem(int index) final inthashCode()Returns a hash code value for this object.intsize()net.minecraft.world.level.block.state.BlockStatestate()Returns the value of thestaterecord component.final StringtoString()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 net.minecraft.world.item.crafting.RecipeInput
isEmpty
-
Constructor Details
-
Input
public Input(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction extrusionDirection) Creates an instance of aInputrecord class.- Parameters:
state- the value for thestaterecord componentextrusionDirection- the value for theextrusionDirectionrecord component
-
-
Method Details
-
getItem
public net.minecraft.world.item.ItemStack getItem(int index) - Specified by:
getItemin interfacenet.minecraft.world.item.crafting.RecipeInput
-
size
public int size()- Specified by:
sizein interfacenet.minecraft.world.item.crafting.RecipeInput
-
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. -
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). -
state
public net.minecraft.world.level.block.state.BlockState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
extrusionDirection
public net.minecraft.core.Direction extrusionDirection()Returns the value of theextrusionDirectionrecord component.- Returns:
- the value of the
extrusionDirectionrecord component
-