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
2.05k stars 362 forks source link

Add config to implement old raid behavior #1564

Closed 2stinkysocks closed 4 months ago

2stinkysocks commented 4 months ago

Added a config option old-raid-behavior to allow pre-1.21 raid farms to work as before, defaulting to false. Tested on ianxofour's stacking raid farm and ray's works' normal raid farm. The code was adapted from a fabric mod: https://github.com/litetex-oss/mcm-raid-restore/

2stinkysocks commented 4 months ago

https://github.com/PurpurMC/PurpurDocs/pull/102

granny commented 4 months ago

The original patch ended up making a ton of unnecessary changes that weren't needed to get the old raid behavior back. After doing some testing, the change I just pushed to this PR is the bare minimum needed to get this working.

With that being said, I believe this would be better implemented as a plugin instead. This can be done by listening to the EntityDeathEvent event to remove the ominous bottle from the entity drops while also applying the corresponding bad omen effect to the player. You'd also listen to the EntityPotionEffectEvent event for the PotionEffectType of RAID_OMEN to modify it to one second.