Record Class IItemCompressionSequence.CompressedBlock
java.lang.Object
java.lang.Record
com.petrolpark.core.recipe.compression.IItemCompressionSequence.CompressedBlock
- Enclosing interface:
IItemCompressionSequence
public static record IItemCompressionSequence.CompressedBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.item.ItemStack stack)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCompressedBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.item.ItemStack stack) Creates an instance of aCompressedBlockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CompressedBlock
public CompressedBlock(net.minecraft.world.level.block.Block block, net.minecraft.world.item.ItemStack stack) Creates an instance of aCompressedBlockrecord class.- Parameters:
block- the value for theblockrecord componentstack- the value for thestackrecord component
-
-
Method Details
-
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). -
block
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-