Jump to content

Custom sword render


Nosba

Recommended Posts

Hi All,

 

I wrote in this forum some days ago at the topic: http://www.minecraftforge.net/forum/index.php?topic=43007.0.

 

I Asked about how to perform an action with the fml API. Some Users answered me with some tutorials about Events and Events handling. I studied it but I still have a question: How can I render my animation when the player is using my sword? I'll explain better: I know that I have to override some Methods and make an Event Handler, but I sill don't know what methods I have to call to show my textures and my animation. Someone can help me?

Link to comment
Share on other sites

What is your animation supposed to do? Is the item going to have an animation? Is the player going to be animated?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I want to change the animation when the player attacks another player or a mob.

 

An example of what I want is in this video:

 

as you can see the player doesn't attack with the usual animation. I want to do that: change the attack animation.

Link to comment
Share on other sites

I want to change the animation when the player attacks another player or a mob.

 

An example of what I want is in this video:

 

as you can see the player doesn't attack with the usual animation. I want to do that: change the attack animation.

You will want to use the RenderSpecificHandEvent, and actually render the item/hand how you want to. I would do this by rendering it and canceling the event for the animation. Look at ItemRenderer for how vanilla does this.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.



×
×
  • Create New...

Important Information

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