#Is there a tool or armor item type?

1 messages · Page 1 of 1 (latest)

iron sparrow
#

i may be overthinking this but my solution is to compare the item to a list containing its related item groups

tools could be (sword, pickaxe, axe, shovel, hoe) and armor can be (helmet, chestplate, leggings, boots)

it's probably not the most optimal or efficient way to do it - but there are no armor & tool types afaik (maybe there's an alias?)

broadcast "tool" if (sword, pickaxe, axe, shovel, hoe) contains %item%
broadcast "armor" if (helmet, chestplate, leggings, boots) contains %item%
wraith crypt
#

I was thinking of using SkBee's minecraft tags

#

Because I can check the tags of the item

iron sparrow
wraith crypt
#

Oh awesome

#

How would I do that?

#

Oh, yeah, it works!! Thank you

#

Why is this not working?

#
    if item is any tool:
        enchant item with sharpness 5```
#

The issue's with the enchant item

#

It says there's no dropped item in an on craft event

iron sparrow
#

pretty sure you have to use event-item
but i dont think you can modify the event-item in a crafting event

wraith crypt
#

How would I modify it?

iron sparrow
#

i honestly have no clue
the default returned value from the event is an unmodifiable itemstack - you could work around it by removing the item and giving the modified item back to the player but there's probably a better way to do it

wraith crypt
#

How would I do that?

#

Sorry for asking so many questions by the way, Skript is super foreign to me, I'm used to lower-level languages

#

Can I make an item and put it in a variable, modify it a bunch, and then return it as the crafted item or something?

lavish furnace
thick wave
#

although shift-clicking it out would bypass editing the cursor slot

wraith crypt
#

I'm trying to give items random attributes, like terraria

#

And if I use on prepare craft, than the player could reroll the item's attributes very easily

thick wave
#

i mean you could cancel the craft event, then generate your item and then add it to their inventory