From 2e70796c7f1cd21b49e62d3929b94897fa2758b4 Mon Sep 17 00:00:00 2001 From: Aurora <21148213+aurorasmiles@users.noreply.github.com> Date: Sun, 7 Mar 2021 11:35:45 +0100 Subject: [PATCH] [CI-SKIP] Improve documentation of PreCreatureSpawnEvent (#5244) --- Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch b/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch index cb623e42d2..0090330de9 100644 --- a/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch +++ b/Spigot-API-Patches/0078-PreCreatureSpawnEvent.patch @@ -16,10 +16,10 @@ See: https://github.com/PaperMC/Paper/issues/917 diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..d5edde9cd530e9984f4ec4bd67783dfbc9357bad +index 0000000000000000000000000000000000000000..3ad231aa3206c8cfd5ec995249584cebab5d11f3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java -@@ -0,0 +1,104 @@ +@@ -0,0 +1,105 @@ +package com.destroystokyo.paper.event.entity; + +import com.google.common.base.Preconditions; @@ -35,7 +35,8 @@ index 0000000000000000000000000000000000000000..d5edde9cd530e9984f4ec4bd67783dfb + * WARNING: This event only fires for a limited number of cases, and not for every case that CreatureSpawnEvent does. + * + * You should still listen to CreatureSpawnEvent as a backup, and only use this event as an "enhancement". -+ * The intent of this event is to improve server performance, so limited use cases. ++ * The intent of this event is to improve server performance, so it fires even if the spawning might fail later, for ++ * example when the entity would be unable to spawn due to limited space or lighting. + * + * Currently: NATURAL and SPAWNER based reasons. Please submit a Pull Request for future additions. + * Also, Plugins that replace Entity Registrations with their own custom entities might not fire this event.