Jump to content

Change Use Animation Items, how change it?


DouglasRafael

Recommended Posts

I am trying change the animation pose of an item. I tried first change all render system and models, but it is so complicated! so I tried use the anim Poses from Vanilla, but it isn't work too.

There is a method in the item class that changes the AnimPose, for example the Bow item has the getAnimPose() method that changes the position animation to animPose.BOW. I would like to do the same for my custom Item class, but it didn't work. Watch:


public class BronzeSword extends SwordItem{

    public BronzeSword(Tier tier, int i, float v, Properties properties) {
        super(tier, i, v, properties);
    }

    @Override
    public UseAnim getUseAnimation(ItemStack p_41452_) {
        return UseAnim.BLOCK; // he was supposed to have the blocking animation! but it does not work!
    }

Link to comment
Share on other sites

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Hello, I did exactly what you said in the tutorial, but I don't want to do it that way anymore. This is because the control over the model is very low, mainly in first person (trial and error until death).

Then I had a better idea: dynamic item models. Similar to bow, in that there are multiple models for the same item. each template is customizable in BlockBench, no trial and error!

In order for the player to be able to select the item model, what would I have to do? I checked that there are Item overrides and baked models, but I still don't understand. Do I have to redo the whole process from the lowest layer (building the Jsons model) to creating the Item?

Edited by DouglasRafael
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.