Enable tools.damageMultiplicand property to be float/double.
MobButcher opened this issue · 5 comments
Describe the feature
Having a penalty for using whole tree breaking at once is a nice bonus, but only allowing integers feels too much for me: I want tools to damage only a bit faster, not break twice or thrice as quickly. Since damage inflicted upon the tool is required to be an integer, you can round
, floor
, or ceil
the amount of damage to get an integer, and expose rounding option to the end user.
tools.damageRounding: (round|floor|ceil|random)
or something would be a nice addition. I'd love to set it to 1.2 or 1.4, ceil.
random
can be the same thing as with XP orbs: if the number is not an integer, you give the integer to the user and the remainder is used as a percentage of chance that they will receive another orb. Or, in this case, a damage point.
For example, 7.35 damage would translate to 65% of getting 7 damage and 35% of getting 8 damage.
I'll need to change a few things regarding how durability is managed to make it work. But I think this is for the best as currently it isn't really that good.
But will implement that for sure after the bugs are a bit cleared away.
This is a rather early way of doing things and I haven't tested it myself. As I changed parts of the damaging system there may be quacks. Though if you wanna give it a shot: https://www.dropbox.com/t/T9mLLLeSKzeNSDUl
Thank you for the build! Also, this is a perfect opportunity to ask you one slightly stupid, but really important question: I want to clone your project and try to tinker with it and maybe even help you out with this feature. However, I sat here all day without being able to run it from Eclipse. Most I could manage was (finally!) getting rid of all the errors that plagued all throughout the code because of unresolved dependencies and such. Can you help me out? How did you set up your environment and how do you actually build your mod?
Everything is made with Gradle. Dependencies, building etc.
I personally use IntelliJ (and basically just have to open the project, the rest is setup from Gtadle) so I don't know how it interfaces with Eclipse but I'm sure there's some docs online for that.
To build ./gradlew build
. To run fabric ./gradlew :fabric:runClient
. (From my head, I'll edit when I'm be at the comp if it was wrong).
If you plan on trying 1.17+ stuff you'll need a JDK16.