#(andet_) enchantment category problem

70 messages · Page 1 of 1 (latest)

warped dragon
#

what category should i choose to make the enchantment available only for tools and weapons

uncut mantleBOT
#

(andet_) enchantment category problem

uncut mantleBOT
#

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.

warped dragon
#

!help

north mountainBOT
# warped dragon !help
Bot Command Help
**Available Informational Commands:**

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)

**Available Utility Commands:**

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

**Available Meta Docs Commands:**

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

warped dragon
#

!enchantment

polar iron
#

!lang enchantment

north mountainBOT
# polar iron !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...

Group

Script Container System

warped dragon
#

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 - ???
modest jasper
warped dragon
modest jasper
#

I'm asking you.

#

!tias

north mountainBOT
# modest jasper !tias
Info: tias

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.

warped dragon
#

I would like to get a precise answer from the documentation if it uses its own arguments

modest jasper
#

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?

warped dragon
modest jasper
#

Egh. I see your problem.

warped dragon
#

I use a script from the forum to overlay, but it will overlay anything on anything

modest jasper
#

I think I know how to test this.

warped dragon
#

from past experience enchantments from denizen do not appear in enchantment table

modest jasper
#

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.

warped dragon
#

what I was able to find out was that the tools are not WEAPON

modest jasper
#

Are they not?

warped dragon
modest jasper
warped dragon
#

because a pickaxe can cause damage

modest jasper
#

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.

warped dragon
#

if you specify the item in "can_enchant" it works

modest jasper
#

Correct.

#

I said exclusion, but I suppose you can make it inclusion instead.

warped dragon
#

it seems like a solution but it feels incomplete

modest jasper
#

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.

warped dragon
#

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

modest jasper
#

I get it.

warped dragon
#

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

modest jasper
#

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.

warped dragon
#

Are my assumptions about this correct BREAKABLE and WEARABLE ?
and what is VANISHABLE ?

modest jasper
#

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.

warped dragon
modest jasper
#

Oh, and I guess compass and brushes too???

#

(TIL compass can even be enchanted at all???)\

warped dragon
royal wraithBOT
modest jasper
#

I mean creative ignores limitations with enchants usually don't it?

warped dragon
#

I mean not all exceptions are ignored in the creative

#

Well, my main question was resolved.

modest jasper
#

Anything else?

warped dragon
#

not

#

Thanks again for your help