1.17.x Spawn Creeper in Nether & End

Discussion in 'Spigot Plugin Development' started by TurboToni10, Jul 11, 2021.

  1. Hi all,

    I coded a small spigot plugin which replaces most hostile mobs with a crepper.
    I listen to the "CreatureSpawnEvent" and under specific conditions (e.g. a specific EntityType) the plugin spawns a creeper instead.
    Everything works fine in the Overworld but I have trouble with the Nether & the End.

    As far I can tell the replacment works (e.g. no Hoglins are spawning) but spawning the creeper wont work.
    The problem is that creepers are not allowed to spawn in the nether or end.

    So my question comes down to:
    How can I enable creeper spawing in the Nether or End?

    I tried to extend the EntityCreeper but I have trouble finding the attribute/function to allow nether/end spawning.
    Using a plugin currently is no option as most plugins wont work with 1.17.x.

  2. Try deleting the old mob and then summon a creeper rather than actually replacing the Hoglin spawn with a creeper
  3. Thanks for your response and help!

    My current code logic is:

    if entityType is Hoglin, get the position of that event, then cancel it and spawn a creeper at that position instead.

    Im not sure if this logic is covering your idea?
  4. From my testing. Creepers can spawn in the nether in vanilla but Spigot disables them spawning. I looked in bukkit, spigot and paper.yml and there is no way (that I can see) to allow them to spawn. Not even with an egg. So unfortunately you might not be able to make that work, I would definitely make a suggestion/issue on the Spigot GitHub about it though. https://github.com/SpigotMC/SpigotCraft/issues
    • Like Like x 1