mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
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:13ed05de
Prepare for Java 146b00b145
#639: Deep clone itemmetas persistent container on clone
This commit is contained in:
parent
4df3dad85d
commit
793bae0d45
@ -1,4 +1,4 @@
|
|||||||
From dd9d80cf009bb2aa64bb59893c32238e74cff2ee Mon Sep 17 00:00:00 2001
|
From 4cb5bd54e916939bb5f250ecfa940b3de731278f Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 28 May 2015 23:00:19 -0400
|
Date: Thu, 28 May 2015 23:00:19 -0400
|
||||||
Subject: [PATCH] Handle Item Meta Inconsistencies
|
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.
|
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
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index 766b1fe13..213e3779d 100644
|
index aa7501d366..db11c8ec69 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
+++ b/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;
|
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
|
||||||
@ -79,7 +79,7 @@ index 766b1fe13..213e3779d 100644
|
|||||||
|
|
||||||
public boolean hasEnchantments() {
|
public boolean hasEnchantments() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index 4a9132c70..3dd912abe 100644
|
index 4a9132c701..3dd912abe3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack {
|
@@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack {
|
||||||
@ -194,7 +194,7 @@ index 4a9132c70..3dd912abe 100644
|
|||||||
|
|
||||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
|
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 0f901453d..5ee968f2e 100644
|
index f46119ea4d..bd9e09f999 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
@ -236,7 +236,7 @@ index 0f901453d..5ee968f2e 100644
|
|||||||
private NBTTagCompound internalTag;
|
private NBTTagCompound internalTag;
|
||||||
- private final Map<String, NBTBase> unhandledTags = new HashMap<String, NBTBase>();
|
- private final Map<String, NBTBase> unhandledTags = new HashMap<String, NBTBase>();
|
||||||
+ private final Map<String, NBTBase> unhandledTags = new TreeMap<>(); // Paper
|
+ private final Map<String, NBTBase> unhandledTags = new TreeMap<>(); // Paper
|
||||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
|
private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
|
||||||
|
|
||||||
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
|
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
|
||||||
@@ -303,7 +306,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -303,7 +306,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
@ -306,7 +306,7 @@ index 0f901453d..5ee968f2e 100644
|
|||||||
}
|
}
|
||||||
if (this.hasAttributeModifiers()) {
|
if (this.hasAttributeModifiers()) {
|
||||||
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
||||||
@@ -1431,4 +1434,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1432,4 +1435,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return HANDLED_TAGS;
|
return HANDLED_TAGS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,5 +330,5 @@ index 0f901453d..5ee968f2e 100644
|
|||||||
+
|
+
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.0.windows.1
|
2.25.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f0369a9d8359f567e1f35e725dcdba6f04525987 Mon Sep 17 00:00:00 2001
|
From bea52b5cc2a373d9fc26866293ca778d6ef784b1 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Sat, 27 Jan 2018 17:04:14 -0500
|
Date: Sat, 27 Jan 2018 17:04:14 -0500
|
||||||
Subject: [PATCH] Add ArmorStand Item Meta
|
Subject: [PATCH] Add ArmorStand Item Meta
|
||||||
@ -13,7 +13,7 @@ starting point for future additions in this area.
|
|||||||
Fixes GH-559
|
Fixes GH-559
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||||
index f70052284..3723facca 100644
|
index f700522840..3723faccac 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||||
@@ -8,13 +8,39 @@ import org.bukkit.Material;
|
@@ -8,13 +8,39 @@ import org.bukkit.Material;
|
||||||
@ -267,10 +267,10 @@ index f70052284..3723facca 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 5ee968f2e..1eede4bcc 100644
|
index 84f489a66d..3325111f8a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -1428,7 +1428,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1429,7 +1429,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
CraftMetaTropicalFishBucket.VARIANT.NBT,
|
CraftMetaTropicalFishBucket.VARIANT.NBT,
|
||||||
CraftMetaCrossbow.CHARGED.NBT,
|
CraftMetaCrossbow.CHARGED.NBT,
|
||||||
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
|
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
|
||||||
@ -288,7 +288,7 @@ index 5ee968f2e..1eede4bcc 100644
|
|||||||
}
|
}
|
||||||
return HANDLED_TAGS;
|
return HANDLED_TAGS;
|
||||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||||
index 630233960..3a82bede7 100644
|
index 6302339601..3a82bede7c 100644
|
||||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||||
@@ -6,6 +6,7 @@ import java.util.ArrayList;
|
@@ -6,6 +6,7 @@ import java.util.ArrayList;
|
||||||
@ -308,5 +308,5 @@ index 630233960..3a82bede7 100644
|
|||||||
return cleanStack;
|
return cleanStack;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.0.windows.1
|
2.25.0
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From d1c41e1d8275dece2e04bbc3214f28ce9d92d30e Mon Sep 17 00:00:00 2001
|
From 9471146c065d29d7d11f1538d6dcffdcf985d32b Mon Sep 17 00:00:00 2001
|
||||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||||
Date: Wed, 12 Sep 2018 18:53:55 +0300
|
Date: Wed, 12 Sep 2018 18:53:55 +0300
|
||||||
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
|
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java
|
diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java
|
||||||
index 005ebec26..97d85f845 100644
|
index 005ebec266..97d85f8451 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ArgumentBlock.java
|
--- a/src/main/java/net/minecraft/server/ArgumentBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ArgumentBlock.java
|
+++ b/src/main/java/net/minecraft/server/ArgumentBlock.java
|
||||||
@@ -43,7 +43,7 @@ public class ArgumentBlock {
|
@@ -43,7 +43,7 @@ public class ArgumentBlock {
|
||||||
@ -32,7 +32,7 @@ index 005ebec26..97d85f845 100644
|
|||||||
this.s = this::l;
|
this.s = this::l;
|
||||||
if (this.i.canRead() && this.i.peek() == '#') {
|
if (this.i.canRead() && this.i.peek() == '#') {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 1eede4bcc..fb78d6cce 100644
|
index 3325111f8a..0606e69a61 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer;
|
@@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer;
|
||||||
@ -232,7 +232,7 @@ index 1eede4bcc..fb78d6cce 100644
|
|||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1215,6 +1331,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1216,6 +1332,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
clone.unbreakable = this.unbreakable;
|
clone.unbreakable = this.unbreakable;
|
||||||
clone.damage = this.damage;
|
clone.damage = this.damage;
|
||||||
clone.version = this.version;
|
clone.version = this.version;
|
||||||
@ -247,7 +247,7 @@ index 1eede4bcc..fb78d6cce 100644
|
|||||||
return clone;
|
return clone;
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
throw new Error(e);
|
throw new Error(e);
|
||||||
@@ -1272,6 +1396,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1273,6 +1397,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
builder.put(DAMAGE.BUKKIT, damage);
|
builder.put(DAMAGE.BUKKIT, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ index 1eede4bcc..fb78d6cce 100644
|
|||||||
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
|
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
|
||||||
serializeInternal(internalTags);
|
serializeInternal(internalTags);
|
||||||
if (!internalTags.isEmpty()) {
|
if (!internalTags.isEmpty()) {
|
||||||
@@ -1435,7 +1577,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1436,7 +1578,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
CraftMetaArmorStand.NO_BASE_PLATE.NBT,
|
CraftMetaArmorStand.NO_BASE_PLATE.NBT,
|
||||||
CraftMetaArmorStand.SHOW_ARMS.NBT,
|
CraftMetaArmorStand.SHOW_ARMS.NBT,
|
||||||
CraftMetaArmorStand.SMALL.NBT,
|
CraftMetaArmorStand.SMALL.NBT,
|
||||||
@ -283,7 +283,7 @@ index 1eede4bcc..fb78d6cce 100644
|
|||||||
// Paper end
|
// Paper end
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1461,4 +1605,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@ -432,5 +432,5 @@ index 1eede4bcc..fb78d6cce 100644
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.0.windows.1
|
2.25.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From c623ba588a6cfb7b73ac122339ce101718d7f8fe Mon Sep 17 00:00:00 2001
|
From 32dd7a3f9a10d5944835812141c61e6506efd693 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach@zachbr.io>
|
From: Zach Brown <zach@zachbr.io>
|
||||||
Date: Sat, 8 Feb 2020 18:02:24 -0600
|
Date: Sat, 8 Feb 2020 18:02:24 -0600
|
||||||
Subject: [PATCH] Allow overriding the java version check
|
Subject: [PATCH] Allow overriding the java version check
|
||||||
@ -6,15 +6,15 @@ Subject: [PATCH] Allow overriding the java version check
|
|||||||
-DPaper.IgnoreJavaVersion=true
|
-DPaper.IgnoreJavaVersion=true
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index eb5f44e30..af05f3c1e 100644
|
index 444a6a608b..cb60310e63 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -175,7 +175,7 @@ public class Main {
|
@@ -175,7 +175,7 @@ public class Main {
|
||||||
float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
||||||
if (javaVersion > 57.0) {
|
if (javaVersion > 58.0) {
|
||||||
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 13 is supported.");
|
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 14 is supported.");
|
||||||
- return;
|
- return;
|
||||||
+ if (!Boolean.getBoolean("Paper.IgnoreJavaVersion")) return;
|
+ if (!Boolean.getBoolean("Paper.IgnoreJavaVersion")) return; // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 3d61a853e35fd3607a6b1ed45ca007e513835d72
|
Subproject commit 13ed05decd13b6947473ca4926ee53d7705e2965
|
Loading…
Reference in New Issue
Block a user