Jump to content

Recommended Posts

Posted

 Hello, for several days I've been trying to find a way to add my animations in this style.

@Override
public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {

}

 

My current public class is :

public class FakePlayerModelWithAnim<T extends FakePlayerEntity> extends EntityModel<EntityRenderState>

 

But i can't do that : 

public class FakePlayerModelWithAnim<T extends FakePlayerEntity> extends EntityModel<T>

Type parameter 'T' is not within its bound; should extend 'net.minecraft.client.renderer.entity.state.EntityRenderState'

But with EntityRenderState it ok and it work !

 

But my setupAnim look like this : 

@Override
public void setupAnim(EntityRenderState p_370046_) {
super.setupAnim(p_370046_);
}

 

I don't have any access to my entity !

Look like 1.21.1 :

@Override
public void setupAnim(FakePlayerEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
this.root().getAllParts().forEach(ModelPart::resetPose);
this.applyHeadRotation(netHeadYaw, headPitch);

this.animateWalk(FakePlayerEntityAnimations.ANIM_PLAYERS_WALKING, limbSwing, limbSwingAmount, 2f, 2.5f);
this.animate(entity.idleAnimationState, FakePlayerEntityAnimations.ANIM_PLAYERS_IDLE, ageInTicks, 1f);
}

But i'm stuck with new version of Forge...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.