mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Updated Upstream (CraftBukkit/Spigot)
We pretty much reverted most of Spigots changes here as ours is better.
I guess least Spigot is trying to get closer to us? but missed..
CraftBukkit Changes:
0bf75bbd
SPIGOT-4686: Enchantment ordering nondeterministic
Spigot Changes:
f09662d0 Rebuild patches
This commit is contained in:
parent
3c57e007e9
commit
3ecea2902b
5 changed files with 12 additions and 12 deletions
|
@ -356,7 +356,7 @@ index 000000000..c00b89c8d
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 5e823e1b1..eaf4cd11c 100644
|
||||
index 2508cfcfa..570f695d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
|
||||
|
|
|
@ -201,7 +201,7 @@ index f907d4f3b..eeb2c5689 100644
|
|||
|
||||
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
|
||||
index 99a2c8c8b..5e823e1b1 100644
|
||||
index ef6437f38..2508cfcfa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -0,0 +0,0 @@ import java.lang.reflect.Constructor;
|
||||
|
@ -220,9 +220,9 @@ index 99a2c8c8b..5e823e1b1 100644
|
|||
import net.minecraft.server.NBTBase;
|
||||
import net.minecraft.server.NBTTagCompound;
|
||||
import net.minecraft.server.NBTTagList;
|
||||
@@ -0,0 +0,0 @@ import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
@@ -0,0 +0,0 @@ import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Set;
|
||||
+import java.util.TreeMap;
|
||||
import java.util.logging.Level;
|
||||
|
@ -250,7 +250,7 @@ index 99a2c8c8b..5e823e1b1 100644
|
|||
}
|
||||
|
||||
if (meta.enchantments != null) { // Spigot
|
||||
- this.enchantments = new HashMap<Enchantment, Integer>(meta.enchantments);
|
||||
- this.enchantments = new LinkedHashMap<Enchantment, Integer>(meta.enchantments);
|
||||
+ this.enchantments = new EnchantmentMap(meta.enchantments); // Paper
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ index 99a2c8c8b..5e823e1b1 100644
|
|||
}
|
||||
|
||||
NBTTagList ench = tag.getList(key.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND);
|
||||
- Map<Enchantment, Integer> enchantments = new HashMap<Enchantment, Integer>(ench.size());
|
||||
- Map<Enchantment, Integer> enchantments = new LinkedHashMap<Enchantment, Integer>(ench.size());
|
||||
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
|
||||
|
||||
for (int i = 0; i < ench.size(); i++) {
|
||||
|
@ -282,7 +282,7 @@ index 99a2c8c8b..5e823e1b1 100644
|
|||
return null;
|
||||
}
|
||||
|
||||
- Map<Enchantment, Integer> enchantments = new HashMap<Enchantment, Integer>(ench.size());
|
||||
- Map<Enchantment, Integer> enchantments = new LinkedHashMap<Enchantment, Integer>(ench.size());
|
||||
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
|
||||
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
||||
// Doctor older enchants
|
||||
|
@ -298,7 +298,7 @@ index 99a2c8c8b..5e823e1b1 100644
|
|||
public boolean addEnchant(Enchantment ench, int level, boolean ignoreRestrictions) {
|
||||
Validate.notNull(ench, "Enchantment cannot be null");
|
||||
if (enchantments == null) {
|
||||
- enchantments = new HashMap<Enchantment, Integer>(4);
|
||||
- enchantments = new LinkedHashMap<Enchantment, Integer>(4);
|
||||
+ enchantments = new EnchantmentMap(); // Paper
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ index 99a2c8c8b..5e823e1b1 100644
|
|||
clone.lore = new ArrayList<String>(this.lore);
|
||||
}
|
||||
if (this.enchantments != null) {
|
||||
- clone.enchantments = new HashMap<Enchantment, Integer>(this.enchantments);
|
||||
- clone.enchantments = new LinkedHashMap<Enchantment, Integer>(this.enchantments);
|
||||
+ clone.enchantments = new EnchantmentMap(this.enchantments); // Paper
|
||||
}
|
||||
if (this.hasAttributeModifiers()) {
|
||||
|
|
|
@ -32,7 +32,7 @@ index 8e8390282..f52936581 100644
|
|||
this.s = this::l;
|
||||
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
|
||||
index eaf4cd11c..be2e736eb 100644
|
||||
index 570f695d8..ec91ab72d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4c8327f72112dba222c982259480b1e70893e095
|
||||
Subproject commit 0bf75bbde2df2a715d0e637e2c8972e904597b99
|
|
@ -1 +1 @@
|
|||
Subproject commit 5629554b031cb43df270e834939ef13cf5e75a4d
|
||||
Subproject commit f09662d0ea3632c3294c6db86bdcd92f68aac8c2
|
Loading…
Reference in a new issue