Record Class LeafTypeLoader.LeafType
java.lang.Object
java.lang.Record
de.cheaterpaul.fallingleaves.data.LeafTypeLoader.LeafType
- Enclosing class:
LeafTypeLoader
public static record LeafTypeLoader.LeafType(Collection<net.minecraft.resources.ResourceLocation> textures, float sizeModifier, float lifeSpanModifier, float snowSizeModifier)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LeafTypeLoader.LeafType> -
Constructor Summary
ConstructorsConstructorDescriptionLeafType()LeafType(Collection<net.minecraft.resources.ResourceLocation> textures, float sizeModifier, float lifeSpanModifier, float snowSizeModifier) Creates an instance of aLeafTyperecord class.LeafType(Collection<net.minecraft.resources.ResourceLocation> textures, Optional<Float> sizeModifier, Optional<Float> lifeSpanModifier, Optional<Float> snowSizeModifier) -
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.floatReturns the value of thelifeSpanModifierrecord component.floatReturns the value of thesizeModifierrecord component.floatReturns the value of thesnowSizeModifierrecord component.Collection<net.minecraft.resources.ResourceLocation> textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
LeafType
-
LeafType
public LeafType() -
LeafType
public LeafType(Collection<net.minecraft.resources.ResourceLocation> textures, float sizeModifier, float lifeSpanModifier, float snowSizeModifier) Creates an instance of aLeafTyperecord class.- Parameters:
textures- the value for thetexturesrecord componentsizeModifier- the value for thesizeModifierrecord componentlifeSpanModifier- the value for thelifeSpanModifierrecord componentsnowSizeModifier- the value for thesnowSizeModifierrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
sizeModifier
public float sizeModifier()Returns the value of thesizeModifierrecord component.- Returns:
- the value of the
sizeModifierrecord component
-
lifeSpanModifier
public float lifeSpanModifier()Returns the value of thelifeSpanModifierrecord component.- Returns:
- the value of the
lifeSpanModifierrecord component
-
snowSizeModifier
public float snowSizeModifier()Returns the value of thesnowSizeModifierrecord component.- Returns:
- the value of the
snowSizeModifierrecord component
-