Updated Upstream (CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
a339310c #755: Fix NPE when calling getInventory() for virtual EnderChests
2577f9bf Increase outdated build delay
1dabfdc8 #754: Fix pre-1.16 serialized SkullMeta being broken on 1.16+, losing textures
This commit is contained in:
Mariell Hoversholm 2020-09-27 16:52:40 +02:00 committed by Daniel Ennis
parent 5a988f2e45
commit 654b792caf
394 changed files with 42 additions and 70 deletions

View File

@ -196,7 +196,7 @@ index 1374fe3d7007977cf7513a7a91b4509dfc881e65..e954b100ea0c038c2e2aaba2a0937a6a
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
<dependency>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 8a8234199e36da33cb94fdf030f9fc75dc0add44..9c98589c2db92720b4ae054ee74ef7ab0dac891a 100644
index 52529e9318561d1873fd110fc2a2c775645ce1d7..8b2c7b6da2c6793e1cb1498f26693fb23dd3fa3e 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -186,7 +186,7 @@ public class Main {
@ -207,7 +207,7 @@ index 8a8234199e36da33cb94fdf030f9fc75dc0add44..9c98589c2db92720b4ae054ee74ef7ab
+ Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -7);
deadline.add(Calendar.DAY_OF_YEAR, -21);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..674096cab190d62622f9947853b056f57d43a2a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

View File

@ -45,11 +45,11 @@ index 90551257c299aaf694eb4f4063d5b1b3eee94876..ac177cd391e220af7584463e35f1f11e
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index f187c7d127c356861c30141efeafcef0057878ec..061a3bc88fcce6877bc976d3b7989dea22b0a120 100644
index 112a6d3ebe2f0b57f4e3c09d4ec342123af5f550..2dfba120cd81eb6b217decccb7bb218bb3f6a82e 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -200,12 +200,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -7);
deadline.add(Calendar.DAY_OF_YEAR, -21);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Use UserCache for player heads
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index a6e95a90977603068cbbaabfb02b640f15085965..4fb27cc7ed062696239f75b6f85ddb0a31866568 100644
index e950b1957133fef20c464284807df262a7684238..c57634317b661e05ddd085d04f7338045445069f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -157,7 +157,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -165,7 +165,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
if (name == null) {
setProfile(null);
} else {

View File

@ -547,10 +547,10 @@ index 3e3f2a3d3b5ab32f498b4dd65f35f4c26470790f..6137bb510eec7d8c2ff2908b1255e56d
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 4fb27cc7ed062696239f75b6f85ddb0a31866568..c31011ff91f4ea8368e3afbc5ec07eff84e93fe2 100644
index c57634317b661e05ddd085d04f7338045445069f..da9ad92f6c999d87b790852cb3129f9b04f624a9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -71,6 +71,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -79,6 +79,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
}
private void setProfile(GameProfile profile) {

View File

@ -9,12 +9,12 @@ modified in order to prevent merge conflicts when Spigot changes/disables the wa
and to provide some level of hint without being disruptive.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index eae93b314fed9f7ddf1c0b87228a2f3bc9f73a78..ac60ed4396b67838ded7c775ca1115eba40d318b 100644
index de16a5f8b88d671c42db786ffcf60f4dce181029..ba949818493369c02d06d33d77a992c8ee8f457f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -218,10 +218,12 @@ public class Main {
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -7);
deadline.add(Calendar.DAY_OF_YEAR, -21);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit

View File

@ -48,19 +48,19 @@ index 20588598386a4f479e6a58b294149bed789c63ce..ecc32c2fb1e8e1ac03074102b982adb4
public BlockFace getRotation() {
BlockData blockData = getBlockData();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index c31011ff91f4ea8368e3afbc5ec07eff84e93fe2..21e7a661739da84e6ec7a20c81cefcb0440484a2 100644
index da9ad92f6c999d87b790852cb3129f9b04f624a9..ca40a5e33f851d560086533382340dd59f783f54 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -3,6 +3,8 @@ package org.bukkit.craftbukkit.inventory;
import com.google.common.collect.ImmutableMap.Builder;
@@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableMap.Builder;
import com.mojang.authlib.GameProfile;
import java.util.Map;
import java.util.UUID;
+import com.destroystokyo.paper.profile.CraftPlayerProfile;
+import com.destroystokyo.paper.profile.PlayerProfile;
import net.minecraft.server.GameProfileSerializer;
import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTTagCompound;
@@ -16,6 +18,7 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta;
@@ -17,6 +19,7 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta;
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.inventory.meta.SkullMeta;
@ -68,7 +68,7 @@ index c31011ff91f4ea8368e3afbc5ec07eff84e93fe2..21e7a661739da84e6ec7a20c81cefcb0
@DelegateDeserialization(SerializableMeta.class)
class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -140,6 +143,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@@ -148,6 +151,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
return hasOwner() ? profile.getName() : null;
}

View File

@ -1,28 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 10 Mar 2018 13:03:49 +0000
Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened
by plugins
diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java
index ce74a5ff2905042e54615439b8e5369d6a921a27..bf8c5436b6cc9f661e7b607fa4696e7ae55b3a13 100644
--- a/src/main/java/net/minecraft/server/InventoryEnderChest.java
+++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java
@@ -5,7 +5,7 @@ import org.bukkit.inventory.InventoryHolder;
public class InventoryEnderChest extends InventorySubcontainer {
- private TileEntityEnderChest a;
+ private TileEntityEnderChest a; public TileEntityEnderChest getTileEntity() { return a; } // Paper - OBFHELPER
// CraftBukkit start
private final EntityHuman owner;
@@ -15,6 +15,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
@Override
public Location getLocation() {
+ if (getTileEntity() == null) return null; // Paper - return null if there is no TE bound (opened by plugin)
return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ());
}

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
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
index 98ecbd1089aeb6d0dc92801d59d01b6e20a4a7c3..f33bc0b6c6d033d692bdd9c9cfb7d2197e9ca40c 100644
index dd9588cfdb9ea6f50c08af829a533319680c7e59..d0e077084b84e44336878410aa9a44fed7408670 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -40,7 +40,7 @@ index 8862bbd73b627e37709d46e6aeeee70c89cbd821..4bbcd00950405a4bf3ce391b557049a3
protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1b15ccd6c05d1ed965c03cd50f7488e26741c2ed..651791f27b796b081a52b8d8735a51e2f940e5df 100644
index dc00ad1607dc6b05f8cb13470046d72f17aa115b..6ebf3884a289d0be081d43d012ac10796740cc1e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -17,7 +17,7 @@ index 2d3e498d5c40e573aad88fd0fce7943e930956ba..8ba7718b61ad9f6c8537b44265818ecb
return this.getBlock().c(this.p(), iblockaccess, blockposition, voxelshapecollision);
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f33bc0b6c6d033d692bdd9c9cfb7d2197e9ca40c..6644115d6654a35cfb21b6c128430a3136a2281f 100644
index d0e077084b84e44336878410aa9a44fed7408670..76ffbcec75fb1e22190179cf1f6ef7e417268ded 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -96,7 +96,7 @@ index ed0f9c5d29c4f88b7beee4b0ecdd7a56de2d7a9e..881cea7c466f29ff4a89db28d104e850
if (operatorboolean.apply(false, false)) {
throw (IllegalArgumentException) SystemUtils.c((Throwable) (new IllegalArgumentException()));
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 2f08328dabeb8e5c3734d4005d7086ec133f6f9d..ee1e0459e5ae8b59c07f9a89c6eaf240e8cd244f 100644
index 909e01e458d729f277797bf1dca564f927318460..4b28cb07e24a2deb18e2c7e97f25fee1d32e0d25 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -178,6 +178,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -58,7 +58,7 @@ index bc249e399befa84cdf07cc58cd0072bb9cb5cced..3b3cae92513a85ba842d403c68f5a1fb
return;
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6644115d6654a35cfb21b6c128430a3136a2281f..91deb3a39cc9a28d96bcac8fe3f4bb68e1fb2003 100644
index 76ffbcec75fb1e22190179cf1f6ef7e417268ded..ef375f3987c26d70ba3f88e53f458bdccb6fc1ae 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd
int i = blockposition.getX();
int j = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ee1e0459e5ae8b59c07f9a89c6eaf240e8cd244f..5ae5caf23e9614bb506c8aa0d511e73c54abf903 100644
index 4b28cb07e24a2deb18e2c7e97f25fee1d32e0d25..42307f0ed23c413f86edf3ac2783f258560ac969 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -218,6 +218,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -33,7 +33,7 @@ index 3a6e5cb459fb9866cf2e377b803501152ab7ce69..f193c2778d0f04973546256d64869239
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index fb77846b236a7279e91ec4d9aab3eef3fe67cd4c..94be9707abefeddcc495d8c0cbc9ed9737d6a56a 100644
index a91070c3674dc47e0019e642f0f76a3cf76b7387..3ec331f51bb305a82d2a12423c28d1f2e8ab8365 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -201,6 +201,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Some files were not shown because too many files have changed in this diff Show More