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 changesgenerateBlockTransform- Whether aBlockTransformer.BlockTransformDatafor scraping off the oxidization should be generated automatically
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 booleanThe field for thegenerateBlockTransformrecord component.private final BlockThe field for thenextOxidationStagerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionOxidizable(Block nextOxidationStage) Oxidizable(Block nextOxidationStage, boolean generateBlockTransform) Creates an instance of aOxidizablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thegenerateBlockTransformrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thenextOxidationStagerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
nextOxidationStage
The field for thenextOxidationStagerecord component. -
generateBlockTransform
private final boolean generateBlockTransformThe field for thegenerateBlockTransformrecord component. -
CODEC
-
-
Constructor Details
-
Oxidizable
-
Oxidizable
Creates an instance of aOxidizablerecord class.- Parameters:
nextOxidationStage- the value for thenextOxidationStagerecord componentgenerateBlockTransform- the value for thegenerateBlockTransformrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
nextOxidationStage
Returns the value of thenextOxidationStagerecord component.- Returns:
- the value of the
nextOxidationStagerecord component
-
generateBlockTransform
public boolean generateBlockTransform()Returns the value of thegenerateBlockTransformrecord component.- Returns:
- the value of the
generateBlockTransformrecord component
-