Ender IO Forestry

Ender IO Forestry

955k Downloads

[minor issue] armor draining energy from weapon

shadoxxhd opened this issue ยท 3 comments

commented

Issue Description:

Armor energy refill doesn't check energy container type.

What happens:

When the armor needs energy, it drains it from items like 'The Ender' if located in inventory (hotbar is fine).

What you expected to happen:

The armor refill code should check the type of items in your inventory before draining them.

Steps to reproduce:

  1. enable the armor refill option in the config file
  2. equip powered dark armor
  3. put a charged ender sword in your inventory
  4. take damage/jump/otherwise use energy
    Your weapon now lost part of its charge.

Affected Versions (Do not use "latest"):

  • EnderIO: 5.0.29
  • EnderCore: 0.5.35
  • Minecraft: 1.12.2
  • Forge: 12.23.4.2739
  • SpongeForge? no
  • Optifine? no
  • Single Player and/or Server? singleplayer
commented
commented

There's no "energy container type" to check, but dark steel items should not allow energy to be pulled out, so that fixes this, too.

commented

With type I meant checking whether the item extends sword/armor base classes (which should work? correct me if there is no such thing), but what you did seems the better/easier fix.