#Shulker Box Name

1 messages · Page 1 of 1 (latest)

narrow patrol
#

how do I get the name of a shulker box that a player opens? cause when I try to broadcast the name of event-inventory in the on inventory open event and open a named shulker box, it keeps saying "Crafting".

earnest crow
#

if it's placed, i think the answer is nbt

narrow patrol
#

how would I get the name part of the NBT? since its colored so has all those extra stuff

earnest crow
#

theres probably a better way to do it, but this will work:
6th element of ("%tag "CustomName" of nbt of {_block}%" split at """")

narrow patrol
#

actually I just just a string tag of the shulker box to something but it doesn't seem to be setting for some reason

#
set {_shulker} to shulker box named {@name}
set string tag "refill" of nbt of {_shulker} to "true"
give {_shulker} to player
on right click:
    event-block is any shulker box
    string tag "refill" of nbt of event-block is "true"
    send nbt of event-block
earnest crow
#

you should use a byte tag

#

set byte tag "refill" of nbt of {_shulker} to 1

#

0 or 1

#

when you place a block, the nbt changes

#

nbt of blocks and items are different, and they arent persistant

#

you need an on place event to set the custom tag of the block

narrow patrol
earnest crow
#

i don't think so

narrow patrol
#

still no

earnest crow
#

send code

narrow patrol
#
command /shulker:
    permission: shulker.refill
    trigger:
        set {_shulker} to shulker box named {@name}
        set byte tag "refill" of nbt of {_shulker} to 1
        give {_shulker} to player

on place:
    byte tag "refill" of nbt of player's tool is 1
    wait 1 tick
    set byte tag "refill" of nbt of event-block to 1

on right click:
    byte tag "refill" of nbt of event-block is 1
    send nbt of event-block
earnest crow
#

blocks need the custom tag

#

tag "custom;refill" of ...

narrow patrol
#

ok that seems to work now

#

thanks

earnest crow
#

perfect

#

np

#

if ur ever looking for another dev to help you with a server, i'd love to help out :)

#

*shameless self promotion*

narrow patrol
#

this specific thing is not for a server I am working on but will keep that in mind 🤔