Record Class AllPotatoProjectileRenderModes.TowardMotion
java.lang.Object
java.lang.Record
com.simibubi.create.content.equipment.potatoCannon.AllPotatoProjectileRenderModes.TowardMotion
- All Implemented Interfaces:
PotatoProjectileRenderMode
- Enclosing class:
AllPotatoProjectileRenderModes
public static record AllPotatoProjectileRenderModes.TowardMotion(int spriteAngleOffset, float spin)
extends Record
implements PotatoProjectileRenderMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<AllPotatoProjectileRenderModes.TowardMotion> -
Constructor Summary
ConstructorsConstructorDescriptionTowardMotion(int spriteAngleOffset, float spin) Creates an instance of aTowardMotionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<? extends PotatoProjectileRenderMode> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatspin()Returns the value of thespinrecord component.intReturns the value of thespriteAngleOffsetrecord component.final StringtoString()Returns a string representation of this record class.voidtransform(com.mojang.blaze3d.vertex.PoseStack ms, PotatoProjectileEntity entity, float pt)
-
Field Details
-
CODEC
public static final com.mojang.serialization.MapCodec<AllPotatoProjectileRenderModes.TowardMotion> CODEC
-
-
Constructor Details
-
TowardMotion
public TowardMotion(int spriteAngleOffset, float spin) Creates an instance of aTowardMotionrecord class.- Parameters:
spriteAngleOffset- the value for thespriteAngleOffsetrecord componentspin- the value for thespinrecord component
-
-
Method Details
-
transform
public void transform(com.mojang.blaze3d.vertex.PoseStack ms, PotatoProjectileEntity entity, float pt) - Specified by:
transformin interfacePotatoProjectileRenderMode
-
codec
- Specified by:
codecin interfacePotatoProjectileRenderMode
-
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 with '=='. -
spriteAngleOffset
public int spriteAngleOffset()Returns the value of thespriteAngleOffsetrecord component.- Returns:
- the value of the
spriteAngleOffsetrecord component
-
spin
public float spin()Returns the value of thespinrecord component.- Returns:
- the value of the
spinrecord component
-