IntellectualSites / IntellectualSites/PlotSquared
SpawnReason#Beehive being affected by `natural_mob_spawning`
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 653
- Forks
- 975
- Avg merge
- 2m
- Merged PRs (30d)
- 6
Description
Server Implementation
Paper
Server Version
1.15.2
Describe the bug
As per https://github.com/IntellectualSites/PlotSquared/blob/6259287dffe03e6b0ccd29a2a485aa07aa8b71e6/Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java#L2078, the SpawnReason BEEHIVE is treated like all the other natural spawns. This however means that when someone has a bee nest/hive and spawns bees with eggs or spawners (i.e. manually not naturally), then they will "vanish" in the hive, as they despawn but the respective spawn event will be cancelled, so they can never leave the hive again.
Since natural_mob_spawning is no flag under the users control afaict, there is nothing they can do about it. Also if someone wants bees, that doesn't imply they want mobs and animals to appear, anyway, so that coupling may be questionable (decorative mobs vs regular mobs).
The only downside I could imagine here is that if someone uses beehives for the sole purpose of decorative building, they may want to stop bees from spawning and would simply use natural_mob_spawning.
So TLDR: With natural_mob_spawning = false, Bees will go into Hives, but never leave them.
A solution could involve counting the Bees in the Hive and somehow allow them to leave or just straight off allowing BeeHive spawning Bees.
To Reproduce
- Have a plot with bee hives/nests
- Spawn a bee
- Watch it enter the hive/nest
- Never see it again.
Expected behaviour
- Have a plot with bee hives/nests
- Spawn a bee
- Watch it enter the hive/nest
- Watch it leave the hive/nest
Screenshots / Videos
No response
Error log (if applicable)
No response
Plot Debugpaste
PlotSquared Version
5.13.11-Premium
Checklist
- I have included a Plot debugpaste.
- I am using the newest build from https://www.spigotmc.org/resources/77506/ and the issue still persists.
Anything else?
Since this is a migration from https://issues.intellectualsites.com/issue/PS-44, I kinda "lied" in terms of being on the most recent version/debug paste, since I know that this issue would be targeted for v6 and is not fixed yet.
In fact it probably needs some design decisions before being coded in any way.
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
Start with Bukkit/src/main/java/com/plotsquared/bukkit/listener/PlayerEvents.java around the referenced SpawnReason handling, then review how natural_mob_spawning treats BEEHIVE spawns. Reproduce the reported behavior with a bee spawned near a hive or nest while the flag is false. Done means spawned bees can enter and later leave hives without breaking the intended natural-spawning control.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100