Update upstream CB

--- work/CraftBukkit
Submodule work/CraftBukkit 7deb3728..d6b3eddf:
  > SPIGOT-5355: Double Chests still open after InventoryOpenEvent cancelled
This commit is contained in:
Zach Brown 2019-10-13 00:28:46 -05:00
parent 0c64f7b0ae
commit a4dbabdbd3
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
9 changed files with 43 additions and 43 deletions

View File

@ -1,11 +1,11 @@
From 3ef911ac360ce6670463d97aa074f747fa364716 Mon Sep 17 00:00:00 2001
From e5747591e90b08f7f608da800748d4c476b883c8 Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 6decbc1c2..894a8d860 100644
index 55e8174bf..3b80e7bfb 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -37,7 +37,7 @@ import org.bukkit.inventory.MainHand;
@ -17,7 +17,7 @@ index 6decbc1c2..894a8d860 100644
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
@@ -1453,13 +1453,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1456,13 +1456,20 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}

View File

@ -1,11 +1,11 @@
From e7212fe8410265b5084a3c28274a895365b55774 Mon Sep 17 00:00:00 2001
From fcd2c72a3b622328ce01a7e9591fd2b024ecee6f Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 13:22:40 +0000
Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index f4719dd87..9b9477884 100644
index 8ba828a03..170f741d4 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -4,7 +4,9 @@ import com.google.common.collect.Lists;
@ -50,7 +50,7 @@ index f4719dd87..9b9477884 100644
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
}
@@ -1327,7 +1336,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1330,7 +1339,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastHealthSent = -1.0F;
this.lastFoodSent = -1;
// this.recipeBook.a((RecipeBook) entityplayer.recipeBook); // CraftBukkit

View File

