mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
b6925c36af
This is now default vanilla behavior Fixes #3644
20 lines
1.0 KiB
Diff
20 lines
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 921abae4914c7b3f28d387f7a682d991293c4798..2f1d168bd6daad1bbd41977b18263d1fe67a3da0 100644
|
|
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
|
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
|
@@ -196,7 +196,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()) {
|