diff options
author | kashike <[email protected]> | 2019-06-15 13:30:38 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2019-06-15 13:30:38 -0700 |
commit | 601fcb85b6fc02c951baf21b1a057b50a19bdb8b (patch) | |
tree | 209bf59e0101349ec5d235adcd691272f0d34153 | |
parent | df9c3222867adb5bb76ae4475bbdd8bc097390e6 (diff) | |
parent | 6e5c731ec7be65a7ea4e173c45358d24456a33a4 (diff) | |
download | Paper-601fcb85b6fc02c951baf21b1a057b50a19bdb8b.tar.gz Paper-601fcb85b6fc02c951baf21b1a057b50a19bdb8b.zip |
Merge pull request #2184 from darbyjack/master
Fixed 1.13 not properly firing the PreCreatureSpawnEvent (credit to Wiz)
-rw-r--r-- | Spigot-Server-Patches/0223-PreCreatureSpawnEvent.patch | 10 |
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 |