Spawner drops when mined with spawn egg of the mob inside it

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

ArthurMorgan

New Member
Dec 1, 2020
6
0
1
25
Hello, I am trying to make it so when a player mines a spawner, the spawner drops with the spawn egg of the mob inside the spawner. But, to make sure they aren't duplicating the pig spawn eggs because on default the spawner has a pig inside it, when a pig spawner is mined by a player only the spawner gets dropped without the pig spawn egg.

Here's what I tried:
on break of spawner:
drop 1 spawner
----
However, that didn't drop the spawn egg with it.
 
That's interesting, you're only telling the skript to drop spawner and it doesn't drop an egg... :emoji_thinking:
You should get the spawner type (probably with a condition) and then drop the according egg.
 
That's interesting, you're only telling the skript to drop spawner and it doesn't drop an egg... :emoji_thinking:
You should get the spawner type (probably with a condition) and then drop the according egg.
I'm only a beginner at skripting, so I don't know how to do that :/
[doublepost=1606897524,1606855079][/doublepost]No one?
 
Code:
on break:
    if event-block is spawner:
        give 1 "spawner of choice" to player
        give 1 "egg of choice" to player
[doublepost=1606924791,1606924345][/doublepost]you should keep the documentation by you when you need help, https://docs.skunity.com heres the link
 
Status
Not open for further replies.