HxCKDMS / HxCEnchants

Adds many new enchantments to minecraft.
GNU General Public License v3.0
1 stars 0 forks source link

regen work incorrectly #29

Closed adamsonich closed 9 years ago

adamsonich commented 9 years ago

tryed regen on leggings, it's use charges from chest armor.

so, in source U have: if (player.inventory.armorItemInSlot(3) != null) H = (short) EnchantmentHelper.getEnchantmentLevel ... ArmourHelm = player.inventory.armorItemInSlot(3), ... if (ArmourHelm != null && ArmourHelm.getTagCompound() != null) HChrg = ArmourHelm.getTagCompound().getLong("HxCEnchantCharge"); ... if (H > 0 && (CChrg > (hp * 2) / Regen || !Configurations.enableChargesSystem)) { if (Configurations.enableChargesSystem) ArmourChest.getTagCompound().setLong("HxCEnchantCharge",

DrZed commented 9 years ago

Are you stupid? your quote is all helmet...

DrZed commented 9 years ago

Anyway it wasn't working properly since I had the wrong order >_>. BUT if you were thinking H was legs or armor in slot 3 was supposed to be legs you're wrong. H=Helmet slots in minecraft code go from boots(0)->Helm(3)

adamsonich commented 9 years ago

I don't even think that H is helmet/chest/leggens/boots. I wrote what I found. So when I found problem I went to Ur repository and found some lines with incorrect logic. I wrote it. And it's all. Thank U. part 2 of debuging: H is Helmet, C is chest, L is leggins, B is boots? U have Helmet and Chest and Chest again in /src/main/java/HxCKDMS/HxCEnchants/Handlers/EnchantHandlers.java#L342 if (H > 0 && (CChrg > (hp * 2) / Regen || !Configurations.enableChargesSystem)) { if (Configurations.enableChargesSystem) ArmourChest.getTagCompound().setLong("HxCEnchantCharge", HChrg - H * getData("Regen", "armor")[4]);

DrZed commented 9 years ago

Fixed thanks