Hello. I am trying to read the value (durability) from a config file for an Shield Item. I cant get the code to work and i need some help. So I just need help on how to call the value from the config file. The code from the Config file works absolutely fine. Here is the code of my Shield Item getting registered and getting the Properties.
public static final DeferredItem<Item> LEATHER_SHIELD = ITEMS.register("leather_shield",
() -> new ShieldItem(new Item.Properties().durability(MoreVanillaShieldsConfig.LEATHER_SHIELD_DURABILITY.get())){
@Override public int getMaxDamage(ItemStack stack) {
return MoreVanillaShieldsConfig.LEATHER_SHIELD_DURABILITY.get();
}
});