Rebuild patches for upstream merge
This commit is contained in:
parent
6b63a88df0
commit
1d28f62522
19 changed files with 114 additions and 121 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 39039bfaab07bf1d1c0eec274aac6a6187a8781b Mon Sep 17 00:00:00 2001
|
From ce7ffaa9f437f871b1c1b87d5f22b482e25e9edc Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 22 Mar 2016 00:33:47 -0400
|
Date: Tue, 22 Mar 2016 00:33:47 -0400
|
||||||
Subject: [PATCH] Use a Shared Random for Entities
|
Subject: [PATCH] Use a Shared Random for Entities
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
|
||||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index e16579116..c0367df20 100644
|
index e16579116..56aa89b45 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -50,6 +50,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -50,6 +50,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
@ -30,7 +30,7 @@ index e16579116..c0367df20 100644
|
||||||
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
|
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
|
||||||
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||||
}
|
}
|
||||||
@@ -182,7 +183,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -182,7 +196,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
this.length = 1.8F;
|
this.length = 1.8F;
|
||||||
this.aA = 1.0F;
|
this.aA = 1.0F;
|
||||||
this.aB = 1.0F;
|
this.aB = 1.0F;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 22bc88a7734d7cd8f0e59448076b9f781b60cc59 Mon Sep 17 00:00:00 2001
|
From 66f0b458722d01614e1ecb8a82d09a92e4f5864a Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 22 Mar 2016 00:55:23 -0400
|
Date: Tue, 22 Mar 2016 00:55:23 -0400
|
||||||
Subject: [PATCH] Don't teleport dead entities
|
Subject: [PATCH] Don't teleport dead entities
|
||||||
|
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
|
||||||
Potentially an old CB change that's no longer needed.
|
Potentially an old CB change that's no longer needed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index c0367df20..c37c46e71 100644
|
index 56aa89b45..f98f93c5c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2556,7 +2556,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2569,7 +2569,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity teleportTo(Location exit, boolean portal) {
|
public Entity teleportTo(Location exit, boolean portal) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 9cfa1f4bdd459c8f829f60b971a5af65fb5ecb0c Mon Sep 17 00:00:00 2001
|
From 95364b7e710394eda68ea6d81a7691c02b21907f Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Wed, 6 Apr 2016 01:04:23 -0500
|
Date: Wed, 6 Apr 2016 01:04:23 -0500
|
||||||
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
|
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
|
||||||
|
@ -19,10 +19,10 @@ index 6ac58e5ec..ff9929a05 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index c37c46e71..88092d823 100644
|
index f98f93c5c..31c580de1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2251,6 +2251,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2264,6 +2264,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
return this.getFlag(5);
|
return this.getFlag(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 3813dcf8105186f2ad6b22b3e3c8e129656c6dbb Mon Sep 17 00:00:00 2001
|
From 173ce5b19ace1cc6316fe318b79cc36ee2c207d5 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Fri, 22 Apr 2016 18:20:05 -0500
|
Date: Fri, 22 Apr 2016 18:20:05 -0500
|
||||||
Subject: [PATCH] Vehicle Event Cancellation Changes
|
Subject: [PATCH] Vehicle Event Cancellation Changes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 88092d823..9af242380 100644
|
index 31c580de1..16d521dfd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -80,7 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -93,7 +93,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
public boolean j;
|
public boolean j;
|
||||||
public final List<Entity> passengers;
|
public final List<Entity> passengers;
|
||||||
protected int k;
|
protected int k;
|
||||||
|
@ -17,7 +17,7 @@ index 88092d823..9af242380 100644
|
||||||
public boolean attachedToPlayer;
|
public boolean attachedToPlayer;
|
||||||
public World world;
|
public World world;
|
||||||
public double lastX;
|
public double lastX;
|
||||||
@@ -2110,6 +2110,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2123,6 +2123,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
@ -25,7 +25,7 @@ index 88092d823..9af242380 100644
|
||||||
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||||
Entity orig = craft == null ? null : craft.getHandle();
|
Entity orig = craft == null ? null : craft.getHandle();
|
||||||
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||||
@@ -2125,7 +2126,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2138,7 +2139,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From be50c643cdcb8dc000e4a1bc88c37232418fbd0d Mon Sep 17 00:00:00 2001
|
From dde88036ee16b61e39407d75420102c714842eef Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 17 Jun 2013 01:24:00 -0400
|
Date: Mon, 17 Jun 2013 01:24:00 -0400
|
||||||
Subject: [PATCH] Entity Tracking Improvements
|
Subject: [PATCH] Entity Tracking Improvements
|
||||||
|
@ -7,10 +7,10 @@ If any part of a Vehicle/Passenger relationship is visible to a player,
|
||||||
send all passenger/vehicles to the player in the chain.
|
send all passenger/vehicles to the player in the chain.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 9af242380..70694c8e5 100644
|
index 16d521dfd..dd4ac4bfe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -57,6 +57,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -70,6 +70,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
|
||||||
protected CraftEntity bukkitEntity;
|
protected CraftEntity bukkitEntity;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 4a54757b19677e73932cc2db44dd47a907d8f82b Mon Sep 17 00:00:00 2001
|
From 66110221d713089a4bd59d79a17a4b8f6100f015 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sun, 22 May 2016 20:20:55 -0500
|
Date: Sun, 22 May 2016 20:20:55 -0500
|
||||||
Subject: [PATCH] Optional TNT doesn't move in water
|
Subject: [PATCH] Optional TNT doesn't move in water
|
||||||
|
@ -32,10 +32,10 @@ index 38de48ebc..321da3be3 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 70694c8e5..51b42933d 100644
|
index dd4ac4bfe..34c617958 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -1182,6 +1182,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1195,6 +1195,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean aq() {
|
public boolean aq() {
|
||||||
|
@ -48,7 +48,7 @@ index 70694c8e5..51b42933d 100644
|
||||||
return this.isInWater() || this.q();
|
return this.isInWater() || this.q();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2724,6 +2730,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2737,6 +2743,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean bw() {
|
public boolean bw() {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From cfd9c680af983aa5d1f25a5dc51d505beaa229be Mon Sep 17 00:00:00 2001
|
From 3b917e4772c474dd49cf79fb2fcc46cbddf928bf Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Fri, 16 Dec 2016 16:03:19 -0600
|
Date: Fri, 16 Dec 2016 16:03:19 -0600
|
||||||
Subject: [PATCH] Don't let fishinghooks use portals
|
Subject: [PATCH] Don't let fishinghooks use portals
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 51b42933d..eb2a693af 100644
|
index 34c617958..c7ef67a52 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -143,7 +143,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -156,7 +156,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
public boolean ak;
|
public boolean ak;
|
||||||
public boolean impulse;
|
public boolean impulse;
|
||||||
public int portalCooldown;
|
public int portalCooldown;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 9998cb5e703231aa7a957c741909a28c120e59dd Mon Sep 17 00:00:00 2001
|
From ed67deba02ff56017e9557fc956c66b39cf8c645 Mon Sep 17 00:00:00 2001
|
||||||
From: Alfie Cleveland <alfeh@me.com>
|
From: Alfie Cleveland <alfeh@me.com>
|
||||||
Date: Sun, 8 Jan 2017 04:31:36 +0000
|
Date: Sun, 8 Jan 2017 04:31:36 +0000
|
||||||
Subject: [PATCH] Don't allow entities to ride themselves - #572
|
Subject: [PATCH] Don't allow entities to ride themselves - #572
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index eb2a693af..b47bf9738 100644
|
index c7ef67a52..4bfc49076 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2075,6 +2075,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2088,6 +2088,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void o(Entity entity) {
|
protected void o(Entity entity) {
|
||||||
|
@ -17,5 +17,5 @@ index eb2a693af..b47bf9738 100644
|
||||||
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
||||||
} else {
|
} else {
|
||||||
--
|
--
|
||||||
2.17.1
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 6dcddbc648362d5b4fa1548043beacd6596d15d7 Mon Sep 17 00:00:00 2001
|
From a831d40bdd5ca262053ca1c02870cc533a90a306 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 22 Jan 2017 18:07:56 -0500
|
Date: Sun, 22 Jan 2017 18:07:56 -0500
|
||||||
Subject: [PATCH] Cap Entity Collisions
|
Subject: [PATCH] Cap Entity Collisions
|
||||||
|
@ -27,10 +27,10 @@ index 5df8b1143..0b748d402 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index b47bf9738..db7e37aee 100644
|
index 4bfc49076..8a04a801b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -168,6 +168,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
public long activatedTick = Integer.MIN_VALUE;
|
public long activatedTick = Integer.MIN_VALUE;
|
||||||
public boolean fromMobSpawner;
|
public boolean fromMobSpawner;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From e199a3a50ef50a8cb6818a7b18871b3dfdac874c Mon Sep 17 00:00:00 2001
|
From fc4ab62ab798d05629a58a87394aedefd66ed528 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
Date: Sun, 18 Jun 2017 18:17:05 -0500
|
||||||
Subject: [PATCH] Entity#fromMobSpawner()
|
Subject: [PATCH] Entity#fromMobSpawner()
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index db7e37aee..cd1639e26 100644
|
index 8a04a801b..0d69e6187 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -168,6 +168,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -181,6 +181,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
public final boolean defaultActivationState;
|
public final boolean defaultActivationState;
|
||||||
public long activatedTick = Integer.MIN_VALUE;
|
public long activatedTick = Integer.MIN_VALUE;
|
||||||
public boolean fromMobSpawner;
|
public boolean fromMobSpawner;
|
||||||
|
@ -16,7 +16,7 @@ index db7e37aee..cd1639e26 100644
|
||||||
protected int numCollisions = 0; // Paper
|
protected int numCollisions = 0; // Paper
|
||||||
public void inactiveTick() { }
|
public void inactiveTick() { }
|
||||||
// Spigot end
|
// Spigot end
|
||||||
@@ -1658,6 +1659,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1671,6 +1672,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
if (origin != null) {
|
if (origin != null) {
|
||||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ index db7e37aee..cd1639e26 100644
|
||||||
// Paper end
|
// Paper end
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -1806,6 +1811,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1819,6 +1824,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
if (!originTag.isEmpty()) {
|
if (!originTag.isEmpty()) {
|
||||||
origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 014b84371464966ee131a8b52ddf87154e02343e Mon Sep 17 00:00:00 2001
|
From e8322305c667ce125bb50e00bd4e90c377f5348b Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 10 Jun 2018 20:04:42 -0400
|
Date: Sun, 10 Jun 2018 20:04:42 -0400
|
||||||
Subject: [PATCH] Properly remove entities on dimension teleport
|
Subject: [PATCH] Properly remove entities on dimension teleport
|
||||||
|
@ -22,10 +22,10 @@ requirement, but plugins (such as my own) use this method to
|
||||||
trigger a "reload" of the entity on the client.
|
trigger a "reload" of the entity on the client.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index cd1639e26..ea42800ae 100644
|
index 0d69e6187..67af3e25c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2594,7 +2594,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -2607,7 +2607,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
// CraftBukkit end */
|
// CraftBukkit end */
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ index cd1639e26..ea42800ae 100644
|
||||||
this.world.methodProfiler.a("reposition");
|
this.world.methodProfiler.a("reposition");
|
||||||
/* CraftBukkit start - Handled in calculateTarget
|
/* CraftBukkit start - Handled in calculateTarget
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 4ac2d39c5..d6d3ffa6f 100644
|
index 9e3804579..44d867663 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -1025,6 +1025,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -1025,6 +1025,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From d826de1e7aa6bc2cd8e10f847e3617cbc895084e Mon Sep 17 00:00:00 2001
|
From 0c344c05aeeb72e97f326c21aed89d3fa3ce316d Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 19 Jul 2018 01:23:00 -0400
|
Date: Thu, 19 Jul 2018 01:23:00 -0400
|
||||||
Subject: [PATCH] Don't process despawn if entity is in a chunk scheduled for
|
Subject: [PATCH] Don't process despawn if entity is in a chunk scheduled for
|
|
@ -1,11 +1,11 @@
|
||||||
From 6e4c3841196ccf68344d2220c4e48186d0028e6f Mon Sep 17 00:00:00 2001
|
From b2e003731c21eab3980ab9b81ff1cf52b6411e81 Mon Sep 17 00:00:00 2001
|
||||||
From: Hugo Manrique <hugmanrique@gmail.com>
|
From: Hugo Manrique <hugmanrique@gmail.com>
|
||||||
Date: Mon, 16 Jul 2018 12:42:20 +0200
|
Date: Mon, 16 Jul 2018 12:42:20 +0200
|
||||||
Subject: [PATCH] Avoid item merge if stack size above max stack size
|
Subject: [PATCH] Avoid item merge if stack size above max stack size
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
index d232bab745..b0f22f8f09 100644
|
index d232bab74..b0f22f8f0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
@@ -173,6 +173,10 @@ public class EntityItem extends Entity {
|
@@ -173,6 +173,10 @@ public class EntityItem extends Entity {
|
|
@ -1,11 +1,11 @@
|
||||||
From 033fcb77bd332732f270f7a66f42cf2dfb3bc51e Mon Sep 17 00:00:00 2001
|
From 3136e6f07a5a0626b4855b8be5470e0df089e9c5 Mon Sep 17 00:00:00 2001
|
||||||
From: Minecrell <minecrell@minecrell.net>
|
From: Minecrell <minecrell@minecrell.net>
|
||||||
Date: Tue, 17 Jul 2018 16:42:17 +0200
|
Date: Tue, 17 Jul 2018 16:42:17 +0200
|
||||||
Subject: [PATCH] Use asynchronous Log4j 2 loggers
|
Subject: [PATCH] Use asynchronous Log4j 2 loggers
|
||||||
|
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 8fd1e36283..0c4b0daf56 100644
|
index a034c87d6..efa52f356 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -103,6 +103,14 @@
|
@@ -103,6 +103,14 @@
|
||||||
|
@ -25,7 +25,7 @@ index 8fd1e36283..0c4b0daf56 100644
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
diff --git a/src/main/resources/log4j2.component.properties b/src/main/resources/log4j2.component.properties
|
diff --git a/src/main/resources/log4j2.component.properties b/src/main/resources/log4j2.component.properties
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000..ee7c90784c
|
index 000000000..ee7c90784
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/resources/log4j2.component.properties
|
+++ b/src/main/resources/log4j2.component.properties
|
||||||
@@ -0,0 +1 @@
|
@@ -0,0 +1 @@
|
|
@ -0,0 +1,23 @@
|
||||||
|
From 978703a87b11832ffaecca876f32c3610f67fd56 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Thu, 19 Jul 2018 01:13:28 -0400
|
||||||
|
Subject: [PATCH] add more information to Entity.toString()
|
||||||
|
|
||||||
|
UUID, ticks lived, valid, dead
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
|
index 67af3e25c..0e0dc72f0 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
|
@@ -2506,7 +2506,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
- return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)});
|
||||||
|
+ return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInvulnerable(DamageSource damagesource) {
|
||||||
|
--
|
||||||
|
2.18.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From b061a231214e88cde43e0c3880f779723828b2b4 Mon Sep 17 00:00:00 2001
|
From 0318662b299542a2245da28c82d08f5a3455fa69 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 21 Jul 2018 08:25:40 -0400
|
Date: Sat, 21 Jul 2018 08:25:40 -0400
|
||||||
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
||||||
|
@ -6,53 +6,45 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
||||||
Add -Ddebug.entities=true to your JVM flags to gain more information
|
Add -Ddebug.entities=true to your JVM flags to gain more information
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index f6b755863..108654d63 100644
|
index 0e0dc72f0..d725bf13e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -73,6 +73,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
protected CraftEntity bukkitEntity;
|
||||||
return bukkitEntity;
|
|
||||||
}
|
|
||||||
+ Throwable addedToWorldStack; // Paper - entity debug
|
|
||||||
// CraftBukikt end
|
|
||||||
|
|
||||||
private static final Logger a = LogManager.getLogger();
|
EntityTrackerEntry tracker; // Paper
|
||||||
|
+ Throwable addedToWorldStack; // Paper - entity debug
|
||||||
|
public CraftEntity getBukkitEntity() {
|
||||||
|
if (bukkitEntity == null) {
|
||||||
|
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index b16324e1a..994d4bbb8 100644
|
index fcb5f68f8..013f4eef5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -7,6 +7,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
@@ -53,6 +53,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
import java.io.File;
|
private boolean Q;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
+import java.util.Date;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
@@ -53,6 +54,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
|
||||||
private final List<NextTickListEntry> W = Lists.newArrayList();
|
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
+ private static final boolean DEBUG_ENTITIES = Boolean.getBoolean("debug.entities"); // Paper
|
+ private static final boolean DEBUG_ENTITIES = Boolean.getBoolean("debug.entities"); // Paper
|
||||||
+ private static Throwable getAddToWorldStackTrace(Entity entity) {
|
+ private static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||||
+ return new Throwable(entity + " Added to world at " + new Date());
|
+ return new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||||
+ }
|
+ }
|
||||||
public final int dimension;
|
public final int dimension;
|
||||||
|
|
||||||
// Add env and gen to constructor
|
// Add env and gen to constructor
|
||||||
@@ -1160,6 +1165,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -980,6 +984,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
private boolean j(Entity entity) {
|
private boolean j(Entity entity) {
|
||||||
if (entity.dead) {
|
if (entity.dead) {
|
||||||
WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.a(entity)); // CraftBukkit // Paper
|
WorldServer.a.warn("Tried to add entity {} but it was marked as removed already: " + entity); // CraftBukkit // Paper
|
||||||
+ if (DEBUG_ENTITIES) getAddToWorldStackTrace(entity).printStackTrace();
|
+ if (DEBUG_ENTITIES) getAddToWorldStackTrace(entity).printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
UUID uuid = entity.getUniqueID();
|
UUID uuid = entity.getUniqueID();
|
||||||
@@ -1171,8 +1177,14 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -991,8 +996,14 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
this.f.remove(entity1);
|
this.g.remove(entity1);
|
||||||
} else {
|
} else {
|
||||||
if (!(entity instanceof EntityHuman)) {
|
if (!(entity instanceof EntityHuman)) {
|
||||||
- WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.a(entity1), uuid.toString()); // CraftBukkit // Paper
|
- WorldServer.a.error("Keeping entity {} that already exists with UUID {} - " + entity1, EntityTypes.getName(entity1.P()), uuid.toString()); // CraftBukkit // Paper
|
||||||
+ WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper
|
+ WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper
|
||||||
WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper
|
WorldServer.a.error("Deleting duplicate entity {}", entity); // Paper
|
||||||
+ if (DEBUG_ENTITIES) {
|
+ if (DEBUG_ENTITIES) {
|
||||||
|
@ -64,7 +56,7 @@ index b16324e1a..994d4bbb8 100644
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1189,7 +1201,24 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -1009,7 +1020,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
protected void b(Entity entity) {
|
protected void b(Entity entity) {
|
||||||
super.b(entity);
|
super.b(entity);
|
||||||
this.entitiesById.a(entity.getId(), entity);
|
this.entitiesById.a(entity.getId(), entity);
|
||||||
|
@ -73,6 +65,7 @@ index b16324e1a..994d4bbb8 100644
|
||||||
+ if (DEBUG_ENTITIES) {
|
+ if (DEBUG_ENTITIES) {
|
||||||
+ entity.addedToWorldStack = getAddToWorldStackTrace(entity);
|
+ entity.addedToWorldStack = getAddToWorldStackTrace(entity);
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
+ Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||||
+ if (old != null && old.getId() != entity.getId() && old.valid) {
|
+ if (old != null && old.getId() != entity.getId() && old.valid) {
|
||||||
+ Logger logger = LogManager.getLogger();
|
+ Logger logger = LogManager.getLogger();
|
||||||
|
@ -87,7 +80,7 @@ index b16324e1a..994d4bbb8 100644
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
Entity[] aentity = entity.bb();
|
Entity[] aentity = entity.bi();
|
||||||
|
|
||||||
if (aentity != null) {
|
if (aentity != null) {
|
||||||
--
|
--
|
|
@ -1,4 +1,4 @@
|
||||||
From 9ac674cfb6f5f71dd61a4952c4bc7d88e3cfa3e5 Mon Sep 17 00:00:00 2001
|
From fec119593dd482c5e813c4b3e343f17cfa6185d9 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 21 Jul 2018 14:23:31 -0400
|
Date: Sat, 21 Jul 2018 14:23:31 -0400
|
||||||
Subject: [PATCH] Additional Paper Config options
|
Subject: [PATCH] Additional Paper Config options
|
||||||
|
@ -21,10 +21,10 @@ index 62bce1806..5a17ce3d2 100644
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
Bukkit.getLogger().info(s);
|
Bukkit.getLogger().info(s);
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 50416f40a..14c8edeff 100644
|
index 692206127..7bd7aa0d9 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -11,6 +11,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
@@ -8,6 +8,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.spigotmc.SpigotWorldConfig;
|
import org.spigotmc.SpigotWorldConfig;
|
||||||
|
|
||||||
import static com.destroystokyo.paper.PaperConfig.log;
|
import static com.destroystokyo.paper.PaperConfig.log;
|
|
@ -1,4 +1,4 @@
|
||||||
From 2a6d7b5cf9db036928914e854416039d7c8a14af Mon Sep 17 00:00:00 2001
|
From 728fd7183c4e5a63f03aec4b53bfabb64d62f533 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||||
|
@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
||||||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 14c8edeff..e3f6557e1 100644
|
index 7bd7aa0d9..ba6d5b7ff 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -541,4 +541,40 @@ public class PaperWorldConfig {
|
@@ -430,4 +430,40 @@ public class PaperWorldConfig {
|
||||||
log("Bed Search Radius: " + bedSearchRadius);
|
log("Bed Search Radius: " + bedSearchRadius);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ index 14c8edeff..e3f6557e1 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 04adf4e3c..ea9559583 100644
|
index 03afa1236..1f50004cb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -1,5 +1,10 @@
|
@@ -1,5 +1,10 @@
|
||||||
|
@ -90,17 +90,17 @@ index 04adf4e3c..ea9559583 100644
|
||||||
+import java.util.UUID;
|
+import java.util.UUID;
|
||||||
+// Paper end
|
+// Paper end
|
||||||
import com.destroystokyo.paper.exception.ServerInternalException;
|
import com.destroystokyo.paper.exception.ServerInternalException;
|
||||||
import com.google.common.base.Predicate;
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
@@ -31,6 +36,7 @@ public class Chunk {
|
import com.google.common.collect.Queues;
|
||||||
|
@@ -40,6 +45,7 @@ public class Chunk implements IChunkAccess {
|
||||||
public final World world;
|
public final World world;
|
||||||
public final int[] heightMap;
|
public final Map<HeightMap.Type, HeightMap> heightMap;
|
||||||
public Long scheduledForUnload; // Paper - delay chunk unloads
|
public Long scheduledForUnload; // Paper - delay chunk unloads
|
||||||
+ private static final Logger logger = LogManager.getLogger(); // Paper
|
+ private static final Logger logger = LogManager.getLogger(); // Paper
|
||||||
public final int locX;
|
public final int locX;
|
||||||
public final int locZ;
|
public final int locZ;
|
||||||
private boolean m;
|
private boolean m;
|
||||||
@@ -658,6 +664,7 @@ public class Chunk {
|
@@ -689,6 +695,7 @@ public class Chunk implements IChunkAccess {
|
||||||
if (i != this.locX || j != this.locZ) {
|
if (i != this.locX || j != this.locZ) {
|
||||||
Chunk.e.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity);
|
Chunk.e.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity);
|
||||||
entity.die();
|
entity.die();
|
||||||
|
@ -108,7 +108,7 @@ index 04adf4e3c..ea9559583 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
int k = MathHelper.floor(entity.locY / 16.0D);
|
int k = MathHelper.floor(entity.locY / 16.0D);
|
||||||
@@ -851,6 +858,37 @@ public class Chunk {
|
@@ -868,6 +875,37 @@ public class Chunk implements IChunkAccess {
|
||||||
|
|
||||||
for (int j = 0; j < i; ++j) {
|
for (int j = 0; j < i; ++j) {
|
||||||
List entityslice = aentityslice[j]; // Spigot
|
List entityslice = aentityslice[j]; // Spigot
|
||||||
|
@ -147,32 +147,32 @@ index 04adf4e3c..ea9559583 100644
|
||||||
this.world.a((Collection) entityslice);
|
this.world.a((Collection) entityslice);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 0d3af8cb7..7188d0c99 100644
|
index d725bf13e..7154692ee 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -2614,6 +2614,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
@@ -2735,6 +2735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER
|
+ public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER
|
||||||
public void a(UUID uuid) {
|
public void a(UUID uuid) {
|
||||||
this.uniqueID = uuid;
|
this.uniqueID = uuid;
|
||||||
this.ar = this.uniqueID.toString();
|
this.au = this.uniqueID.toString();
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 994d4bbb8..1244baf45 100644
|
index 013f4eef5..b9d03d801 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -42,7 +42,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -40,7 +40,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
|
private final MinecraftServer server;
|
||||||
|
public EntityTracker tracker;
|
||||||
private final PlayerChunkMap manager;
|
private final PlayerChunkMap manager;
|
||||||
// private final Set<NextTickListEntry> nextTickListHash = Sets.newHashSet();
|
|
||||||
private final HashTreeSet<NextTickListEntry> nextTickList = new HashTreeSet<NextTickListEntry>(); // CraftBukkit - HashTreeSet
|
|
||||||
- private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
|
- private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
|
||||||
+ public final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap(); // Paper
|
+ public final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap(); // Paper
|
||||||
public boolean savingDisabled;
|
public boolean savingDisabled;
|
||||||
private boolean Q;
|
private boolean K;
|
||||||
private int emptyTime;
|
private int emptyTime;
|
||||||
@@ -1177,14 +1177,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -996,14 +996,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
this.f.remove(entity1);
|
this.g.remove(entity1);
|
||||||
} else {
|
} else {
|
||||||
if (!(entity instanceof EntityHuman)) {
|
if (!(entity instanceof EntityHuman)) {
|
||||||
- WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper
|
- WorldServer.a.error("Keeping entity {} that already exists with UUID {}", entity1, uuid.toString()); // CraftBukkit // Paper
|
||||||
|
@ -195,9 +195,9 @@ index 994d4bbb8..1244baf45 100644
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1206,7 +1209,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -1026,7 +1029,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
entity.addedToWorldStack = getAddToWorldStackTrace(entity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||||
- if (old != null && old.getId() != entity.getId() && old.valid) {
|
- if (old != null && old.getId() != entity.getId() && old.valid) {
|
||||||
+ if (old != null && old.getId() != entity.getId() && old.valid && entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) {
|
+ if (old != null && old.getId() != entity.getId() && old.valid && entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) {
|
|
@ -1,23 +0,0 @@
|
||||||
From b0c9be521fc1613e6ab93cbc058b8fbf2de7068a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Aikar <aikar@aikar.co>
|
|
||||||
Date: Thu, 19 Jul 2018 01:13:28 -0400
|
|
||||||
Subject: [PATCH] add more information to Entity.toString()
|
|
||||||
|
|
||||||
UUID, ticks lived, valid, dead
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
||||||
index 80ecdb282..99dac412f 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
||||||
@@ -2361,7 +2361,7 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
- return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)});
|
|
||||||
+ return String.format("%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cd=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isInvulnerable(DamageSource damagesource) {
|
|
||||||
--
|
|
||||||
2.18.0
|
|
||||||
|
|
Loading…
Reference in a new issue