mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-15 07:01:36 +08:00
Updated Upstream (Bukkit/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
Bukkit Changes:
451bd74e Use gson for decoding version command
CraftBukkit Changes:
51100db8
SPIGOT-4678: Fix placing signs in certain circumstances
This commit is contained in:
parent
c5ef31cb0d
commit
458aa79f63
@ -1,26 +1,29 @@
|
||||
From 1a30440641954b395935425e537a9b77857aacdc Mon Sep 17 00:00:00 2001
|
||||
From 1bc123f10d8aefd48085360b80c7daee9945ec04 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Mon, 29 Feb 2016 17:58:01 -0600
|
||||
Subject: [PATCH] Check Paper versions
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index 0305548e..8e57aa91 100644
|
||||
index b8126985d..73d258763 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -28,6 +28,11 @@ import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
@@ -28,6 +28,14 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+// Paper start
|
||||
+import java.io.InputStreamReader;
|
||||
+import java.net.HttpURLConnection;
|
||||
+import org.json.simple.JSONObject;
|
||||
+import org.json.simple.parser.JSONParser;
|
||||
+import org.json.simple.parser.ParseException;
|
||||
+// Paper end
|
||||
+
|
||||
public class VersionCommand extends BukkitCommand {
|
||||
public VersionCommand(@NotNull String name) {
|
||||
super(name);
|
||||
@@ -153,7 +158,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -153,7 +161,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void sendVersion(@NotNull CommandSender sender) {
|
||||
if (hasVersion) {
|
||||
@ -29,7 +32,7 @@ index 0305548e..8e57aa91 100644
|
||||
lastCheck = System.currentTimeMillis();
|
||||
hasVersion = false;
|
||||
} else {
|
||||
@@ -184,24 +189,28 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -184,24 +192,28 @@ public class VersionCommand extends BukkitCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +73,7 @@ index 0305548e..8e57aa91 100644
|
||||
version = version.substring("git-Bukkit-".length());
|
||||
int cbVersions = getDistance("craftbukkit", version.substring(0, version.indexOf(' ')));
|
||||
if (cbVersions == -1) {
|
||||
@@ -234,8 +243,16 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -234,8 +246,16 @@ public class VersionCommand extends BukkitCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,7 +91,7 @@ index 0305548e..8e57aa91 100644
|
||||
BufferedReader reader = Resources.asCharSource(
|
||||
new URL("https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/" + repo + "/commits?since=" + URLEncoder.encode(hash, "UTF-8") + "&withCounts=true"),
|
||||
Charsets.UTF_8
|
||||
@@ -249,9 +266,57 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -249,9 +269,57 @@ public class VersionCommand extends BukkitCommand {
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 37e05486e349c20d73a9a695c8ddb4f4f2933425 Mon Sep 17 00:00:00 2001
|
||||
From 919977c7f91757c5115ce0d257f4447480df1623 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Wood <demonwav@gmail.com>
|
||||
Date: Thu, 1 Mar 2018 19:37:52 -0600
|
||||
Subject: [PATCH] Add version history to version command
|
||||
@ -155,18 +155,18 @@ index 000000000..648b247ef
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index 8e57aa911..746cedd87 100644
|
||||
index 73d258763..ee07fe5e8 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -31,6 +31,7 @@ import org.json.simple.parser.ParseException;
|
||||
// Paper start
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
@@ -34,6 +34,7 @@ import java.net.HttpURLConnection;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
+import com.destroystokyo.paper.VersionHistoryManager;
|
||||
// Paper end
|
||||
|
||||
public class VersionCommand extends BukkitCommand {
|
||||
@@ -49,6 +50,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -52,6 +53,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
if (args.length == 0) {
|
||||
sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
|
||||
@ -174,7 +174,7 @@ index 8e57aa911..746cedd87 100644
|
||||
sendVersion(sender);
|
||||
} else {
|
||||
StringBuilder name = new StringBuilder();
|
||||
@@ -85,6 +87,22 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -88,6 +90,22 @@ public class VersionCommand extends BukkitCommand {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 25ddde677b4051af98030f03f77dd89ef19ca66a Mon Sep 17 00:00:00 2001
|
||||
From b3a5b4a4f7bc25a94dd49ab96ac2072b087cf59e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||
Subject: [PATCH] MC Utils
|
||||
@ -20,7 +20,7 @@ index be179ba213..c53bc8230a 100644
|
||||
|
||||
void b(UUID uuid);
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 330f5d0c19..37f9037a22 100644
|
||||
index 13dc7abc50..9bb7c9c652 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -45,6 +45,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@ -196,7 +196,7 @@ index 8b2000f683..1a3517aeed 100644
|
||||
// CraftBukkit start - fire event
|
||||
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 892e1aca7e..ed859ccf95 100644
|
||||
index d4fe0ab6bf..011c7af218 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -277,10 +277,10 @@ index b8abd6363f..a07ee150c2 100644
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 53511f0cc6..d1267f3d72 100644
|
||||
index 132fe8e880..3fe2aa2313 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -578,6 +578,17 @@ public final class ItemStack {
|
||||
@@ -584,6 +584,17 @@ public final class ItemStack {
|
||||
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ index 53511f0cc6..d1267f3d72 100644
|
||||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
}
|
||||
@@ -662,6 +673,7 @@ public final class ItemStack {
|
||||
@@ -668,6 +679,7 @@ public final class ItemStack {
|
||||
return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
|
||||
}
|
||||
|
||||
@ -742,7 +742,7 @@ index 395215bbdd..f2159bc2dd 100644
|
||||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 55b4d57af4..a2ec56bc90 100644
|
||||
index 330e74bb91..d97cc4f727 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@ -836,5 +836,5 @@ index 8cb97b894a..5e71d2ac27 100644
|
||||
|
||||
static enum IdentityHashingStrategy implements Strategy<Object> {
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e1acedc383cfa732c086789e173d1d05715642eb Mon Sep 17 00:00:00 2001
|
||||
From 118143d945356e7487b7759c96bf8fe042f6beb0 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 28 May 2015 23:00:19 -0400
|
||||
Subject: [PATCH] Handle Item Meta Inconsistencies
|
||||
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
|
||||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index d1267f3d72..dcf58e03e4 100644
|
||||
index 3fe2aa2313..0422d6e047 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
|
||||
@ -61,7 +61,7 @@ index d1267f3d72..dcf58e03e4 100644
|
||||
this.getItem().a(this.tag);
|
||||
// CraftBukkit end
|
||||
}
|
||||
@@ -591,6 +610,7 @@ public final class ItemStack {
|
||||
@@ -597,6 +616,7 @@ public final class ItemStack {
|
||||
// Paper end
|
||||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
@ -69,7 +69,7 @@ index d1267f3d72..dcf58e03e4 100644
|
||||
}
|
||||
|
||||
public IChatBaseComponent getName() {
|
||||
@@ -667,6 +687,7 @@ public final class ItemStack {
|
||||
@@ -673,6 +693,7 @@ public final class ItemStack {
|
||||
nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment)));
|
||||
nbttagcompound.setShort("lvl", (short) ((byte) i));
|
||||
nbttaglist.add((NBTBase) nbttagcompound);
|
||||
@ -337,5 +337,5 @@ index 99a2c8c8b1..5e823e1b1a 100644
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f6046d8c629d430a2905a0c7c6aae297874e9f7c Mon Sep 17 00:00:00 2001
|
||||
From bedaa9f8ea67d7a73e1bfcb46d013931abc193f0 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 5 Jun 2018 23:00:29 -0400
|
||||
Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index f26ace5cd..713977e3c 100644
|
||||
index 886ec71866..ecab15b45a 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -527,6 +527,7 @@ public final class ItemStack {
|
||||
@@ -533,6 +533,7 @@ public final class ItemStack {
|
||||
this.getItem().b(this, world, entityhuman);
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ index f26ace5cd..713977e3c 100644
|
||||
return this.getItem().c(this);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 284630f74..1282ee399 100644
|
||||
index 284630f74e..1282ee3995 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -183,6 +183,13 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 718bfae2fd74cdbf3b15a469b0fd16a9140e236f Mon Sep 17 00:00:00 2001
|
||||
From b7cc5833617773b0957b9f7dd8d0c6785275f828 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Apr 2016 22:09:52 -0400
|
||||
Subject: [PATCH] Optimize Hoppers
|
||||
@ -11,7 +11,7 @@ Subject: [PATCH] Optimize Hoppers
|
||||
* Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 10efe6b3d..6feea98b6 100644
|
||||
index 10efe6b3d9..6feea98b6b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -420,6 +420,15 @@ public class PaperWorldConfig {
|
||||
@ -31,10 +31,10 @@ index 10efe6b3d..6feea98b6 100644
|
||||
private void disableSprintInterruptionOnAttack() {
|
||||
disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", false);
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 91a9f1bbb..914da48a2 100644
|
||||
index 4c2705b731..e4a8ab8591 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -464,8 +464,9 @@ public final class ItemStack {
|
||||
@@ -470,8 +470,9 @@ public final class ItemStack {
|
||||
return this.getItem().a(this, entityhuman, entityliving, enumhand);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 91a9f1bbb..914da48a2 100644
|
||||
itemstack.d(this.B());
|
||||
if (this.tag != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4565a56b3..38c0201ac 100644
|
||||
index 4565a56b3f..38c0201acb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1048,6 +1048,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
@ -59,7 +59,7 @@ index 4565a56b3..38c0201ac 100644
|
||||
if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit
|
||||
this.methodProfiler.a(() -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 29fe031d8..d67fd92d9 100644
|
||||
index 29fe031d85..d67fd92d9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -52,6 +52,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
@ -79,7 +79,7 @@ index 29fe031d8..d67fd92d9 100644
|
||||
this.world.b(this.position, this);
|
||||
if (!this.f.isAir()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
index 559eedfa6..7303a6fdd 100644
|
||||
index 559eedfa66..7303a6fdda 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
||||
@@ -189,6 +189,154 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 0eaf10f193b02ce6e83de436c3e87f282af733f3
|
||||
Subproject commit 451bd74e462ddbe3f77afb12db21bc08ed78e76a
|
@ -1 +1 @@
|
||||
Subproject commit d65a2576e40e58c8e446b330febe6799d13a604f
|
||||
Subproject commit 51100db8215f28accb2eeb56f9ee3e661f362d1e
|
Loading…
Reference in New Issue
Block a user