PurpurMC / Purpur

Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
https://purpurmc.org
MIT License
1.94k stars 355 forks source link

Cannot Prohibit Reinforcements #1548

Closed Huge-mistake closed 1 week ago

Huge-mistake commented 1 week ago

Spark link

The newly generated default profile...

Expected behavior

When the 'spawn_reinforcements' option is set to 0,or 0.0, or -1, it turns off the reinforcements for this monster.

Observed/Actual behavior

When I set the 'spawn_reinforcements' option to 0, or 0.0, or -1, the reinforcements can still be triggered.

Steps/models to reproduce

Build a test platform in the air at will Zulu-21 Screenshot 2024 07 07 - 02 43 15 82

Hard difficulty The higher the 'local-difficulty,Clamped regional difficulty', the better. https://minecraft.wiki/w/Difficulty#Regional_difficulty /time set midnight

In the middle of the built aerial test platform, place some experimental zombies and use a sword to perform a sweeping attack. Zulu-21 Screenshot 2024 07 07 - 02 51 04 55 Without any surprises, reinforcements should still be triggered. Monsters generated by reinforcements have a characteristic, which is that they spawn at the edges of blocks, rather than in the middle of blocks. Zulu-21 Screenshot 2024 07 07 - 02 45 18 10 If reinforcements are not triggered, you can try several batches of zombies in the experiment, and it should be reproducible.

Purpur version

Purpur1.20.6 # 2233

Agreements

Other

I'm not sure if the 'spawn_reinforcements' option provided by purpur.yml is designed to prohibit the reinforcement function. If not, can Purpur add a new feature to prohibit monster reinforcements? That would be fantastic. (zombie, zombified_piglin, zombie_villager, drowned, husk):spawn_reinforcements

According to the Purpur documentation, I believe it should be possible to control the feature that prohibits reinforcements. spawn_reinforcements🔗 default: 0.1 description: Percent chance (0.0 - 1.0) this mob will spawn reinforcements

granny commented 1 week ago

Not sure what to tell you - The option correctly sets the spawn_reinforcements attribute value. You can easily check by getting close to a naturally spawning zombie, then running the following command to view all attributes set to the zombie: /data get entity @e[type=minecraft:zombie,limit=1,distance=..5] attributes.

Keep in mind I tested this on the latest 1.21 build of Purpur. If the spawn_reinforcements attribute is not being properly set on 1.20.6, no fix will be backported for that version.