1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Cauldron problem

Discussion in 'Skript' started by FireKun, Mar 16, 2020.

  1. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    Hello people, I have a problem detecting de cauldron, here is the code:

    Code (Text):
    1. on right click:
    2.     if clicked block is a cauldron:
    3.         send "test"
    It seems simple, it doesn't throw any error but I don't know why but when I click to a cauldron it doesn't do anything. I'm using Skript 2.4.1, skRayFall and sk-mirror.

    Thanks.

     
  2. Best Answer:
    Post #14 by Lego_freak1999, Mar 16, 2020
  3. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    mc version
     
  4. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    I'm using 1.12.2
     
  5. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    try this?

    Code (Text):
    1. on right click on cauldron:
     
  6. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    Same, it doesn't throw me any error but nothing happends when I click a cauldron.
     
  7. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    Okay can u run this and send me results:


    Code (Text):
    1. on right click:
    2.     broadcast "1 %type of clicked block%"
    3.     broadcast "1 %player%"
    4.     if clicked block is a cauldron:
    5.         broadcast "2 %type of clicked block%"
    6.         broadcast "2 %player%"
    7.     if clicked block is cauldron:
    8.         broadcast "3 %type of clicked block%"
    9.         broadcast "3 %player%"
     
  8. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
  9. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    Okay uhh idk why but try:

    Code (Text):
    1. on right click on CAULDRON:
     
  10. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    Anything happends, it's really strange.
     
  11. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    well idk temp fix iguess:


    Code (Text):
    1. on right click:
    2.     if "%type of clicked block%" = "CAULDRON":
    3.         send "Hi"
    --- Double Post Merged, Mar 16, 2020, Original Post Date: Mar 16, 2020 ---
    Try deleting materials.json if u want and restart server
    --- Double Post Merged, Mar 16, 2020 ---
    oh maybe:


    Code (Text):
    1. on right click on cauldron_block:
    2.    send "Hi"
     
  12. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    Well, I've already tried this, the problem is that using this I don't know how could I detect the water level of it.

    It does the same.

    With the "_" it throws me an error, and without it nothing happends.
     
  13. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    what version mirror u running?
     
  14. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    If I'm not wrong 0.19.1.
     
  15. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    Code (Text):
    1. import:
    2.     org.bukkit.material.Cauldron
    3.     org.bukkit.material.MaterialData
    4.  
    5. on right click:
    6.     if "%type of clicked block%" = "CAULDRON":
    7.         set {_a} to clicked block.getData()
    8.         set {_b} to clicked block.isEmpty()
    9.         set {_c} to clicked block.isFull()
    10.         send "%{_a}% %{_b}% %{_c}%"
    does this do anything?
     
  16. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    On an empty cauldron it sends me "0 false <none>".
     
  17. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    u can use 0 for the levels keep in mind .getData() is deprecated meaning wenn u update to 1.13 u need to change this.
     
  18. FireKun

    FireKun Member

    Joined:
    Oct 28, 2018
    Messages:
    13
    Likes Received:
    1
    Oh ok, I think this is going to work.

    Thanks for all! :emoji_blush:
     
    • Like Like x 1
  19. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    555
    Likes Received:
    30
    np
    --- Double Post Merged, Mar 26, 2020 at 1:13 PM, Original Post Date: Mar 16, 2020 ---
    @FireKun

    To get back to this u can use :

    Code (Text):
    1. Clicked Block.getBlockData().getLevel()
    If u update to 1.13+.
     
    • Like Like x 1
Loading...