#(andet_) enchantment category problem
70 messages · Page 1 of 1 (latest)
(andet_) enchantment category problem
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.
!help
help shows help output
hello shows a source code link
update [project ...] shows an update link for the named project(s)
github [project ...] shows a GitHub link for the named project(s)
issues [project ...] shows an issue posting link for the named project(s)
info <name ...> shows a prewritten informational notice reply
rule [rule ...] shows the identified rule
quote [quote] shows a random quote that matches the search (if any)
logcheck <link> gathers information from a server log paste
versioncheck <version text> checks whether a project version is current
script <link> checks a linked script for basic syntax validity
command [name] [usage/tags] to search commands
mechanism [name] to search mechanisms
tag [name] to search tags
objecttype [name] to search object types
event [name] to search world script events
action [name] to search NPC assignment actions
language [name] to search language docs
guide [name] to search the beginner's guide pages
search [keyword] to search all meta docs
!enchantment
!lang enchantment
Enchantment script containers allow you to register custom item enchantments.
For the most part, they work similarly to vanilla enchantments, albeit with some limitations.
These can be attached to enchanted books and used in anvils,
and can be generated by the enchanting table (requires discoverable: true and treasure_only: false).
In current implementation, custom enchantments do not appear in lore on their own, and will need fake lore added in their place.
This might be fixed in the future.
It may be beneficial in some cases to restart your server after making changes to enchantments, rather than just reloading scripts.
Rarity, Category, and Slots do not apply changes to an already-loaded script until the next restart (except when the script is newly added).
Using these may cause unpr...
Script Container System
in "Enchantment Script Containers" there is a parameter "category" and its values
- ARMOR
- ARMOR_FEET
- ARMOR_LEGS
- ARMOR_CHEST
- ARMOR_HEAD
- WEAPON
- DIGGER
- FISHING_ROD
- TRIDENT
- BREAKABLE
- BOW
- WEARABLE
- CROSSBOW
- VANISHABLE
as I understand it
- ARMOR, ARMOR_FEET, ARMOR_LEGS, ARMOR_CHEST, ARMOR_HEAD - armor and part of armor respectively
- WEAPON - sword, axe, bow, crossbow, trident
- DIGGER - pickaxe, axe, shovel, hoe and possibly scissors
- FISHING_ROD, TRIDENT, BOW, CROSSBOW - only for these items respectively
- BREAKABLE - all things that can take durability damage ? armor included?
- WEARABLE - all items that can be equipped in armor slots ?
- VANISHABLE - ???
in DIGGER scissor to shears
Does weapon work since tools have attack damage?
is this a question? I am not a developer I don't know
Try it and see!
If somebody pulled this up for you, you're probably asking a question of the public channel that's easier and faster to figure out by just attempting your idea in-game and looking at the result of that attempt.
I would like to get a precise answer from the documentation if it uses its own arguments
weapon may include bows, not sure if you want that but you can exclude those easily as per the meta page showing examples.
Well, a developer may be able to answer but as TIAS you may want to try weapon for yourself and see if it works.
Although, hm. I can see the pain of trying to get the enchantment on a table.
Does /enchant ignore checks like that?
yes
Egh. I see your problem.
I use a script from the forum to overlay, but it will overlay anything on anything
I think I know how to test this.
from past experience enchantments from denizen do not appear in enchantment table
Correct.
I think they can in 1.20.5+ but denizen is unstable for enchantments then.
Well, enchantments can show in the enchantment table but they'll be blank.
Yeah 1.21.1 is a bust for enchantments, let me roll back.
what I was able to find out was that the tools are not WEAPON
Are they not?
this is the answer to this assumption
https://paste.denizenscript.com/View/127771 Ah you're right.
Content of Server Log Paste #127771: Denizen Debug Logs From A Minecraft Server... pasted 2024/11/03 11:31:45 UTC-08:00, Paste length: 4972 characters across 49 lines, Content: Java Version: 21.0.3Up-time: 55s
because a pickaxe can cause damage
A quick testing enchantment built only for weapon shows can_enchant is false for it.
Well, hmm.
You'll have to do your own exclusion then, I'd suggest BREAKABLE and excluding some materials of breakable items like shears, bows, armor.
Unless there is something we're missing.
if you specify the item in "can_enchant" it works
it seems like a solution but it feels incomplete
Are you saying this should be a feature request of a new category?
Because I can see something like HOLDABLE or similar being a category, assuming that is even valid to do. I don't know how the enchantment script containers are coded, so it's a little beyond me to say it can be done.
I'm not sure about this, because in the vanilla game there is no character that meets such a request
not a character i wanted to write enchantment
I get it.
I don't think that such functionality will be in demand, in any case it can be implemented using the method that we found
thanks for your help.
although I still have questions about BREAKABLE, WEARABLE and VANISHABLE
What of them?
Breakable sounds like anything with durability.
Wearable sounds like equipment slots, not sure if this includes shields. That's a TIAS.
Vanishable sounds like whats on the tin.
Are my assumptions about this correct BREAKABLE and WEARABLE ?
and what is VANISHABLE ?
VANISHABLE sounds like it's for items that can be applied curse of vanishing.
Which is kind of a weird thing to match.
Because that applies to a lot of things, including pumpkin heads, mob heads too.
agree
Oh, and I guess compass and brushes too???
(TIL compass can even be enchanted at all???)\
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/EnchantmentTarget.html Yeah I see them now.
declaration: package: org.bukkit.enchantments, enum: EnchantmentTarget
in creativity yes
I mean creative ignores limitations with enchants usually don't it?
partially yes
I mean not all exceptions are ignored in the creative
Well, my main question was resolved.
Anything else?