#Prevent Using Custom Model Data in anvil

1 messages · Page 1 of 1 (latest)

hearty viper
#

how on Earth does the condition inventory is an anvil not give an error?

#

you want event-inventory is an anvil inventory. Without the inventory at the end, Skript should treat anvil as an item or block

#

as for the name, readthedocs for "anvil rename text"

old beacon
#

you are putting {item’s custom model data} inside of a var, that will never work

tight tundra
#

so smth like this?

on inventory click:
    if event-inventory is an anvil inventory:
        if gui-slot-type is result slot:
            set {_item} to event's cursor
            if {_item}'s custom model data is 1000:
                cancel event
                send "<red>You cannot use this item in the anvil." to the player
hearty viper
#

what is event's cursor? what is gui-slot-type?

#

you want to checkindex of event-slot. should be 0, 1, and 2

old beacon
#

this is beginning to look AI generated… please do not use ai to generate code if you are
use event-slot and event-item instead of whatever those values are

tight tundra
#

gui-slot-type is from the skript plugin TuSKe

old beacon
#

don’t use tuske anymore
remove it and switch to vanilla skript syntax
tuske is very outdated and buggy and should not be used anymore