Posted June 17, 201510 yr This is like really simple math, but it's still bothering me (and I need some sleep). Is it just me or setting items max durability to X given you X+1 uses? I mean - looking at sword - for iron it has 250 "uses" written in material enum. Items start with 0. Each hit gives +1 till it reaches 250. Items DON'T break at >= but on >, so basically after 250 uses there is still one to go. On in-game display 0 is 250/250, while 250 is 0/250. Now - I am not dumb, but the logic here seems awfully annoying. It's like someone couldn't decide if to go with > and +1 or >= and just wrote something. maxUses = 250 is actually 251. Should this be considered as bug (bad design?)? 1.7.10 is no longer supported by forge, you are on your own.
June 17, 201510 yr This is correct. When you use a mod that shows the durability of a weapon, you will see that there is a '0' use. It's always been this way. If you want a tool to have 9000 uses, give it 8999 uses.
June 17, 201510 yr Author Me: Let's give my item 100 uses with nice 100/100 (percentage-like display). What do you say Vanilla? Vanilla: Ye, sure bro, why not! This is the kind of shit I have to go through. Why?! 1.7.10 is no longer supported by forge, you are on your own.
June 17, 201510 yr You are saying that like your life is much worse than ours. Even tho we all are coders
June 17, 201510 yr Hi Kind of weird in design, like for example arrays are zero-based. Why did the Minecraft developers do that is beyond me! Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
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.