If block name is

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

iTargetDS

New Member
Jan 10, 2020
5
0
0
43
Hi!

I have error.

My code is here;

Code:
on break of dirt:
    if block name is "&atest":
        send ":)"
if block name is "&atest" not working.
What should i do?
 
Code:
break of dirt:
    if name of event-block is "&atest":
        send ":)"
 
Placked blocks don't have names.

Try:
Code:
on place of dirt named "&atest":
    set {dirt::%event-block's location%}

on break of dirt:
    if {dirt::%event-block's location%} is set:
        send ":)"
        delete {dirt::%event-block's location%}
 
Last edited:
Placked blocks don't have names.

Try:
Code:
on place of dirt named "&atest":
    set {dirt::%event-block's location%}

on break of dirt:
    if {dirt::%event-block's location%} is set:
        send ":)"
        delete {dirt::%event-block's location%}
Placed blocks do indeed have names, if you rename a dispenser (or any type of container) in an anvil, place down that container and open it, you'll see that instead of saying the container's regular name, it says what you renamed it do. Their name is stored in NBT Data
 
Code:
break of dirt:
    if name of event-block is "&atest":
        send ":)"
Not working
[doublepost=1582917420,1582917387][/doublepost]
Placked blocks don't have names.

Try:
Code:
on place of dirt named "&atest":
    set {dirt::%event-block's location%}

on break of dirt:
    if {dirt::%event-block's location%} is set:
        send ":)"
        delete {dirt::%event-block's location%}
I don't want variable for this.
 
Placed blocks do indeed have names, if you rename a dispenser (or any type of container) in an anvil, place down that container and open it, you'll see that instead of saying the container's regular name, it says what you renamed it do. Their name is stored in NBT Data

We were talking about dirt, not containers (which btw. are entities).

I don't want variable for this.
Then why did you ask for help?
 
Last edited:
Placed blocks do indeed have names, if you rename a dispenser (or any type of container) in an anvil, place down that container and open it, you'll see that instead of saying the container's regular name, it says what you renamed it do. Their name is stored in NBT Data
That'd be the inventory name, not block name
 
Status
Not open for further replies.