Package com.wdiscute.starcatcher.data
Record Class BonemealInteractionEntry
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.data.BonemealInteractionEntry
public record BonemealInteractionEntry(com.wdiscute.utils.EntryOrTag<net.minecraft.world.level.block.Block> block, com.wdiscute.utils.MaybeStack stack, int weight)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BonemealInteractionEntry> -
Constructor Summary
ConstructorsConstructorDescriptionBonemealInteractionEntry(com.wdiscute.utils.EntryOrTag<net.minecraft.world.level.block.Block> block, com.wdiscute.utils.MaybeStack stack, int weight) Creates an instance of aBonemealInteractionEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.wdiscute.utils.EntryOrTag<net.minecraft.world.level.block.Block> block()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.static com.wdiscute.utils.MaybeStackgetRandom(net.minecraft.core.Holder<net.minecraft.world.level.block.Block> block, net.minecraft.util.RandomSource random) final inthashCode()Returns a hash code value for this object.com.wdiscute.utils.MaybeStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
BonemealInteractionEntry
public BonemealInteractionEntry(com.wdiscute.utils.EntryOrTag<net.minecraft.world.level.block.Block> block, com.wdiscute.utils.MaybeStack stack, int weight) Creates an instance of aBonemealInteractionEntryrecord class.- Parameters:
block- the value for theblockrecord componentstack- the value for thestackrecord componentweight- the value for theweightrecord component
-
-
Method Details
-
getRandom
public static com.wdiscute.utils.MaybeStack getRandom(net.minecraft.core.Holder<net.minecraft.world.level.block.Block> block, net.minecraft.util.RandomSource random) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
block
public com.wdiscute.utils.EntryOrTag<net.minecraft.world.level.block.Block> block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
stack
public com.wdiscute.utils.MaybeStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-