#Disabling enchantments
23 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
is this code fine?
event.remove({ output: 'minecraft:enchant })
or this code? (just stole it from google)
// Prevent all enchantments from being added to items
ItemEvents.modification(event => {
// This is a very broad example and might break other mods
// You would typically want to be more specific, e.g., by checking item types
event.modifyAllTags("minecraft:enchanted", item => {
// This is a simplified example; you would need to add logic to remove specific enchantments
// event.remove(item, "minecraft:unbreaking")
});
});
better just download mod that REAPING OF enchanting system entirely
I use both of these mods
https://www.curseforge.com/minecraft/mc-mods/enchantato-enchantment-table
https://www.curseforge.com/minecraft/mc-mods/enchantato-loot
Thanks
Can I put them only in the server or I have to put them on the client itself too?
I'm not sure but it should be easy to test
awesome, I didn't have to download them!
tysm!
now... how do I configure it..?
it.. didn't work :p
What didn't work? The mods remove enchantments from looted items and the enchanting table only if configured to do so and you would need to open the config files in either the config folder or the serverconfig folder that is in the world folder
I'm stupid sorry
now.. how do I configure it to disable all enchantments? just type in "all"?
in the end, the configurations didn't work for me, so my friend sent me this code
(he sent it from github)
here's what I did in the end;
MoreJSEvents.filterAvailableEnchantments((event) => {
// Remove the given enchantment
event.remove("minecraft:unbreaking", "minecraft:protection", "minecraft:fire_protection", "minecraft:feather_falling", "minecraft:blast_protection", "minecraft:projectile_protection", "minecraft:respiration", "minecraft:aqua_affinity", "minecraft:thorns", "minecraft:depth_strider", "minecraft:frost_walker", "minecraft:sharpness", "minecraft:smite", "minecraft:bane_of_arthropods", "minecraft:knockback", "minecraft:fire_aspect", "minecraft:looting", "minecraft:efficiency", "minecraft:silk_touch", "minecraft:fortune", "minecraft:power", "minecraft:punch", "minecraft:flame", "minecraft:infinity", "minecraft:luck_of_the_sea", "minecraft:lure", "minecraft:unbreaking", "minecraft:mending");
});