I added this new food stat to FoodStats.java. It is called foodExhaustionLimit. I defined foodExhaustionLimit as 4F, and replaced 4F with foodExhaustionLimit in the code where food exhaustion reaches 4F in vanilla. I tested this out and it worked just like vanilla. When I edited the foodExhaustionLimit, raising it and lowering it worked as intended.
However, I am at a loss for making code that will do the thing that I was thinking of doing with the food exhaustion limit when I added it. That thing is making each piece of leather armor add 1F to the player's foodExhaustionLimit as long as it is equipped. This would mean that the more leather armor you have on, the longer it takes for you to get hungry.
Here is some code that I am starting out with and for a start I want to make sure that I am able to give leather armor an effect at all, specifically immunity to fire for purposes of testing. However, it won't recognize the leather armor, how do I get it to recognize the leather armor? It won't go into italics and it keeps saying "bootsLeather cannot be resolved to a variable" for each of the equipment respectively.
He isn't modding base classes. And base class modding isn't a reason not to help someone. Anyways, I think you probably need to add Item before all of the items. Such as Item.bootsLeather.itemID
Rollback Post to RevisionRollBack
Did I help? Hit the at the lower right corner of my post!
He isn't modding base classes. And base class modding isn't a reason not to help someone. Anyways, I think you probably need to add Item before all of the items. Such as Item.bootsLeather.itemID
Probably that, only thing I can see that could be in-correct, and YES there are cases where you just need to tell people to not edit baseclasses because it can be rather stupid, such as editing EnumToolMaterial, Block, Item and whatnot WITH NO special reason to do so.
However, it won't recognize the leather armor, how do I get it to recognize the leather armor? It won't go into italics and it keeps saying "bootsLeather cannot be resolved to a variable" for each of the equipment respectively.
Did you call bootsLeather from item.class?
shouldnt it be
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
u have them flipped
boots is minecraft.thePlayer.inventory.armorInventory[3]; while you said minecraft.thePlayer.inventory.armorInventory[0]; u start with the helm and go down
u have them flipped
boots is minecraft.thePlayer.inventory.armorInventory[3]; while you said minecraft.thePlayer.inventory.armorInventory[0]; u start with the helm and go down
OK, now I've done that, but the leather pants still won't protect me from fire. (I just want to say, thank you for all the help you've given me thus far.)
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
However, I am at a loss for making code that will do the thing that I was thinking of doing with the food exhaustion limit when I added it. That thing is making each piece of leather armor add 1F to the player's foodExhaustionLimit as long as it is equipped. This would mean that the more leather armor you have on, the longer it takes for you to get hungry.
Here is some code that I am starting out with and for a start I want to make sure that I am able to give leather armor an effect at all, specifically immunity to fire for purposes of testing. However, it won't recognize the leather armor, how do I get it to recognize the leather armor? It won't go into italics and it keeps saying "bootsLeather cannot be resolved to a variable" for each of the equipment respectively.
Well, only in some cases.
Probably that, only thing I can see that could be in-correct, and YES there are cases where you just need to tell people to not edit baseclasses because it can be rather stupid, such as editing EnumToolMaterial, Block, Item and whatnot WITH NO special reason to do so.
Did you call bootsLeather from item.class?
shouldnt it be
needs to be
Also do what RANKSHAFT said.
together they are powerful beyond imagination."
Thanks. Now I've done that.
And that.
But, now the problem is it won't work, I'm not immune to fire when I have leather pants on. Here's what I've got:
Have you set in game gook for the ticking?
boots is minecraft.thePlayer.inventory.armorInventory[3];
while you said minecraft.thePlayer.inventory.armorInventory[0];
u start with the helm and go down
Thanks.
How do I do that?
add
to your constructor or load void
OK, now I've done that, but the leather pants still won't protect me from fire. (I just want to say, thank you for all the help you've given me thus far.)
together they are powerful beyond imagination."
Yes.
This is the code right now:
OK, tested that. It didn't work.