13
0
geforkt von Mirrors/Paper

Updated Upstream (Bukkit/CraftBukkit/Spigot)

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:
cbb4fc16 SPIGOT-1916: Attribute modifiers for ItemStacks

CraftBukkit Changes:
8164f4b2 SPIGOT-1916: Attribute modifiers for ItemStacks

Spigot Changes:
38536abd Rebuild patches
Dieser Commit ist enthalten in:
Aikar 2018-09-21 11:29:17 -04:00
Ursprung fba19f5f30
Commit f02ab90a19
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
5 geänderte Dateien mit 29 neuen und 28 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From b7a1a8d488e8abec9994bd7ed43d1c0f7bfd664d Mon Sep 17 00:00:00 2001
From 30ade2c15c450c37075fac67b3a4893d44e61353 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
@ -201,42 +201,43 @@ index 1d0580ff7f..2733cda407 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 ef3e27b982..75669bd6ac 100644
index ae5daa5374..7c9c8d401a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -8,12 +8,14 @@ import java.lang.reflect.Constructor;
@@ -8,6 +8,7 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
@@ -24,6 +25,7 @@ import com.google.common.collect.SetMultimap;
import net.minecraft.server.EnumItemSlot;
import net.minecraft.server.GenericAttributes;
import net.minecraft.server.IChatBaseComponent;
+import com.google.common.collect.ImmutableSortedMap;
import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTTagCompound;
import net.minecraft.server.NBTTagList;
@@ -47,6 +49,7 @@ import java.util.Arrays;
@@ -62,6 +64,7 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
+import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import net.minecraft.server.ChatComponentText;
@@ -236,7 +239,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
import net.minecraft.server.EnumChatFormat;
@@ -252,7 +255,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private IChatBaseComponent displayName;
private IChatBaseComponent locName;
private List<String> lore;
- private Map<Enchantment, Integer> enchantments;
+ private EnchantmentMap enchantments; // Paper
private Multimap<Attribute, AttributeModifier> attributeModifiers;
private int repairCost;
private int hideFlag;
private boolean unbreakable;
@@ -245,7 +248,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -262,7 +265,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
private NBTTagCompound internalTag;
@ -245,7 +246,7 @@ index ef3e27b982..75669bd6ac 100644
CraftMetaItem(CraftMetaItem meta) {
if (meta == null) {
@@ -260,7 +263,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -277,7 +280,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
if (meta.enchantments != null) { // Spigot
@ -253,8 +254,8 @@ index ef3e27b982..75669bd6ac 100644
+ this.enchantments = new EnchantmentMap(meta.enchantments); // Paper
}
this.repairCost = meta.repairCost;
@@ -493,13 +496,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
if (meta.hasAttributeModifiers()) {
@@ -352,13 +355,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
}
@ -270,7 +271,7 @@ index ef3e27b982..75669bd6ac 100644
for (int i = 0; i < ench.size(); i++) {
String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT);
@@ -574,13 +577,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -473,13 +476,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
void deserializeInternal(NBTTagCompound tag, Object context) {
}
@ -286,7 +287,7 @@ index ef3e27b982..75669bd6ac 100644
for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants
String enchantKey = entry.getKey().toString();
@@ -735,13 +738,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -700,13 +703,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
public Map<Enchantment, Integer> getEnchants() {
@ -302,16 +303,16 @@ index ef3e27b982..75669bd6ac 100644
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -929,7 +932,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1026,7 +1029,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
clone.lore = new ArrayList<String>(this.lore);
}
if (this.enchantments != null) {
- clone.enchantments = new HashMap<Enchantment, Integer>(this.enchantments);
+ clone.enchantments = new EnchantmentMap(this.enchantments); // Paper
}
clone.hideFlag = this.hideFlag;
clone.unbreakable = this.unbreakable;
@@ -1100,6 +1103,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = HashMultimap.create(this.attributeModifiers);
@@ -1227,6 +1230,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 380e7c43eb1131d830057dd981f0507f9c5b2722 Mon Sep 17 00:00:00 2001
From 528347621a6b1e6d07a0aeb890805990691b6167 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:04:14 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -354,10 +354,10 @@ index 0000000000..0e8acf12e4
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 75669bd6ac..6593a52633 100644
index 7c9c8d401a..b90a02ef6f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -137,6 +137,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -152,6 +152,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
.put(CraftMetaCharge.class, "FIREWORK_EFFECT")
.put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK")
.put(CraftMetaTropicalFishBucket.class, "TROPICAL_FISH_BUCKET")
@ -365,7 +365,7 @@ index 75669bd6ac..6593a52633 100644
.put(CraftMetaItem.class, "UNSPECIFIC")
.build();
@@ -1096,7 +1097,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1223,7 +1224,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
CraftMetaCharge.EXPLOSION.NBT,
CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT,
CraftMetaKnowledgeBook.BOOK_RECIPES.NBT,

@ -1 +1 @@
Subproject commit 4b9a93eccfefb73860fbbf6e6ea072676e26ef92
Subproject commit cbb4fc1673f278d61b5238df15aa1a1fb69655cc

@ -1 +1 @@
Subproject commit 26c89277cb772e7d163941397d0b4db4aac6cea1
Subproject commit 8164f4b25bb557d4ded2db42ca4e6abb423bb5ee

@ -1 +1 @@
Subproject commit 6b015b4b7a9a33746619506053e83993439877ae
Subproject commit 38536abd0c8dcb2ba30a344c53a92bc480d251ba