PSN:
PSN, I'm assuming, stands for Psychic Super Narwhal.
Member Details
Hey folks,
I've got a rather odd inquiry. Is it possible to remove an enchantment from the Enchanting Table, so that players can't enchant an item with that enchantment? For example, I want to remove Sharpness so that Sharpness is never a result of enchanting.
Yeah, it's odd, but my mod justifies it. Is there a way to do this? If so, how?
Thanks,
JavaMatrix
Rollback Post to RevisionRollBack
If I'm being mean, tell me. Chances are, I'm not trying to be.
I reject your reality and substitute Minecraft.
Java means Coffee and Coding. Matrix means Math and Programmers who Fight Robots. Together, they mean me.
/** Removes an enchantment from the possible enchantments
* @param enchantment - The enchantment to remove
* @param removeFromBooks - Should the enchantment be removed from books?
* @param removeFromTools - Should the enchantment be removed from tools?
*/
public static void removeEnchantment(Enchantment enchantment, boolean removeFromBooks, boolean removeFromTools)
{
if(removeFromBooks)
Enchantment.enchantmentsBookList[enchantment.effectId] = null;
if(removeFromTools)
Enchantment.enchantmentsList[enchantment.effectId] = null;
}
I've got a rather odd inquiry. Is it possible to remove an enchantment from the Enchanting Table, so that players can't enchant an item with that enchantment? For example, I want to remove Sharpness so that Sharpness is never a result of enchanting.
Yeah, it's odd, but my mod justifies it. Is there a way to do this? If so, how?
Thanks,
JavaMatrix
But not yet