@ -1,4 +1,4 @@
From 8f2e0cdfe2a08d5ed4b08446eb60b4e278a83afd Mon Sep 17 00:00:00 2001
From 7615e6c4249f387bd62392ce23bf5f759be70b85 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Tue, 27 Dec 2016 01:57:57 +0000
Subject: [PATCH] Properly fix item duplication bug
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 9b9477884..742489d39 100644
index 170f741d4..88bc8b531 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1800,7 +1800,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1803,7 +1803,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
protected boolean isFrozen() {

View File

@ -1,4 +1,4 @@
From ab5b9cd90656ebcaabff0c78318838e7b93854ad Mon Sep 17 00:00:00 2001
From 4e9206e2969755a97beb7e9fdcec406bfbec5208 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index e1bd10579e..89915b3599 100644
index e1bd10579..89915b359 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -164,7 +164,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -34,7 +34,7 @@ index e1bd10579e..89915b3599 100644
this.activeContainer = this.defaultContainer;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 742489d397..7e37164c0e 100644
index 88bc8b531..1bb580e0e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -362,7 +362,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -64,7 +64,7 @@ index 742489d397..7e37164c0e 100644
}
this.nextContainerCounter();
@@ -1115,7 +1115,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1118,7 +1118,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
// CraftBukkit end
if (this.activeContainer != this.defaultContainer) {
@ -73,7 +73,7 @@ index 742489d397..7e37164c0e 100644
}
// this.nextContainerCounter(); // CraftBukkit - moved up
@@ -1179,7 +1179,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1182,7 +1182,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public void closeInventory() {
@ -88,7 +88,7 @@ index 742489d397..7e37164c0e 100644
this.m();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 89beac63aa..b9793d4cc6 100644
index 89beac63a..b9793d4cc 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2025,7 +2025,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -101,7 +101,7 @@ index 89beac63aa..b9793d4cc6 100644
this.player.m();
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index a167843bfb..9e5cd22d7d 100644
index a167843bf..9e5cd22d7 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -402,7 +402,7 @@ public abstract class PlayerList {
@ -114,7 +114,7 @@ index a167843bfb..9e5cd22d7d 100644
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game");
cserver.getPluginManager().callEvent(playerQuitEvent);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index cbabe7743d..b67d1b36ea 100644
index cbabe7743..b67d1b36e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -993,7 +993,7 @@ public class WorldServer extends World {
@ -136,7 +136,7 @@ index cbabe7743d..b67d1b36ea 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 77efc43a5d..81cf5f47a7 100644
index 77efc43a5..81cf5f47a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -619,8 +619,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -155,7 +155,7 @@ index 77efc43a5d..81cf5f47a7 100644
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e610c8aaed..ce35e6bbc2 100644
index e610c8aae..ce35e6bbc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -781,7 +781,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -168,7 +168,7 @@ index e610c8aaed..ce35e6bbc2 100644
// Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 8bd1dedcca..ade1d42f7e 100644
index 8bd1dedcc..ade1d42f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1288,8 +1288,19 @@ public class CraftEventFactory {

View File

@ -1,11 +1,11 @@
From 60711802ff648aadcdae6ab21f060ef552c2532a Mon Sep 17 00:00:00 2001
From 4d2f78285608aa6230d078f39bb3f4f6a85735b9 Mon Sep 17 00:00:00 2001
From: Caleb Bassham <caleb.bassham@gmail.com>
Date: Fri, 28 Sep 2018 02:32:19 -0500
Subject: [PATCH] Call player spectator target events
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 1b35e6c47..eed8bcf03 100644
index 898089983..ad5dcab78 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -17,7 +17,7 @@ index 1b35e6c47..eed8bcf03 100644
public boolean worldChangeInvuln;
private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
private final RecipeBookServer recipeBook;
@@ -1578,15 +1578,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1581,15 +1581,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
}

View File

@ -1,4 +1,4 @@
From 20b9514747f9c827c27d47bf688849fed72c1459 Mon Sep 17 00:00:00 2001
From b6859fecadd83ec887760612d07fdc7b8791df9d Mon Sep 17 00:00:00 2001
From: GreenMeanie <GreenMeanieMC@gmail.com>
Date: Sat, 20 Oct 2018 22:34:02 -0400
Subject: [PATCH] Reset players airTicks on respawn
@ -17,10 +17,10 @@ index 4833a9652..19bbcc043 100644
return 300;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index eed8bcf03..517bbf602 100644
index ad5dcab78..ff398e5ed 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1866,6 +1866,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1869,6 +1869,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
this.setHealth(this.getMaxHealth());

View File

@ -1,14 +1,14 @@
From 16e1eddb17053706cc06be25bb80881a8fcba6d3 Mon Sep 17 00:00:00 2001
From 106f0064d5e764347eee78651e53800010b5359c Mon Sep 17 00:00:00 2001
From: connorhartley <vectrixu+gh@gmail.com>
Date: Mon, 7 Jan 2019 14:43:48 -0600
Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 6161e9d23..a09b5af0e 100644
index 3897411e7..21b02aeca 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1289,6 +1289,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1292,6 +1292,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void n() {
this.ct = true;
this.ejectPassengers();

View File

@ -1,11 +1,11 @@
From 1cf6d39b92813916f3e9493764b19b226e03f1ba Mon Sep 17 00:00:00 2001
From e65053e859d55d62c7442929f05bdd71d5703074 Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Mon, 19 Aug 2019 01:27:58 +0500
Subject: [PATCH] implement optional per player mob spawns
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
index 8de6c4816c..ddec62fbf5 100644
index 8de6c4816..ddec62fbf 100644
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -74,6 +74,8 @@ public class WorldTimingsHandler {
@ -27,7 +27,7 @@ index 8de6c4816c..ddec62fbf5 100644
public static Timing getTickList(WorldServer worldserver, String timingsType) {
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e7bbeef74d..246bb4b014 100644
index e7bbeef74..246bb4b01 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -615,4 +615,9 @@ public class PaperWorldConfig {
@ -42,7 +42,7 @@ index e7bbeef74d..246bb4b014 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
new file mode 100644
index 0000000000..9ebd7ecb7a
index 000000000..9ebd7ecb7
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/PlayerMobDistanceMap.java
@@ -0,0 +1,253 @@
@ -301,7 +301,7 @@ index 0000000000..9ebd7ecb7a
+}
diff --git a/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
new file mode 100644
index 0000000000..4f13d3ff83
index 000000000..4f13d3ff8
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/PooledHashSets.java
@@ -0,0 +1,241 @@
@ -547,7 +547,7 @@ index 0000000000..4f13d3ff83
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 8d7971ad80..e7539dd791 100644
index 8d7971ad8..e7539dd79 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -555,7 +555,22 @@ public class ChunkProviderServer extends IChunkProvider {
@ -601,7 +601,7 @@ index 8d7971ad80..e7539dd791 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 0e29858c08..7801879c87 100644
index 106b1ffe0..fa79d0bed 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -80,6 +80,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -624,7 +624,7 @@ index 0e29858c08..7801879c87 100644
}
// Yes, this doesn't match Vanilla, but it's the best we can do for now.
@@ -1770,6 +1776,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1773,6 +1779,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.playerConnection.sendPacket(new PacketPlayOutUnloadChunk(chunkcoordintpair.x, chunkcoordintpair.z));
}
@ -633,7 +633,7 @@ index 0e29858c08..7801879c87 100644
return this.cv;
}
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index a7fc34f850..612b9b7e33 100644
index a7fc34f85..612b9b7e3 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -253,6 +253,7 @@ public class EntityTypes<T extends Entity> {
@ -645,7 +645,7 @@ index a7fc34f850..612b9b7e33 100644
return this.ba;
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 9daf64bad4..95ee335135 100644
index 31d106f95..59e74900f 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -77,7 +77,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -684,7 +684,7 @@ index 9daf64bad4..95ee335135 100644
private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) {
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index c6ea37ffbd..9d4a96ae49 100644
index c6ea37ffb..9d4a96ae4 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
@ -757,7 +757,7 @@ index c6ea37ffbd..9d4a96ae49 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 845575f52e..ee3789b38c 100644
index 845575f52..ee3789b38 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -964,7 +964,20 @@ public class WorldServer extends World {
@ -802,5 +802,5 @@ index 845575f52e..ee3789b38c 100644
@Override
--
2.22.1
2.23.0

@ -1 +1 @@
Subproject commit 7deb3728e3697c4123ce2addce4bc27bf9e0a652
Subproject commit d6b3eddf6804807f9101936c9ef4433dfbf6ed78