Electroblob77 / Wizardry

Source code for Electroblob's Wizardry, a Minecraft mod about magic, exploration and adventure. Open-source so other aspiring wizards (a.k.a. programmers 😎) can see the real magic! ✨ Just want to download and play? Head over to the CurseForge page via the link below:
https://minecraft.curseforge.com/projects/electroblobs-wizardry
Other
201 stars 106 forks source link

[Bug] NON_ELEMENTAL_UPGRADE_BONUS doesn't work #876

Open touhouzun opened 3 months ago

touhouzun commented 3 months ago

Is there an existing issue for this?

Observed behaviour

2024-08-18_16 02 43 2024-08-18_16 13 50 2024-08-18_16 19 23 Couldn't apply melee_upgrade or other upgrades to none-elemental wand any further like these screenshots.

Expected behaviour

None-elemental master wand can be applied with up to 12 upgrades, instead of 9.

        // Special upgrades
        Item specialUpgrade = upgrade.getItem();

        int maxUpgrades = this.tier.upgradeLimit;
        if(this.element == Element.MAGIC) maxUpgrades += Constants.NON_ELEMENTAL_UPGRADE_BONUS;

        if(WandHelper.getTotalUpgrades(wand) < maxUpgrades
                && WandHelper.getUpgradeLevel(wand, specialUpgrade) < Constants.UPGRADE_STACK_LIMIT){

Steps to reproduce

  1. take a none-elemental wand and several upgrades from the inventory.
  2. upgrade the wand to maximum.

Crashlog

No response

Environment (Singleplayer/Server, etc.)

Singleplayer

Mod version

4.3.14

Minecraft version

1.12.2

Forge version

1.12.2 - 14.23.5.2860

Other mods

None in the second and third screenshots.