Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 13:00:06 +01:00
Fix ConcurrentModificationException while being idle kicked in a vehicle
Dieser Commit ist enthalten in:
Ursprung
af480b8b95
Commit
21656db5d1
@ -0,0 +1,41 @@
|
|||||||
|
From c40d8531dbe4217d3457e3c3c598da3b052fabd1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
|
Date: Tue, 14 Jan 2014 20:11:25 +0000
|
||||||
|
Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked
|
||||||
|
in a vehicle
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
|
index 04f5ed1..ac9b669 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
|
@@ -1038,16 +1038,19 @@ public abstract class World implements IBlockAccess {
|
||||||
|
this.players.remove(entity);
|
||||||
|
this.everyoneSleeping();
|
||||||
|
}
|
||||||
|
+ // Spigot start
|
||||||
|
+ if (!guardEntityList) { // It will get removed after the tick if we are ticking
|
||||||
|
+ int i = entity.ai;
|
||||||
|
+ int j = entity.ak;
|
||||||
|
|
||||||
|
- int i = entity.ai;
|
||||||
|
- int j = entity.ak;
|
||||||
|
+ if (entity.ah && this.isChunkLoaded(i, j)) {
|
||||||
|
+ this.getChunkAt(i, j).b(entity);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (entity.ah && this.isChunkLoaded(i, j)) {
|
||||||
|
- this.getChunkAt(i, j).b(entity);
|
||||||
|
+ this.entityList.remove(entity);
|
||||||
|
+ this.b(entity);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- this.entityList.remove(entity);
|
||||||
|
- this.b(entity);
|
||||||
|
+ // Spigot end
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addIWorldAccess(IWorldAccess iworldaccess) {
|
||||||
|
--
|
||||||
|
1.8.4.msysgit.0
|
||||||
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren