Merge branch 'master' into pre/1.13
This commit is contained in:
commit
db81205dd7
|
@ -1,4 +1,4 @@
|
||||||
From 711c9c234823b69b6c3833b270619973c47a3f21 Mon Sep 17 00:00:00 2001
|
From 121f02ef0dd8b89d16f5abef8e779bb658f98c10 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 28 Jul 2018 12:18:27 -0400
|
Date: Sat, 28 Jul 2018 12:18:27 -0400
|
||||||
Subject: [PATCH] Ignore Dead Entities in entityList iteration
|
Subject: [PATCH] Ignore Dead Entities in entityList iteration
|
||||||
|
@ -35,10 +35,18 @@ index 785c31089..6b0ca4eb9 100644
|
||||||
public float length;
|
public float length;
|
||||||
public float J;
|
public float J;
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index f8458a2b4..ece187129 100644
|
index f8458a2b4..60a2729ad 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1141,6 +1141,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -1076,6 +1076,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
|
}
|
||||||
|
|
||||||
|
entity.valid = true; // CraftBukkit
|
||||||
|
+ entity.shouldBeRemoved = false; // Paper - shouldn't be removed after being re-added
|
||||||
|
new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1141,6 +1142,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
if (entity.inChunk && this.isChunkLoaded(i, j, true)) {
|
if (entity.inChunk && this.isChunkLoaded(i, j, true)) {
|
||||||
this.getChunkAt(i, j).b(entity);
|
this.getChunkAt(i, j).b(entity);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +54,7 @@ index f8458a2b4..ece187129 100644
|
||||||
|
|
||||||
if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above
|
if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above
|
||||||
// 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
|
||||||
@@ -2348,6 +2349,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -2348,6 +2350,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
@ -54,7 +62,7 @@ index f8458a2b4..ece187129 100644
|
||||||
|
|
||||||
if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) {
|
if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) {
|
||||||
arraylist.add(entity);
|
arraylist.add(entity);
|
||||||
@@ -2434,6 +2436,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -2434,6 +2437,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From ca8a816fa3bfdbceda39eb992b4e29cca55bea8d Mon Sep 17 00:00:00 2001
|
From c9e6dd33ed8c202f81aaddcfe777e9e7bfcaba3b Mon Sep 17 00:00:00 2001
|
||||||
From: willies952002 <admin@domnian.com>
|
From: willies952002 <admin@domnian.com>
|
||||||
Date: Mon, 30 Jul 2018 02:42:49 -0400
|
Date: Mon, 30 Jul 2018 02:42:49 -0400
|
||||||
Subject: [PATCH] World EntityHuman Lookup Optimizations
|
Subject: [PATCH] World EntityHuman Lookup Optimizations
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index ece187129..b76135cb0 100644
|
index 60a2729ad..c2b9d60f8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -79,6 +79,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -79,6 +79,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
|
@ -25,7 +25,7 @@ index ece187129..b76135cb0 100644
|
||||||
this.everyoneSleeping();
|
this.everyoneSleeping();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1101,6 +1104,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -1102,6 +1105,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
entity.die();
|
entity.die();
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
this.players.remove(entity);
|
this.players.remove(entity);
|
||||||
|
@ -33,7 +33,7 @@ index ece187129..b76135cb0 100644
|
||||||
// Spigot start
|
// Spigot start
|
||||||
for ( Object o : worldMaps.d )
|
for ( Object o : worldMaps.d )
|
||||||
{
|
{
|
||||||
@@ -1131,6 +1135,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -1132,6 +1136,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
entity.die();
|
entity.die();
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
this.players.remove(entity);
|
this.players.remove(entity);
|
||||||
|
@ -41,7 +41,7 @@ index ece187129..b76135cb0 100644
|
||||||
this.everyoneSleeping();
|
this.everyoneSleeping();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2659,6 +2664,8 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -2660,6 +2665,8 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public EntityHuman a(String s) {
|
public EntityHuman a(String s) {
|
||||||
|
@ -50,7 +50,7 @@ index ece187129..b76135cb0 100644
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
||||||
|
|
||||||
@@ -2668,10 +2675,15 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -2669,10 +2676,15 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -66,7 +66,7 @@ index ece187129..b76135cb0 100644
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
for (int i = 0; i < this.players.size(); ++i) {
|
||||||
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
||||||
|
|
||||||
@@ -2681,6 +2693,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
@@ -2682,6 +2694,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -78,5 +78,5 @@ index ece187129..b76135cb0 100644
|
||||||
|
|
||||||
public void checkSession() throws ExceptionWorldConflict {
|
public void checkSession() throws ExceptionWorldConflict {
|
||||||
--
|
--
|
||||||
2.18.0
|
2.17.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue