Record Class VanillaMapColorCodecs.CropAge
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaMapColorCodecs.CropAge
- Enclosing class:
VanillaMapColorCodecs
public static record VanillaMapColorCodecs.CropAge(int age, net.minecraft.world.level.material.MapColor color)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.mojang.serialization.MapCodec<VanillaMapColorCodecs.CropAge> -
Constructor Summary
ConstructorsConstructorDescriptionCropAge(int age, net.minecraft.world.level.material.MapColor color) Creates an instance of aCropAgerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintage()Returns the value of theagerecord component.net.minecraft.world.level.material.MapColorcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
CropAge
public CropAge(int age, net.minecraft.world.level.material.MapColor color) Creates an instance of aCropAgerecord class.- Parameters:
age- the value for theagerecord componentcolor- the value for thecolorrecord 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. -
age
public int age()Returns the value of theagerecord component.- Returns:
- the value of the
agerecord component
-
color
public net.minecraft.world.level.material.MapColor color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-