mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
fix double world add bug (#2486)
This commit is contained in:
parent
439131c704
commit
b7dc6fb00e
@ -0,0 +1,22 @@
|
||||
From 269842f724c46c5faed547d65fa33619b794ccd5 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 b05f6c2f..a4e6be54 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -195,7 +195,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()) {
|
||||
--
|
||||
2.22.0
|
||||
|
Loading…
Reference in New Issue
Block a user