Solved Check for blockstate of a door

  • 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.
K

KeesjanDoedel

Skript Version: Skript 2.3.6 by Bensku
Minecraft Version: 1.13.2
---

Hi,
I would like to know how to check for a specific state of a door. (closed door)

How can I use something like this?:
Code:
if targeted block of player is a closed door:

Here are the aliases for blockstates of doors: (but I can't get it to work myself).
https://github.com/SkriptLang/skrip...ca7006e32ce8f1a103f5a14c87db7/redstone.sk#L74

If anybody knows how I can achieve my goal, let me know :emoji_slight_smile:
- Thanks for reading.
 
Thanks! that worked.
Do you know what all the data values of the door mean?
I only know that 0 means closed.

Anyway, i'll change the tag to "solved" now.
 
Thanks! that worked.
Do you know what all the data values of the door mean?
I only know that 0 means closed.

Anyway, i'll change the tag to "solved" now.
You will see them all in this image.... on the website you posted.
The damage value = data value, so 0 = closed east facing door, 1 = closes south facing door, and so on
Screen Shot 2019-04-12 at 12.21.01 PM.png
 
Hi, I just experimented with door-states and I discovered a very strange behaviour. Sometimes, multiple different doorstates still had the same damage value.

I started working on a workaround so you wouldn't have to use data values anymore.
Code:
if target block of player is door:
        set {_block} to "%target block of player%"
        if {_block} contains "open":
                send "[Debug] The door you're looking at is open." to player
    else:
        send "[Debug] The door you're looking at is closed." to player
 
Status
Not open for further replies.