Record Class EnhancedAoRenderStorage.AoObjectCache
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.ao.EnhancedAoRenderStorage.AoObjectCache
- Enclosing class:
EnhancedAoRenderStorage
private static record EnhancedAoRenderStorage.AoObjectCache(FullFaceCalculator calculator, float[] weights)
extends Record
Cache these objects so that they don't need to be reallocated for every
EnhancedAoRenderStorage
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FullFaceCalculator
The field for thecalculator
record component.private final float[]
The field for theweights
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AoObjectCache
(FullFaceCalculator calculator, float[] weights) Creates an instance of aAoObjectCache
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecalculator
record component.final 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.float[]
weights()
Returns the value of theweights
record component.
-
Field Details
-
calculator
The field for thecalculator
record component. -
weights
private final float[] weightsThe field for theweights
record component.
-
-
Constructor Details
-
AoObjectCache
Creates an instance of aAoObjectCache
record class.- Parameters:
calculator
- the value for thecalculator
record componentweights
- the value for theweights
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)
. -
calculator
Returns the value of thecalculator
record component.- Returns:
- the value of the
calculator
record component
-
weights
public float[] weights()Returns the value of theweights
record component.- Returns:
- the value of the
weights
record component
-