diff options
Diffstat (limited to 'src/main')
3 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java index aa1a210a..7b356789 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java @@ -200,4 +200,11 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { boolean applicableTo(Material type) { return type == Material.BANNER; } + + @Override + public CraftMetaBanner clone() { + CraftMetaBanner meta = (CraftMetaBanner) super.clone(); + meta.patterns = new ArrayList<>(patterns); + return meta; + } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index fe874e0d..3bd9ee47 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -214,6 +214,15 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta } @Override + public CraftMetaBlockState clone() { + CraftMetaBlockState meta = (CraftMetaBlockState) super.clone(); + if (blockEntityTag != null) { + meta.blockEntityTag = blockEntityTag.g(); + } + return meta; + } + + @Override public boolean hasBlockState() { return blockEntityTag != null; } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java index 2f438eb4..70616a2f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -176,6 +176,9 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { CraftMetaSpawnEgg clone = (CraftMetaSpawnEgg) super.clone(); clone.spawnedType = spawnedType; + if (entityTag != null) { + clone.entityTag = entityTag.g(); + } return clone; } |