Jump to content

How can change the texture of an item depending of the amount?


BandytBoss

Recommended Posts

18 minutes ago, BandytBoss said:

A link to a forum or something that shows me how to do it

Maybe look inside the class itself. That could always help.

Don't ever try and take the easy way out by trying to find some tutorial that tells you exactly what you need to copy-paste. Apply your knowledge in Java and adapt to the current situation.

Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

Maybe look inside the class itself. That could always help.

Don't ever try and take the easy way out by trying to find some tutorial that tells you exactly what you need to copy-paste. Apply your knowledge in Java and adapt to the current situation.

Where do i find the class?

 

Link to comment
Share on other sites

This post helped me when I was also tackling ItemModelProperties. You want to create a method in your item class that designates each itemstack change with a float, and register it with:

DeferredWorkQueue.runLater(() -> {
    ItemModelsProperties.func_239418_a_(
            ModItems.YOUR_ITEM, new ResourceLocation(MOD_ID, "your_item"),
            (stack, world, entity) -> YourItemClass.yourMethod(stack));
});

And then specify the texture overrides in your item model json. Also you can find vanilla classes in External Libraries => Gradle net.minecraftforge:forge:[version]

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