mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-08 00:21:50 +01:00
Upstream merge
This commit is contained in:
parent
020079df9a
commit
2dbd93ee7f
@ -128,8 +128,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- 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, Repairable {
|
||||
return HANDLED_TAGS;
|
||||
}
|
||||
return HANDLED_TAGS;
|
||||
}
|
||||
+
|
||||
+ // Spigot start
|
||||
@ -191,4 +191,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Spigot end
|
||||
}
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
@ -52,9 +52,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
static Map<Enchantment, Integer> buildEnchantments(Map<String, Object> map, ItemMetaKey key) {
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
}
|
||||
|
||||
applyEnchantments(enchantments, itemTag, ENCHANTMENTS);
|
||||
|
||||
+
|
||||
+ // Spigot start
|
||||
+ if ( spigot.isUnbreakable() )
|
||||
+ {
|
||||
@ -62,9 +63,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Spigot end
|
||||
+
|
||||
|
||||
if (hasRepairCost()) {
|
||||
itemTag.setInt(REPAIR.NBT, repairCost);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
|
||||
@Overridden
|
||||
@ -88,14 +89,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
|
||||
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
|
||||
hash = 61 * hash + unhandledTags.hashCode();
|
||||
+ hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot
|
||||
++ hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot
|
||||
return hash;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
if (hasRepairCost()) {
|
||||
builder.put(REPAIR.BUKKIT, repairCost);
|
||||
}
|
||||
|
||||
+
|
||||
+ // Spigot start
|
||||
+ if ( spigot.isUnbreakable() )
|
||||
+ {
|
||||
@ -103,18 +105,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Spigot end
|
||||
+
|
||||
|
||||
return builder;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
synchronized (HANDLED_TAGS) {
|
||||
if (HANDLED_TAGS.isEmpty()) {
|
||||
HANDLED_TAGS.addAll(Arrays.asList(
|
||||
+ UNBREAKABLE.NBT, // Spigot
|
||||
DISPLAY.NBT,
|
||||
REPAIR.NBT,
|
||||
ATTRIBUTES.NBT,
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
}
|
||||
return HANDLED_TAGS;
|
||||
}
|
||||
- }
|
||||
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
public static Set<String> getHandledTags() {
|
||||
if (HANDLED_TAGS.isEmpty()) {
|
||||
HANDLED_TAGS.addAll(Arrays.asList(
|
||||
+ UNBREAKABLE.NBT, // Spigot
|
||||
DISPLAY.NBT,
|
||||
REPAIR.NBT,
|
||||
ATTRIBUTES.NBT,
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
// Spigot start
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
@ -134,4 +141,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
};
|
||||
|
||||
@Override
|
||||
--
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user