mirror of
https://github.com/nimsolated/Nims-Random-BS.git
synced 2026-04-02 10:20:42 -07:00
update: 1.4.0
This commit is contained in:
104
models/animations/tuxModelAnimation.java
Normal file
104
models/animations/tuxModelAnimation.java
Normal file
@@ -0,0 +1,104 @@
|
||||
// Save this class in your mod and generate all required imports
|
||||
|
||||
/**
|
||||
* Made with Blockbench 5.0.7 Exported for Minecraft version 1.19 or later with
|
||||
* Mojang mappings
|
||||
*
|
||||
* @author Author
|
||||
*/
|
||||
public class tuxModelAnimation {
|
||||
public static final AnimationDefinition walking = AnimationDefinition.Builder.withLength(1.0F).looping()
|
||||
.addAnimation("LeftLeg",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -5.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("RightLeg",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 7.5F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("RightArm",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(-27.5F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.75F, KeyframeAnimations.degreeVec(-27.5F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("LeftArm",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.5F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.75F, KeyframeAnimations.degreeVec(22.5F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("BodySegment",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 12.5F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.75F, KeyframeAnimations.degreeVec(0.0F, -12.5F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(1.0F, KeyframeAnimations.degreeVec(0.0F, 0.83F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.build();
|
||||
|
||||
public static final AnimationDefinition jumpUp = AnimationDefinition.Builder.withLength(0.25F)
|
||||
.addAnimation("root",
|
||||
new AnimationChannel(AnimationChannel.Targets.POSITION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 5.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("RightArm",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(-67.5F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("LeftArm",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(65.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.build();
|
||||
|
||||
public static final AnimationDefinition JumpDown = AnimationDefinition.Builder.withLength(0.25F)
|
||||
.addAnimation("root",
|
||||
new AnimationChannel(AnimationChannel.Targets.POSITION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.posVec(0.0F, 5.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.posVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("RightArm",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(-67.5F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.addAnimation("LeftArm",
|
||||
new AnimationChannel(AnimationChannel.Targets.ROTATION,
|
||||
new Keyframe(0.0F, KeyframeAnimations.degreeVec(65.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR),
|
||||
new Keyframe(0.25F, KeyframeAnimations.degreeVec(0.0F, 0.0F, 0.0F),
|
||||
AnimationChannel.Interpolations.LINEAR)))
|
||||
.build();
|
||||
}
|
||||
@@ -74,11 +74,5 @@ public class Modelpeguin<T extends Entity> extends EntityModel<T> {
|
||||
|
||||
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
|
||||
float headPitch) {
|
||||
this.LeftLeg.xRot = Mth.cos(limbSwing * 1.0F) * -1.0F * limbSwingAmount;
|
||||
this.RightArm.xRot = Mth.cos(limbSwing * 0.6662F + (float) Math.PI) * limbSwingAmount;
|
||||
this.Head.yRot = netHeadYaw / (180F / (float) Math.PI);
|
||||
this.Head.xRot = headPitch / (180F / (float) Math.PI);
|
||||
this.RightLeg.xRot = Mth.cos(limbSwing * 1.0F) * 1.0F * limbSwingAmount;
|
||||
this.LeftArm.xRot = Mth.cos(limbSwing * 0.6662F) * limbSwingAmount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user