Hello uhm, I have never touched this kinda code in my life, and have no idea where to begin. I am not looking to use this mod a lot truth be told, I am mostly here out of necessitiy to remove a few specific enchantments I don't like. What tutorials would you recommend for getting this goal done? Given that I don't plan to use this tool that often if at all after this.
#New person, need help with simple script!
179 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
hjelp
pls
uhm
hoii
aaaaaaaaaaaaa
i was also sent here with the following instructions but idk what hey mean or how to implement them, if this helps:
"Which, iirc, can handle arbitrary java events, so you should be able to hook dev.shadowsoffire.placebo.events.GetEnchantmentLevelEvent and use it to force the effective levels of the enchantments you want off to zero"
Hiii
Please be patient, we're helping as fast as we can
We volunteer our time and knowledge to help people as we can.
Not everyone here will have your answer the moment you want it.
Time zones, work/life/schedules etc. also change when people are available to help.
TL;DR: Please have patience. IF and WHEN someone knows, they will assist you.
hmm
I can only assume that you want to prevent certain enchantments from existing at all. I'm interested in this comment though because it looks Apotheosis-related. aren't you able to "remove enchantments" via Apotheosis config?
not sure how to begin to about it using KubeJS, but I'm sure somebody else here may know
The apotheosis config is useless and doesn’t work
And the apotheosis discord is about as helpful as asking a person who just slammed 8 drinks exact directions through a maze.
So I’m here tryna fix it bc I have no other options
Yeah I just wanna remove enchantments. However the wiki is all over the place and the only video tutorials are just about ultra generic things which I wouldn’t really wanna learn as, well as I said in the main blurb I’m mostly here because short of coding a mod to do this myself I have no options
I'm surprised that the config isn't workiing
out of curiosity, what's not working with it?
Everything
Any changes I make the enchanting config simply don’t apply to looting chests
Which is a problem because I’m trying to add balance to apotheosis and the base mod was designed with the unironic principle of “Eh who cares if this feature is not just objectively useless but only causes harm i want it so let’s add it anyways.”
Bump
and you're creating a new world or going ~1k blocks every time you change/update the config after restarting your game, not world?
i just use the loot command directly.
fair enough
saves time
I'm not sure it does nbt data, but you could use LootJS to do it
and im not gonna randomly delete mods bc A: that would take too long and B: unless its a optimization mod that actually secretly sucks
i can't remove mods from the pack
used chunky for the world n' its a server
i think quark has a built in enchantment disabler
in the common.toml theres an enchantments.begone section
Oh my god wait what I didn’t know this
Thank god
You’ve saved my soul
I gotta check if my version of quark runs that
it did not work 😵💫
what specific enchants are you trying to remove?
Smite and smite related, icy thorns, rebounding, and projectile protection and other alternative versions of protections
Blame apotheosis for being quirky and letting them stack with normal prot
And completely bricks balancing
@fast wharf you could try this mod https://www.curseforge.com/minecraft/mc-mods/enchantment-disable-tag
Already waiting for help support of figure out why that mod broke the moment I tried to use it. Fucked up all the origins and other datapacks too
Sofar looking like it’s not an option
Hence why I’m here
I’m entirely out of other options to try and remove enchantments 😵💫
out of curiosity... have you attempted to remove the enchantments on a minimal instance with just quark or apotheosis?
to rule out whether there's an incompatibility somewhere
I’m sure there is
It’s just that this pack I made as very carefully constructed and unless it’s a optimization mod causing it
I can’t remove whatever’s causing this
maybe not, but at least you could rest well knowing that it's not those mods in particular
and report the incompatibility to the respective mods
unlikely to work, and again, it'd genuinely be eaiser for me to just make kubejs script (i presume as much) to just send them to hell (the enchantments)
not to mention that even if i do fix it the damage has already been done
and items with the enchantments i want gone exist
i need a solution thats far more permanent
that gets rid of the enchantments entirely.
hence
i need a script
so with allat being said uhm...
where should i start
😵💫
i still have no idea how to work with kubejs and all the tutorials are for blocks or items n' such
it uses MoreJS (a KubeJS add-on) but-
will this remove anything that has it as well? It says for enchantment tables and such
it says "for enchantment tables, entity items and other stuff"
okay so presumably it won't outright bomb it. I want to deal with the problem at its core and simply destroy any item that has or stop any item from obtaining the enchantments.
huh
enchantment are server-side registries so it probably does outright bomb it
i would tryitandsee first before writing it off because i also was going to suggest this next 
Did I do this right? I don't have whatever formatting thing I need to make this show properly however I think I copied the code here properly???
// Visit the wiki for more info - https://kubejs.com/
MoreJSEvents.filterAvailableEnchantments((event) => {
event.remove("minecraft:fire_protection");
event.remove("minecraft:projectile_protection");
event.remove( "minecraft:blast_protection");
event.remove("minecraft:smite");
event.remove("minecraft:bane_of_arthropods");
event.remove("minecraft:impaling");
event.remove("apotheosis:icy_thorns");
event.remove("apotheosis:rebounding");
});
i put it in server scripts bc i think thats where that should go???
you did it correctly, yes
Paste version of ApotheosisBeGone.js from @fast wharf
incase you'd like to fact check it
however, when I attempted to use it earlier, it only took enchants away from obtaining enchants, not items that had them before the script was made
y-
yeah i was about to point that out
also lemme check if it actually fixed them appearing in chests
spam the /loot command
I don't use Apotheosis mainly because I don't like the gems much & it crashes half the time I add it to my own packs
small issue as much as i bully apotheosis
it is
single handedly holding up the entirety of endgame customization
in place of like
15 mods that add
like
20 items each that i'd only want 4 of
apotheosis plus a few really, really good mods that centralize around a few specific weapons with a lot of unique abilities and 4 different armor sets with unique abilities
you could use the combination of lootjs and morejs to make enchants harder to obtain
issue isn't them being hard issue is apotheosis making them game breaking.
because that mod was made by a bunch of bumbling fools and i wish there was a mod like apotheosis out there that wasn't somehow worse than apotheosis is.
i need them gone gone
completely erased
the reason they're game-breaking is because of the combinations?
yeah you can stack smite and sharpness
and we have origins
and theirs an entire faction of magic that gets affected by smite
it would legit lock away like half the origins and an entire ass playstyle away because funny smite stacking
same logic applies to projectile protection and the rest of the bunch.
it is the single stupidest design decision
and you can't even disable it
because as i said prior
apotheosis devs have actually just zero foresight
infact im pretty sure they have like a tiny but but only because their foresight was so low it integer overflowed back into being a positive value.
have you checked if it was a /gamerule?
i talked with the devs directly its just not a option
ah ok
i have exhausted every single avenue i possibly could here minus bomb the enchantments from orbit 😵💫
which nothing i've tried worked
tried this but the mod devs ghosted me when i asked why shite was breaking
so im SoL there
and now even when i turn to code its seeming to resist everything i try to remove it ;- ;
I'd say it's an issue with file load order, but I know not if it is nor how to change that
it might be breaking due to having items that have those enchants on them in the players' inventories
it seems to be a universal issue caused by a random mod
because configs, scripts, and other mods can't seem to fuckin get rid of them
and i have no clue which mods the problem mod nor do i believe i could get rid of it if i wanted to
like I said: load order
bc as i discussed prior this pack is ultra particular
every individual mod here has a very specific role to play
if i remove one mod everything crumbles unless its like
an optimization mod
what's the exact use case you need apotheosis for?
because if it's just extra stats, then a skill tree mod could be a replacement
I have one in my pack that allows for customization of the xp required for each lvl
theres no good or balanced ones on forge, and its not just extra stats, i need very specifically a mix of baseline stats and special-sub ability like stats that specifically play nice with MnA and Celestisynth
I know what neither of those are so I could not help you
tl;dr
if the skill tree mod so much as does its coding even slightly different it could break balance in two
bc weapons and spells in general have ways to apply ranged attacks
fair enough
so i need the semi-sub abilities to apply only on regular vanilla melee hits
exclusively
with the exception of certian ones like rainfall serenity.
😭 is there no hope for me
everywhere i've gone has been dead end after dead end after dead end...
i can't even use fuckin custom code to fix it
i thought at least kubejs would have something, anything for me to just send the enchantments to hell
i mighta got a
maybe lead?
how does itemevents.crafted work like
exactly.
because we have a custom way of applying enchantments with MnA and i have no idea if that'll just
entirely bypass anything i try and do
also
i have no info on this bc
wiki is silly!
but if anyone knows this or any simpler solution to send enchantments to hell
PLEASE let me know
Or if you just have anything for this I’m desperate I’ll take anything
if you can't remove enchantments directly, I wonder if there's a way to edit the NBT of the item when it enters the inventory to remove the enchantments you don't want? 🤔
the loot tables may be bloated with enchantments that will be deleted, but I don't see any other workaround
also I find it weird that they don't have a config to disable the enchantment stacking
Blame the apotheosis devs for being bumbling fools with zero foresight
It took them half a fuckin decade to put a toggle on that.