Jump to content

How to save item changes?


Maris

Recommended Posts

If I change icon:

item:setTexture(new_icon);

everything is fine but after reloading the game there is old icon.

 

 

If I change weight:

item:setWeight(0.5);
item:setActualWeight(0.5);

everything is fine but after reloading the game there is old weight.

Link to comment
Share on other sites

Oh, thanks, but I meant changes to exact single separate item in inventory.

Your code affects ALL (new) items in the world.

 

Btw I found a way to save weight:

item:setActualWeight(0.33)
item:setCustomWeight(true)

But I still can't save custom changed icon of vanilla item (not custom item from my mod).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...