Jump to content

Recommended Posts

Posted

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

Or how should i can create custom player model with custom animation?

Posted
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
Posted
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

Posted

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.

Posted (edited)

 

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
Posted
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

Posted
On 2/24/2023 at 4:31 PM, ChampionAsh5357 said:

you would need to cancel the PlayerRenderEvent$Pre and render your model in there

Listen to that event on the forge bus and call the render method there after canceling the event.

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.