aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordarbyjack <[email protected]>2019-06-15 01:36:24 -0500
committerdarbyjack <[email protected]>2019-06-15 01:36:24 -0500
commit6e5c731ec7be65a7ea4e173c45358d24456a33a4 (patch)
tree209bf59e0101349ec5d235adcd691272f0d34153
parentdf9c3222867adb5bb76ae4475bbdd8bc097390e6 (diff)
downloadPaper-6e5c731ec7be65a7ea4e173c45358d24456a33a4.tar.gz
Paper-6e5c731ec7be65a7ea4e173c45358d24456a33a4.zip
Fixed 1.13 not properly firing the PreCreatureSpawnEvent
-rw-r--r--Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch b/Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch
index da9bdd14f5..00a395bacd 100644
--- a/Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch
+++ b/Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch
@@ -1,4 +1,4 @@
-From 4393dd1c81c81419675b7914dbd37b92a34352c0 Mon Sep 17 00:00:00 2001
+From 91b78dfee6b8735566be835c37afd120db8fd7c3 Mon Sep 17 00:00:00 2001
From: Aikar <[email protected]>
Date: Sun, 14 Jan 2018 17:01:31 -0500
Subject: [PATCH] PreCreatureSpawnEvent
@@ -15,7 +15,7 @@ instead and save a lot of server resources.
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
-index 027ba71918..eca3f85ad2 100644
+index 027ba719..eca3f85a 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -1,6 +1,7 @@
@@ -56,7 +56,7 @@ index 027ba71918..eca3f85ad2 100644
if (entity == null) {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
-index 2aa0db5c22..b57616960e 100644
+index 2aa0db5c..61195134 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -164,10 +164,30 @@ public final class SpawnerCreature {
@@ -70,7 +70,7 @@ index 2aa0db5c22..b57616960e 100644
+ // Paper start
+ com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent event;
+ EntityTypes<? extends EntityInsentient> cls = biomebase_biomemeta.b;
-+ org.bukkit.entity.EntityType type = EntityTypes.clsToTypeMap.get(cls);
++ org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityTypes.getName(cls).getKey());
+ if (type != null) {
+ event = new com.destroystokyo.paper.event.entity.PreCreatureSpawnEvent(
+ MCUtil.toLocation(worldserver, blockposition_mutableblockposition),
@@ -92,5 +92,5 @@ index 2aa0db5c22..b57616960e 100644
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.a((World) worldserver);
} catch (Exception exception) {
--
-2.21.0
+2.21.0.windows.1