Jump to content

Minecraft custom Totem's Animation not functioning


Bogienin

Recommended Posts

I use a little thing here like

Minecraft.getInstance().gameRenderer.displayItemActivation((ItemArgument.getItem(arguments, "param").getItem().getDefaultInstance

And it doesn't seem to function as intended
it is supposed to show the item specified in the command argument "param" that calls this procedure as in the totem animation / "item activation" animation

 

Help is much appreciated for your fellow developer here :)

Link to comment
Share on other sites

That looks like you are calling this from a command?

Unless you have specifically implemented this as a client command, that is wrong.

Commands run on the server so you can't do anything with rendering directly. You need a network packet to tell the client to do something for you.

 

But assuming you are trying this in single player, you should check what ItemStack is actually being used by your code and if it is even being called.

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

And what about your debugging I suggested you do?

 

This works fine for me. I get a spinning diamond when I jump.
 

    @Mod.EventBusSubscriber(modid = MOD_ID, value=Dist.CLIENT)
    public class Test {
        @SubscribeEvent
        public static void livingJump(LivingJumpEvent event) {
            var entity = event.getEntity();
            if (entity instanceof LocalPlayer) {
                Minecraft.getInstance().gameRenderer.displayItemActivation(new ItemStack(Items.DIAMOND, 1));
            }
        }
    }

 

Edited by warjort

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

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.