Paper/Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch
Aikar 030da7b896
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-07-04 22:02:02 -04:00

20 Zeilen
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Wed, 21 Aug 2019 23:57:32 +0500
Subject: [PATCH] only add passanger entities once from spawners
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 1ceee84d724142c8a9e969ac1ceb567b2a334a41..17e5e1f191efd91b0797826cb96e5f230d622a0d 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -197,7 +197,7 @@ public abstract class MobSpawnerAbstract {
}
private void a(Entity entity) {
- if (this.a().addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit
+ if (entity.valid || this.a().addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) { // CraftBukkit // Paper
Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) {