MachineMuse / MachineMusePowersuits

Minecraft mod, take 2
237 stars 105 forks source link

enchanting the power fist breaks the mod. #937

Open MrRedstoneA1 opened 5 years ago

MrRedstoneA1 commented 5 years ago

Version info Java version: Version 8 Update 201 (build 1.8.0_201-b09) Minecraft Forge version: Forge1.12.2-14.23.5.2768

Describe the bug If you use the /give command for the Power Fist and add any enchantment, it locks the power fist into a crash loop. You try to wear the power fist, the game crashes. You can prevent the crashing at loading the world by hammering any other quick slot key to move the selector to another slot. However, even if you delete this broken power fist and make a brand new one without trying to enchant it, the game always crashes when you select it. You can even try making a new world, and make a new power fist, but the game always crashes when you select it. Only way to fixt this is delete the mod, Numina and all config files, and download the mod and Numina again.

To Reproduce Steps to reproduce the behavior:

  1. Make a new world because you will need to delete it later. Use /give and add an enchantment to the power fist. I used Looting V.
  2. Select the power fist. The game will crash.
  3. Reload the world and hammer any other quick slot key. The game will reload and you're not wearing the power fist anymore.
  4. Delete the item without wearing it, and make a new one. If you try to select it, the game will still crash even though it has no enchantment on it.
  5. Make a new world and delete the old one. Get a brand new power fist and try to wear it. The game will still crash.
  6. Delete the mod and Numina, reload the new world. The items will be gone. Delete the config files. Download fresh copies of Modular Powersuits and Numina again. Now close Minecraft and put the fresh mod and Numina back in. Load the world and get a new power fist. Wear it, and it will work normally now.

Expected behavior The power fist will break and always cause a crash, even if you make a new world. Something clearly breaks in the mod or in Numina.

Mod list ModularPowersuits-1.12.2-1.0.42 and Numina-1.12.2-1.0.38

crash-2019-06-24_20.10.46-client.txt

lehjr commented 5 years ago

None of the MPS items are meant to be enchanted

lehjr commented 5 years ago

normally, I would mark this as invalid, but I can't because it should not be crashing like that.

lehjr commented 5 years ago

Can't reproduce. All I get is "the selected enchantment can't be added to the target item".

MrRedstoneA1 commented 5 years ago

You have to use the /give command with the enchantment tag, Here you go: /give @p powersuits:power_fist 1 0 {ench:[{id:21,lvl:5}]} This is the only way to enchant non-enchant-able items.

ma 24. kesäk. 2019 klo 23.48 lehjr (notifications@github.com) kirjoitti:

Can't reproduce. All I get is "the selected enchantment can't be added to the target item".

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MachineMuse/MachineMusePowersuits/issues/937?email_source=notifications&email_token=AKW4FDT55KRYSTHCXIHEN63P4EXJHA5CNFSM4H3BBOW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYOFX6Y#issuecomment-505175035, or mute the thread https://github.com/notifications/unsubscribe-auth/AKW4FDQYSSUOZTKGQXAPQSTP4EXJHANCNFSM4H3BBOWQ .

eyeonus commented 5 years ago

Here's an idea. Don't enchant non-enchantable items. The fact that you have to use a cheat command to get this behaviour means it's YOUR fault, not the developers.

MrRedstoneA1 commented 5 years ago

I agree. I found this out by experimenting. Thanks for taking a look.

ti 25. kesäk. 2019 klo 10.04 Jonathan Jones (notifications@github.com) kirjoitti:

Here's an idea. Don't enchant non-enchantable items. The fact that you have to use a cheat command to get this behaviour means it's YOUR fault, not the developers.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MachineMuse/MachineMusePowersuits/issues/937?email_source=notifications&email_token=AKW4FDUQY4XRI5SWHLFNXM3P4G7QFA5CNFSM4H3BBOW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYPIBWA#issuecomment-505315544, or mute the thread https://github.com/notifications/unsubscribe-auth/AKW4FDQSFZ74PA6APF6KVK3P4G7QFANCNFSM4H3BBOWQ .

lehjr commented 5 years ago

Even though the power fist can't be enchanted by "normal" means, the enchantment modules actually do apply an enchantment to it.

Looking at the code, this is most likely due to an NBT Tag in the model code being read before it's initialized. An easy fix.

lehjr commented 5 years ago

should be fixed in the next version

MrRedstoneA1 commented 5 years ago

Interesting. Glad it's an easy fix.

ti 25. kesäk. 2019 klo 16.05 lehjr (notifications@github.com) kirjoitti:

should be fixed in the next version

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MachineMuse/MachineMusePowersuits/issues/937?email_source=notifications&email_token=AKW4FDV5ANNS4G7DNOWVXD3P4IJ2BA5CNFSM4H3BBOW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQFLBA#issuecomment-505435524, or mute the thread https://github.com/notifications/unsubscribe-auth/AKW4FDQGG6YMHP7VCVWISF3P4IJ2BANCNFSM4H3BBOWQ .