Record Class PipeMandrelAnimation
java.lang.Object
java.lang.Record
com.petrolpark.compat.create.common.processing.mandrel.animation.PipeMandrelAnimation
- All Implemented Interfaces:
IMandrelAnimation
public record PipeMandrelAnimation(net.minecraft.resources.ResourceLocation modelKey)
extends Record
implements IMandrelAnimation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<PipeMandrelAnimation> static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, PipeMandrelAnimation> Fields inherited from interface com.petrolpark.compat.create.common.processing.mandrel.animation.IMandrelAnimation
TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionPipeMandrelAnimation(net.minecraft.resources.ResourceLocation modelKey) Creates an instance of aPipeMandrelAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidanimate(MandrelBlockEntity be, float partialTicks, com.mojang.blaze3d.vertex.PoseStack ms, net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay, float shaftAngle, float recipeProgress) final booleanIndicates whether some other object is "equal to" this one.floatThe angle (in degrees) by which the Shaft must turn over the course of this whole animation.getType()final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationmodelKey()Returns the value of themodelKeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,PipeMandrelAnimation> STREAM_CODEC
-
-
Constructor Details
-
PipeMandrelAnimation
public PipeMandrelAnimation(net.minecraft.resources.ResourceLocation modelKey) Creates an instance of aPipeMandrelAnimationrecord class.- Parameters:
modelKey- the value for themodelKeyrecord component
-
-
Method Details
-
getTotalAngleSubtended
Description copied from interface:IMandrelAnimationThe angle (in degrees) by which the Shaft must turn over the course of this whole animation.- Specified by:
getTotalAngleSubtendedin interfaceIMandrelAnimation
-
animate
public void animate(MandrelBlockEntity be, float partialTicks, com.mojang.blaze3d.vertex.PoseStack ms, net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay, float shaftAngle, float recipeProgress) - Specified by:
animatein interfaceIMandrelAnimation
-
getType
- Specified by:
getTypein interfaceIMandrelAnimation
-
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). -
modelKey
public net.minecraft.resources.ResourceLocation modelKey()Returns the value of themodelKeyrecord component.- Returns:
- the value of the
modelKeyrecord component
-