#Disabling enchantments

23 messages · Page 1 of 1 (latest)

summer jay
#

so, I have a warfare modpack, and I want to remove the enchanting system for once and for all, so no one has an advantage on anyone else, I tried getting help from chat GPT but asking an AI bot for help with a minecraft mod is a bad idea..

proud nebulaBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

summer jay
#

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")
});
});

vestal nest
#

better just download mod that REAPING OF enchanting system entirely

summer jay
#

fair enough .n.

#

do you have any recommendations?

wary robin
summer jay
#

Thanks

#

Can I put them only in the server or I have to put them on the client itself too?

wary robin
#

I'm not sure but it should be easy to test

summer jay
#

awesome, I didn't have to download them!

#

tysm!

#

now... how do I configure it..?

#

it.. didn't work :p

wary robin
#

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

summer jay
#

I'm stupid sorry

#

now.. how do I configure it to disable all enchantments? just type in "all"?

summer jay
#

in the end, the configurations didn't work for me, so my friend sent me this code

#

(he sent it from github)

summer jay
#

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");
});

summer jay
#

didn't work

#

I'm too stupid