Record Class Oxidizable
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.builtin.Oxidizable
- Record Components:
nextOxidationStage
- the block that the key value will transform into when its oxidation stage changes
Data map value for oxidizable blocks allowing mods to easily register basic
oxidizing interactions for their blocks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<Oxidizable> private final net.minecraft.world.level.block.Block
The field for thenextOxidationStage
record component.static final com.mojang.serialization.Codec
<Oxidizable> -
Constructor Summary
ConstructorsConstructorDescriptionOxidizable
(net.minecraft.world.level.block.Block nextOxidationStage) Creates an instance of aOxidizable
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.net.minecraft.world.level.block.Block
Returns the value of thenextOxidationStage
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
nextOxidationStage
private final net.minecraft.world.level.block.Block nextOxidationStageThe field for thenextOxidationStage
record component. -
OXIDIZABLE_CODEC
-
CODEC
-
-
Constructor Details
-
Oxidizable
public Oxidizable(net.minecraft.world.level.block.Block nextOxidationStage) Creates an instance of aOxidizable
record class.- Parameters:
nextOxidationStage
- the value for thenextOxidationStage
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)
. -
nextOxidationStage
public net.minecraft.world.level.block.Block nextOxidationStage()Returns the value of thenextOxidationStage
record component.- Returns:
- the value of the
nextOxidationStage
record component
-