Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 21:10:10 +01:00
Check if entity is in list before decrementing. Fixes BUKKIT-5404
Dieser Commit ist enthalten in:
Ursprung
00b3721f07
Commit
d9e04a5b24
@ -976,10 +976,12 @@ public abstract class World implements IBlockAccess {
|
|||||||
|
|
||||||
// CraftBukkit start - Decrement loop variable field if we've already ticked this entity
|
// CraftBukkit start - Decrement loop variable field if we've already ticked this entity
|
||||||
int index = this.entityList.indexOf(entity);
|
int index = this.entityList.indexOf(entity);
|
||||||
|
if (index != -1) {
|
||||||
if (index <= this.tickPosition) {
|
if (index <= this.tickPosition) {
|
||||||
this.tickPosition--;
|
this.tickPosition--;
|
||||||
}
|
}
|
||||||
this.entityList.remove(index);
|
this.entityList.remove(index);
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.b(entity);
|
this.b(entity);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren