mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07:00
Do not break when PlayerNaturallySpawnCreaturesEvent is cancelled
If there is a player nearby which had its event not cancelled, then that should take precedence.
This commit is contained in:
@@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ blockRange = 16384.0D;
|
+ blockRange = 16384.0D;
|
||||||
+ if (reducedRange) {
|
+ if (reducedRange) {
|
||||||
+ event = entityplayer.playerNaturallySpawnedEvent;
|
+ event = entityplayer.playerNaturallySpawnedEvent;
|
||||||
+ if (event == null || event.isCancelled()) return false;
|
+ if (event == null || event.isCancelled()) continue;
|
||||||
+ blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4));
|
+ blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4));
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - PlayerNaturallySpawnCreaturesEvent
|
+ // Paper end - PlayerNaturallySpawnCreaturesEvent
|
||||||
|
Reference in New Issue
Block a user