Custom Spawners

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

Rebel100

Member
Sep 17, 2020
12
0
1
24
I want to make a plugin that loops the blocks around a player and has a very small chance of them becoming spawners. I am having 2 issues one whenever I do this it uses the default spawners which is pig and I was wondering how to make that something else and I want it to only loop blocks that are not already spawners.

Skript Version: 2.5.3

Code:
command /spawner:
trigger:
loop all blocks in radius 50 around players:
if loop block is not spawner:
chance of 0.0051%:
set loop-block to zombie spawner

Errors: It says that it can't compare loop block with an item type and zombie spawner doesn't work saying that it is also an item type
 
Well, ¨Zombi Spawner¨ isnt an item, you just need to add NBT, Like This
Code:
command /spawner:
  trigger:
    loop all blocks in radius 50 around players:
      if loop block is not spawner:
        chance of 0.0051%:
        set loop-block to spawner with nbt ¨{SpawnData:{id:"minecraft:zombie"}}¨
 
Thanks for the help but this still does not work it says that spawner with nbt ¨{SpawnData:{id:"minecraft:zombie"}}¨ is neither an item type or a block data. Any idea on how to fix this?
 
hmm, thats weird, it might be different wording for the NBT, becuase i use Skbee, for NBT. im Sorry :emoji_frowning:
 
Status
Not open for further replies.