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 Spawning item frames?

Discussion in 'Skript' started by Aberforth, Jan 2, 2021.

Thread Status:
Not open for further replies.
  1. Aberforth

    Aberforth Member

    Joined:
    Jun 14, 2019
    Messages:
    40
    Likes Received:
    2
    Hi!

    I'm trying to automatically place item frames on blocks by clicking on them with a specific item.
    I can't find any method to do it though.

    Code (Text):
    1. on right click on leaves:
    2.     if player's tool is diamond hoe:
    3.         #how do I spawn the item frame?
    I tried stuff like spawn item frame on clicked block... Can't find a solution online either :\
    Any help helps

     
  2. Best Answer:
    Post #4 by Lego_freak1999, Jan 10, 2021
  3. acai

    acai Active Member

    Joined:
    Oct 23, 2020
    Messages:
    89
    Likes Received:
    1
    Spawn an item frame at the block's location.
    spawn 1 item frame
     
  4. Aberforth

    Aberforth Member

    Joined:
    Jun 14, 2019
    Messages:
    40
    Likes Received:
    2
    No errors, but nothing happens.
    --- Double Post Merged, Jan 9, 2021, Original Post Date: Jan 5, 2021 ---
    Still haven't found any solution. I'm also open to suggestions of any skript addons that could possibly do this. Another idea I had was to get the X Y Z coordinates of the clicked block and execute a console command spawning an item frame at the block with /summon. Not sure how to determine the right rotation of the item frame though. I'll post if I get anywhere this way.
     
  5. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    44
    Took me some time to figure out but:


    Code (Skript):
    1. on right click on leaves:
    2.     if player's tool is diamond hoe:
    3.         spawn a itemframe at block event-direction location of clicked block
     
    • Like Like x 1
  6. Aberforth

    Aberforth Member

    Joined:
    Jun 14, 2019
    Messages:
    40
    Likes Received:
    2
    Thanks! Works flawlessly!
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...