minecraft-roguelike icon indicating copy to clipboard operation
minecraft-roguelike copied to clipboard

Enchantments are not being checked for ItemStack validity.

Open KingLemming opened this issue 7 years ago • 4 comments

So this issue was brought to my attention:

https://github.com/CoFH/Feedback/issues/19

and while I can put a workaround for this particular case in on my end, you guys should really be checking the Enchantment to make sure it can go on the ItemStack.

KingLemming avatar Mar 05 '17 13:03 KingLemming

It is checked in as much as it's checked when you place an item into the enchanting table.

Can you give me a specific case of an item that shouldn't be enchanted, which is? I need something to test against.

Greymerk avatar Mar 05 '17 20:03 Greymerk

Right, I'm saying that the table check isn't enough. Rather than getting the type of the enchantment, and querying that, query the enchant itself.

See the referenced issue for what's happening. I have admittedly handled it on my end, but you should probably take care of it here too. :)

KingLemming avatar Mar 05 '17 20:03 KingLemming

I just downloaded Thermal Expansion and went into game. Grabbed an iron sword and Enchanted Book of Holding IV. It lets me create an Iron Sword of Holding IV. Is this intended?

I'm not convinced I'm the one causing the issue in question.

Edit: never mind. I forgot about creative mode shenanigans.

Greymerk avatar Mar 05 '17 23:03 Greymerk

2017-03-05_15 22 47

Greymerk avatar Mar 05 '17 23:03 Greymerk