Solved On Right Click of Iron Golem Spawner?

  • 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.
Mar 29, 2019
15
1
0
20
Skript Version: 2.2-dev36
Minecraft Version: 1.8.8


Full Code:
Code:
on right click on mob spawner:
    if clicked block with nbt "/*insert nbt or other solution/*":
        set {_loc} to block's location
        set {mgl::%{_loc}%} to 1
        send "%{mgl::%{_loc}%}%" to player

Errors on Reload:
No errors! I just can't figure out how to get this working.

Information/Help: Basically, I want this code to check when the player right clicks on an iron golem spawner. The Iron Golem spawner has a metadata/datavalue of 52:99, but that doesn't seem to work. I tried using nbt but I'm not really sure how to use that either. Maybe you could use SkStuff or Sk-NBeet

The NBT for the Iron Golem is:
Code:
{EntityId:"VillagerGolem",MaxNearbyEntities:6s,RequiredPlayerRange:16s,SpawnCount:4s,id:"MobSpawner",MaxSpawnDelay:800s,SpawnRange:4s,Delay:11s,MinSpawnDelay:200s}]

Addons using:
skUtilities, Skellett, SkQuery, skRayFall, SkStuff, Umbaska, Ersatz, Sk-NBeet

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I have tried using both nbt tags or datavalue tags & working with SkStuff or Sk-NBeet. Is there an easier way to do this built into another skript addon?
 
You could try something like:
code_language.skript:
if tag "EntityId" of nbt of clicked block contains "VillagerGolem":

Dang, you don't know how much I appreciate this! I've literally spent a whole day on trying to figure this out. Thank you so much! Works like a charm.
 
Status
Not open for further replies.