mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-23 13:08:32 +01:00
Fix merge conflicts.
This commit is contained in:
parent
00c4207874
commit
06faae935f
3 changed files with 20 additions and 20 deletions
|
@ -9,9 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
|
||||
*/
|
||||
boolean hasConflictingEnchant(Enchantment ench);
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
ItemMeta clone();
|
||||
+
|
||||
+ // Spigot start
|
||||
+ public class Spigot
|
||||
+ {
|
||||
|
@ -39,8 +40,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ Spigot spigot();
|
||||
+ // Spigot end
|
||||
+
|
||||
@SuppressWarnings("javadoc")
|
||||
ItemMeta clone();
|
||||
}
|
||||
--
|
|
@ -105,8 +105,8 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 com.google.common.collect.Sets;
|
||||
import java.util.Arrays;
|
||||
@@ -0,0 +0,0 @@ import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
+// Spigot start
|
||||
|
|
|
@ -9,16 +9,17 @@ 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 {
|
||||
static final ItemMetaKey ATTRIBUTES_UUID_HIGH = new ItemMetaKey("UUIDMost");
|
||||
@Specific(Specific.To.NBT)
|
||||
static final ItemMetaKey ATTRIBUTES_UUID_LOW = new ItemMetaKey("UUIDLeast");
|
||||
@Specific(Specific.To.NBT)
|
||||
static final ItemMetaKey HIDEFLAGS = new ItemMetaKey("ItemFlags", "hideFlags");
|
||||
+ @Specific(Specific.To.NBT)
|
||||
+ static final ItemMetaKey UNBREAKABLE = new ItemMetaKey("Unbreakable"); // Spigot
|
||||
|
||||
private String displayName;
|
||||
private List<String> lore;
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
this.repairCost = meta.repairCost;
|
||||
this.attributes = meta.attributes;
|
||||
this.hideFlag = meta.hideFlag;
|
||||
this.unhandledTags.putAll(meta.unhandledTags);
|
||||
+ spigot.setUnbreakable( meta.spigot.isUnbreakable() ); // Spigot
|
||||
}
|
||||
|
@ -38,9 +39,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
static Map<Enchantment, Integer> buildEnchantments(NBTTagCompound tag, ItemMetaKey key) {
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
attributes = null;
|
||||
+
|
||||
+ // Spigot start
|
||||
+ Boolean unbreakable = SerializableMeta.getObject( Boolean.class, map, UNBREAKABLE.BUKKIT, true );
|
||||
+ if ( unbreakable != null )
|
||||
|
@ -70,8 +72,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Overridden
|
||||
boolean isEmpty() {
|
||||
- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty());
|
||||
+ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty() || spigot.isUnbreakable()); // Spigot
|
||||
- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0);
|
||||
+ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0 || spigot.isUnbreakable()); // Spigot
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
|
@ -79,16 +81,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
&& (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore())
|
||||
&& (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes())
|
||||
&& (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost())
|
||||
- && (this.unhandledTags.equals(that.unhandledTags));
|
||||
+ && (this.unhandledTags.equals(that.unhandledTags))
|
||||
+ && this.spigot.isUnbreakable() == that.spigot.isUnbreakable(); // Spigot
|
||||
- && (this.hideFlag == that.hideFlag);
|
||||
+ && (this.hideFlag == that.hideFlag)
|
||||
+ && (this.spigot.isUnbreakable() == that.spigot.isUnbreakable()); // Spigot
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0);
|
||||
hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
|
||||
hash = 61 * hash + unhandledTags.hashCode();
|
||||
hash = 61 * hash + hideFlag;
|
||||
+ hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot
|
||||
return hash;
|
||||
}
|
||||
|
@ -106,8 +108,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Spigot end
|
||||
+
|
||||
|
||||
return builder;
|
||||
}
|
||||
Set<String> hideFlags = new HashSet<String>();
|
||||
for (ItemFlag hideFlagEnum : getItemFlags()) {
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||
synchronized (HANDLED_TAGS) {
|
||||
if (HANDLED_TAGS.isEmpty()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue