Jump to content

Custom Player Model, Custom Player Animation


None283

Recommended Posts

1 hour ago, None283 said:

What is the idea to modify custom player model, and custom player animation like mo'bend? i didn't understand how it work

If you want to use a custom player model, you would need to cancel the PlayerRenderEvent$Pre and render your model in there. The animations from then are just the same as any others where values increase and decrease to get the desired result after some Mth#lerp to smooth it out.

You can use blockbench to create the custom player model and then either do the animations manually or through some library like geckolib.

  • Sad 1
Link to comment
Share on other sites

8 hours ago, ChampionAsh5357 said:

If you want to use a custom player model, you would need to cancel the PlayerRenderEvent$Pre and render your model in there. The animations from then are just the same as any others where values increase and decrease to get the desired result after some Mth#lerp to smooth it out.

You can use blockbench to create the custom player model and then either do the animations manually or through some library like geckolib.

can you tell the steps more clearly, or at least tell me where i can find how to render my custom player model, i'm sorry, i just learned about forge yesterday

Link to comment
Share on other sites

Look at any LivingEntityRenderer subtype; PlayerRenderer is actually responsible for supplying the model for the player. You would be responsible for handling the logic in there, or you can create your own subtype and then call the #render method for the logic.

11 hours ago, None283 said:

i'm sorry, i just learned about forge yesterday

This is not really Forge and more like vanilla Minecraft. You would have to do this for any mod loader.

Link to comment
Share on other sites

 

I got a Renderer class

```public class ExampleRenderer extends LivingEntityRenderer<ExampleEntity, PlayerModel<ExampleEntity>> {

           @Override

           public void render() {}

}```

I tried to registered it

```

@SubscribeEvent

public static void registerRenderer(EntityRenderersEvent.RegisterRenderers event) {

          event.registerEntityRenderer(EntityType.PLAYER, ExampleRenderer::new);

}

```

But nothing changed, Can you tell more about how extractly to render a Custom Player Model? Or how should to replace vanilla PlayerRenderer class?

Edited by None283
Link to comment
Share on other sites

On 2/25/2023 at 8:07 PM, ChampionAsh5357 said:

Look at any LivingEntityRenderer subtype; PlayerRenderer is actually responsible for supplying the model for the player. You would be responsible for handling the logic in there, or you can create your own subtype and then call the #render method for the logic.

This is not really Forge and more like vanilla Minecraft. You would have to do this for any mod loader.

Where to call my #render method

Link to comment
Share on other sites

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.