Jump to content

[1.12.2] dynamic item textures


Recommended Posts

38 minutes ago, Merthew said:

Not sure what i did wrong here.

You didn't... do anything? I see no mentions of property overrides in your ItemSyringe.

ModItem, ItemBase, etc is an anti-pattern. Don't use it.

Oh also anything like IHasModel is stupid. All items need models and there is nothing about model registration that requires access to something private/protected in the item. And yes, your ModItem is basically a fancy IHasModel. Don't use it. Register your models in the ModelRegistryEvent.




Instantinate your items directly in the RegistryEvent. Not anywhere else. Not in pre init. If you need a reference to the item later use ObjectHolders.



private int blood = 0;

There is no reason for this to exist.


if(blood == cap || blood == cap - 1 || blood == cap - 2) {
	blood = cap;
else {
	blood += 3;


blood = Math.min(this.cap, blood + 3);



nbt.setInteger("cap", cap);

Any reason you are storing the cap in the NBT? You are only referencing the one declared by your Item instance.


Link to comment
Share on other sites



What is 10 divided by 100? It's 0. 99 / 100 is also 0. Only 100 / 100 is 1. Dividing anything that doesn't have decimal points will just discard anything beyond them. You need to cast one of these to something that has a decimal point, like a float.



Link to comment
Share on other sites

29 minutes ago, Merthew said:

How would i register the items/blocks in the registry event? would i create them in the registryhandler class?

You can store a static field in a class and initialize it in the registry event and then register them.


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

No one thought about CustomMeshDefinitions? Property overrides only work for number values.



Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.


Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.


DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

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.