Endonium

Endonium

1.6k Downloads

Strange behavior of configuration

tuguzD opened this issue · 3 comments

commented

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):
Trying config file to get working

But when I looked into the code, I guessed there might be inconsistencies:

  1. Here, we have "int-float-int-float-int" construction, but in config file all comments told me that I should use float entries:
    int-float-int-float-int
  2. Here, while file generates, float type inserts, but int expected (?). Also, we don't see "int-float-int-float-int" construction anymore.
    Config file gen

Secondly, I didn't see any changes after I set endonium.armour.knockbackresistance as 1 or 1.0:

  1. GUI didn't show any changes like "+1 Knockback Resistance".
    +1 Knockback Resistance
  2. 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.
commented

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.
image
Instead, you have to create 3 class that extends the items.
image
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

commented

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.

commented

Thank you for commenting tho, I will try and fix it :D I am actually pretty newbie at this, so you can continue to give feedback!