Knaves' Needs

Knaves' Needs

2M Downloads

Error pulling SimplySwords weapon settings

zekeflynn opened this issue ยท 0 comments

commented

Posting a comment I made as I went through this bug-finding process.

Hi I'm looking but can't find a config file similar to SimplySwords to edit weapons' damage modifiers and attack speeds. It's no use if they're different from the default mod weapons but I can't find an edittable config with the numbers like SimplySwords has.

EDIT1:

I found code for it but the weapon values are still different.

import net.knavesneeds.config.KnavesSimplyConfig;

        DAMAGE_MODS.put(string, (int) KnavesSimplyConfig.getWeaponAttributes(string + "_positive_damage_modifier") -

                (int) KnavesSimplyConfig.getWeaponAttributes(string + "_negative_damage_modifier"));

        ATTACK_SPEED_MODS.put(string, KnavesSimplyConfig.getWeaponAttributes(string + "_attackspeed"));

EDIT2:

Seems to be pulling from the wrong path.

File f = new File("config/simplyswords/weapon_attributes.json5");

Currently SimplySwords has 2 different config folders "simplyswords_main" and "simplyswords_extra".

EDIT3:

Adding a "simplyswords" folder with a copy of the requested "weapon_attributes.json5" still does not work.

net.minecraftforge.fml.ModLoadingException: Knaves' Needs (knavesneeds) encountered an error during the common_setup event phase

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Float.floatValue()" because the return value of "java.util.HashMap.get(Object)" is null

	at net.knavesneeds.config.KnavesSimplyConfig.getWeaponAttributes(KnavesSimplyConfig.java:24) ~[knavesneeds-forge-1.1.5.2+1.20.1.jar%23491!/:?] {re:classloading}

Please fix, can't use the mod with different values from the base ๐Ÿ™

Either a fix of getWeaponAttributes hashmap, config folder name/location, or allow us to set the values instead of baking in the default in the .class