EricLangezaal / ZombieApocalypse

A minecraft plugin that adds a zombie apocalypse to the world!
https://www.spigotmc.org/resources/82106/
8 stars 3 forks source link

[Feature] Zombie spawners #7

Closed joex92 closed 3 years ago

joex92 commented 3 years ago

A feature to have Apocalypse's Zombie Spawners, there are 3 ways I believe it could be done:

  1. Instead of the command /zombie only giving eggs, add the spawners, for example: /zombie spawner boomer for spawners /zombie egg boomer for eggs
  2. With an Apocalypse Zombie Egg right-click a placed spawner to convert it
  3. Add recipe(s): with Iron Bars => an Apocalypse egg surrounded by Iron Bars with a spawner => a spawner and an Apocalypse egg (egg on top or by side)

idk which one would be easier (or if all of them would be good to add with a config to enable/disable each of them), but that way a map could be built for events, or custom structures, or selling the eggs, something like that...

The only thing I might be worried about would be if there will be problems with SilkSpawners or plugins like that... that would be something to test out...

EricLangezaal commented 3 years ago

Thank you for making it a suggestion! I am going with option 1, like it the best/fits in the easiest. Option 3 could then be possible too with another plugin that properly adds custom recipes (if they properly save item info it should work).

Yeah I looked through SilkSpawners' code and it will definitely not work out of the box. That plugin doesn't copy over any item data by using the designated Spigot API (PersistenDataContainer to be exact) but instead uses the item's lore to store it. This means that it loses any info other plugins try to put on the spawner. Luckily it does have API, so if it is really important for you that my zombie spawners will work with SilkSpawners, I can try fixing it on my end?

BTW: I hope you mean this SilkSpawners, as this is the biggest one by far.

joex92 commented 3 years ago

Thank you for making it a suggestion! I am going with option 1, like it the best/fits in the easiest. Option 3 could then be possible too with another plugin that properly adds custom recipes (if they properly save item info it should work).

great, thanks man...

Yeah I looked through SilkSpawners' code and it will definitely not work out of the box. That plugin doesn't copy over any item data by using the designated Spigot API (PersistenDataContainer to be exact) but instead uses the item's lore to store it. This means that it loses any info other plugins try to put on the spawner. Luckily it does have API, so if it is really important for you that my zombie spawners will work with SilkSpawners, I can try fixing it on my end?

BTW: I hope you mean this SilkSpawners, as this is the biggest one by far.

ok, that explains a lot, I know that SilkSpawners is the most used/biggest spawner plugin so far (yes, I meant that one), but I was thinking that maybe you could do what I've seen other plugins with their custom spawners do: manage the "silking" by their own... that way it doesn't matter what "silking spawner" plugin might be in the server, it wouldn't be a problem, so far I've seen that they add a config to support SilkSpawners just in case... I don't know if that would be harder than use the SilkSpawners API... but being able to "silk it" would be useful to have...

I'm not only thinking about my need but also what others might need too... sometimes things like these are attractive to server owners...

EricLangezaal commented 3 years ago

Okay, great we are talking about the same SilkSpawners. Given how large the plugin is (compared to alternatives), I will use its API. I also don't really feel like creating my own SilkSpawners for this, as with a small adaptation I can probably get it to work with the default SilkSpawners:). Keep an eye on my plugin's page, it will be in next update (idk when I have time to release it yet).

EricLangezaal commented 3 years ago

Implemented in the new update, with SilkSpawners compatibility when it comes to breaking a custom zombie spawner:)