Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (in SeaOtterModel class)
- public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
- this.root().getAllParts().forEach(ModelPart::resetPose);
- this.head.xRot = headPitch * 0.017453292F;
- this.head.yRot = netHeadYaw * 0.017453292F;
- if (entity.isInWaterOrBubble()) {
- this.animateWalk(SeaOtterAnimation.SEA_OTTER_SWIMMING, limbSwing, limbSwingAmount, 10.0F, 8.5F);
- }
- this.animate(entity.idleAnimationState, SeaOtterAnimation.SEA_OTTER_IDLE, ageInTicks);
- }
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- (in SeaOtter entity class)
- public void tick() {
- super.tick();
- if (this.level().isClientSide()) {
- this.idleAnimationState.animateWhen(this.isInWaterOrBubble() && !this.walkAnimation.isMoving(), this.tickCount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement