Mob Switch - Mobs not prohibiting spawning of other mobs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
Mob switches are a construct that allows players to conditionally limit the natural spawning of new types of mobs in the world. When activated, the mob switch prevents new mobs from spawning. When deactivated, normal mob spawning occurs. The mechanisms are well documented in the community, but the basic mechanics are to create a large number of mobs of the needed type in a single chunk, manipulate them so that they will not despawn, and then to force that chunk to stay loaded while you wish mob spawning disabled.
There are several types of mob switches I built and tested on PaperMC that did not behave as expected:
- Silverfish Spawner Mob Switch
- Warden Mob Switch
- Zombie Villager Mob Switch
- Shulker Mob Switch
The expected behavior for any of these mob switches, is that assuming a single player is on the server, and 70+ mobs are spawned by the mob switch and those chunks remain loaded via chunk loader then no other mobs should spawn via natural spawning rules.
Observed/Actual behavior
Each of the mob switches built did not prohibit the spawning of other mobs while active. The expected behavior with a mob switch running would be that no other mobs should spawn in the world as per normal conditions however mobs continued to spawn. Even with WELL over 70 mobs spawned in the mob switch.
I will also add that in my testing world the paper jar was swapped for spigot, and the mob switches immediately worked in suppressing mob spawning. Switching the server jar back/forth would show working/not working behaviors
Steps/models to reproduce
Build any of the desired mob switches:
-
Silver fish spawner - https://www.youtube.com/watch?v=EDBesTQW9XM
-
Zombie Villager - 70+ villagers that you have traded with, then zombified
-
Shulker mob switch - did not buid/test as I didnt want to build with spawn eggs in case spawn tagging for those mobs is done differently by paper
-
Keep the area loaded via chunk loader such that the mob switch chunk is a lazy chunk - https://www.youtube.com/watch?v=dJdEo2QKmzA
Plugin and Datapack List
AntiPopup/
bStats/
Chunky/
CoreProtect/
CustomTab/
DecentHolograms/
DiscordSRV/
dynmap/
Essentials/
GriefDefender/
GriefPreventionData/
Harbor/
InventoryRollbackPlus/
JoinCommands/
LastLoginAPI/
LuckPerms/
OpenInv/
OreAnnouncer/
Orebfuscator/
PlaceholderAPI/
Plan/
PlayerHeads/
PluginMetrics/
ProtocolLib/
Shopkeepers/
spark/
SuperVanish/
Tablist/
Paper version
This server is running Paper version git-Paper-210 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 0bdf997)
You are running the latest version
Previous version: git-Paper-201 (MC: 1.19.2)
Other
Configs:
Paper-global.yml: https://pastebin.com/G7tHnjee
Paper-world-default.yml: https://pastebin.com/fKyz3N2C
Was suggested to submit report: https://discord.com/channels/289587909051416579/289587909051416579/1029444287231963297
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported mob-switch setups on Paper 1.19.2, keeping the relevant chunk loaded as a lazy chunk, and compare the result with Spigot. Verify whether 70+ mobs of the relevant type prevent natural spawning; done means the active switch consistently suppresses other natural mob spawns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100