#[1.21.3] Custom enchantment exceptions.

24 messages · Page 1 of 1 (latest)

lean echo
#
vivid spearBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

smoky snowBOT
#
Changed to Bug

Thread is now a Bug thread. This indicates a core code bug that a developer must resolved, not an error message or other support topic. Please do not misuse the Bug label. Use </helpthread:1028674284870180883> to switch the thread back to a normal help thread if you are not 100% confident it is a code bug.

tidal crown
#

Enchantments were entirely reworked in 1.21, it's on the TODO list

lean echo
#

Re: #denizen-contrib message

Since there is a PR in the works to try to fix this and I'm not fluent in java, what does this actually mean?

#

Will enchantment scripts be deprecated? Or will there be some new way of registering them?

cosmic oxide
#

In their current form, yes - Mojang changed far too much to reliably keep them working in the long term

#

They may be present in a different from in the future using Paper's API (but won't be specifically related to current enchantment scripts beyond what just so happens to match), but for now data packs are the recommended way to handle these (and will also be a lot better than current enchantment scripts, because these now properly register with Mojang and will show in item descriptions, enchantment tables, support things like automatically applying attributes when used, etc.)

lean echo
#

Alright that answers my question. I'm doing some stuff with re-writing the enchantment table and wanted to know if it's worth supporting custom enchantments down the road, I really don't wanna use a datapack because it's tied to that specific world and I like denizen being able to just hotload things on the fly. Though I guess you probably shouldn't make an enchant and then delete it lol.

#

Alright cool I may actually look at this.

cosmic oxide
#

datapacks can be global (and I think always are in practice currently)

lean echo
#

I meant to say uh, if you don't have the datapack installed in the default world then it freaks out in some regards. Since some information relies on that datapack. (Had a custom terrain generator and it was NOT happy about that datapack being gone.)

cosmic oxide
#

And yeah hot-reloading is very useful, but sadly is part of the reason it broke as Mojang really doesn't want you to do that

#

Oh yeah I mean, you have the keep the datapack same way you have to keep the script basically

#

If it's gone Minecraft can't load that data and it generally gets erased (although nothing really breaks, it just deletes itself from items when they try loading)

lean echo
#

I'll consider datapacks. Enchantments are one of the few things holding me back from updating.

cosmic oxide
#

It's a bit of an annoying move, but the upside is datapacks don't have a lot of the limitations Denizen enchantment scripts had 🤷‍♂️

#

You can also do some cool stuff with the Effects section they've added

#

(As they have every vanilla enchantment implemented in a datapack now, so anything they can do can be done from there and customized)

muted tide
#

If I may ask for a best practices reference:

Would it be reasonable to just add empty dummy enchants and use denizen events to catch
on player damages entity item_enchanted:custom_enchant_name and then run the relevant script?

cosmic oxide
#

Sure, the Vanilla effects stuff is handy but you don't have to use them

muted tide
# cosmic oxide Sure, the Vanilla effects stuff is handy but you don't have to use them

I already have a bunch of weird things I coded up in denizen from before the change. 😅 https://github.com/Adriftus-Studios/network-script-data/tree/Stage/denizen_scripts/HeroCraft/Items/enchants/enchantment_containers

GitHub

Public, open-source repository of Adriftus Studios' Minecraft network. Powered by Denizen Script. - Adriftus-Studios/network-script-data