
Strange behavior of configuration
tuguzD opened this issue · 3 comments
I tried to change some stats of weapons and armor, but some of the changes didn't apply.
Firstly, something about config file is wrong — sword and hoe attack damage were lowered in file, but it didn't change in-game.
Here, I changed it this way so it will work (at some places):
But when I looked into the code, I guessed there might be inconsistencies:
- Here, we have "int-float-int-float-int" construction, but in config file all comments told me that I should use
float
entries:
- Here, while file generates, float type inserts, but
int
expected (?). Also, we don't see "int-float-int-float-int" construction anymore.
Secondly, I didn't see any changes after I set endonium.armour.knockbackresistance
as 1 or 1.0:
- GUI didn't show any changes like "+1 Knockback Resistance".
- After my tests using Dispenser with arrows, I though that changing
endonium.armour.knockbackresistance
doesn't even work, as I tried taking damage both in full Netherite and Endonium armor sets, but player with Endonium armor had different knockback.
I still cannot solve the issue. Here's why:
"Here, we have "int-float-int-float-int" construction, but in config file all comments told me that I should use float entries"
No, int is not expected.
In fabric, it is very weird that they cannot let us create AxeItem, PickaxeItem and HoeItem.
Instead, you have to create 3 class that extends the items.
These new classes must use an int for attack damage perimeter. However, SwordItem and ShovelItem can be directly created, and somehow these 2 can use a float or an int.
I chooses float is because I want they damage to be 1.6 and some number that is irrational.
But what I found, is that the above tool system is actually working as intended, but the armor system isnt.
I still have no idea what is going on. I have tried a lot of code, but the issue that knockback resistance not working is still currently unsolvable.
Thank you for giving feedback :D If you know how to code mod using fabric, I think I might need some help with the config of armor.
-Ray
I know this issue, tho I have no idea why it happened. I might be able to fix it in the future, but there is a possible chance that I cannot.