Record Class Strippable
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.builtin.Strippable
- Record Components:
strippedBlock- the stripped block, as a result of being right-clicked by an axe
Data map value for
strippable blocks.
Note that the stripped block will inherit all properties of the unstripped block, given that they're present on the strippable block as well.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Strippable> static final com.mojang.serialization.Codec<Strippable> private final BlockThe field for thestrippedBlockrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStrippable(Block strippedBlock) Creates an instance of aStrippablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestrippedBlockrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
strippedBlock
The field for thestrippedBlockrecord component. -
STRIPPED_BLOCK_CODEC
-
CODEC
-
-
Constructor Details
-
Strippable
Creates an instance of aStrippablerecord class.- Parameters:
strippedBlock- the value for thestrippedBlockrecord 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). -
strippedBlock
Returns the value of thestrippedBlockrecord component.- Returns:
- the value of the
strippedBlockrecord component
-