Record Class Waxable
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.builtin.Waxable
- Record Components:
waxed
- the block that the key value will transform into when waxed with a honeycomb
Data map value for waxable blocks allowing mods to easily register basic
waxing interactions for their blocks.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWaxable
(net.minecraft.world.level.block.Block waxed) Creates an instance of aWaxable
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.net.minecraft.world.level.block.Block
waxed()
Returns the value of thewaxed
record component.
-
Field Details
-
waxed
private final net.minecraft.world.level.block.Block waxedThe field for thewaxed
record component. -
WAXABLE_CODEC
-
CODEC
-
-
Constructor Details
-
Waxable
public Waxable(net.minecraft.world.level.block.Block waxed) Creates an instance of aWaxable
record class.- Parameters:
waxed
- the value for thewaxed
record 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)
. -
waxed
public net.minecraft.world.level.block.Block waxed()Returns the value of thewaxed
record component.- Returns:
- the value of the
waxed
record component
-