McJtyMods / DeepResonance

Deep Resonance: a powergen mod for Minecraft involving crystals
47 stars 23 forks source link

Question about NBT Support for custom Anti Radiation Armor #250

Closed mallrat208 closed 6 years ago

mallrat208 commented 6 years ago

This may be a bit of an odd one. It seems as if the there is partial but non-functioning support for declaring Items/armor as Anti Radiation Armor by NBT.

Any armor with the tag AntiRadiationArmor will trigger countSuitPieces which is supposed to determine how many pieces of Radiation Armor the player is wearing. The problem is that while Armor with the NBT Tag will allow that method to trigger, it doesn't actually count as countSuitPieces only looks for items that are an instance of IRadiationArmor.

Should the NBT Tag be checked or is the initial bit in getRadiationProtection just left over from a previous system?

https://github.com/McJty/DeepResonance/blob/a7322df5161922ebc86f5b84491d3b429695bb67/src/main/java/mcjty/deepresonance/items/armor/ItemRadiationSuit.java#L67-L95