mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Remove warning for custom entities in precreaturespawn, add note to event
We can't fix this. The event will simply not fire for hacky plugins replacing entity registrations.
This commit is contained in:
parent
66e439e381
commit
79e1eb906f
2 changed files with 4 additions and 5 deletions
|
@ -16,7 +16,7 @@ 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
|
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
|
new file mode 100644
|
||||||
index 00000000..c4751b61
|
index 00000000..bac1cef3
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java
|
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
|
@ -37,6 +37,7 @@ index 00000000..c4751b61
|
||||||
+ * 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 limited use cases.
|
||||||
+ *
|
+ *
|
||||||
+ * Currently: NATURAL and SPAWNER based reasons. Please submit a Pull Request for future additions.
|
+ * 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.
|
||||||
+ */
|
+ */
|
||||||
+public class PreCreatureSpawnEvent extends Event implements Cancellable {
|
+public class PreCreatureSpawnEvent extends Event implements Cancellable {
|
||||||
+ private final Location location;
|
+ private final Location location;
|
||||||
|
|
|
@ -15,7 +15,7 @@ instead and save a lot of server resources.
|
||||||
See: https://github.com/PaperMC/Paper/issues/917
|
See: https://github.com/PaperMC/Paper/issues/917
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
index c29df55fa..3c591e67e 100644
|
index 87fe4775f..9d580ea01 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||||
@@ -0,0 +0,0 @@
|
@@ -0,0 +0,0 @@
|
||||||
|
@ -57,7 +57,7 @@ index c29df55fa..3c591e67e 100644
|
||||||
|
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
index 2cd063829..f64de94fa 100644
|
index 2cd063829..e217d3340 100644
|
||||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
|
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
|
||||||
|
@ -81,8 +81,6 @@ index 2cd063829..f64de94fa 100644
|
||||||
+ ++j4;
|
+ ++j4;
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
|
||||||
+ MinecraftServer.LOGGER.warn("Warning, could not find EntityType for " + cls.getName() + " contains: " + (EntityTypes.clsToTypeMap.containsKey(cls) ? "yes" : "no") + " - Please report this to Paper at https://github.com/PaperMC/Paper/issues");
|
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
EntityInsentient entityinsentient;
|
EntityInsentient entityinsentient;
|
||||||
|
|
Loading…
Reference in a new issue