From b5df1f59f7cf4027707f200e781977c4d44768b4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jul 2017 10:48:21 +1000 Subject: [PATCH] SPIGOT-3423: Don't treat technical piston block as BlockStateMeta --- .../org/bukkit/craftbukkit/inventory/CraftItemFactory.java | 1 - .../java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | 1 - .../org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java index fe85d6a292..49ebad22ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -105,7 +105,6 @@ public final class CraftItemFactory implements ItemFactory { case SIGN: case MOB_SPAWNER: case NOTE_BLOCK: - case PISTON_BASE: case BREWING_STAND_ITEM: case ENCHANTMENT_TABLE: case COMMAND: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index 3f11e42791..fb1dc542dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -364,7 +364,6 @@ public final class CraftItemStack extends ItemStack { case SIGN: case MOB_SPAWNER: case NOTE_BLOCK: - case PISTON_BASE: case BREWING_STAND_ITEM: case ENCHANTMENT_TABLE: case COMMAND: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index 8896bd4699..436e8d04d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -178,7 +178,6 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case SIGN: case MOB_SPAWNER: case NOTE_BLOCK: - case PISTON_BASE: case BREWING_STAND_ITEM: case ENCHANTMENT_TABLE: case COMMAND: @@ -384,6 +383,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta te = new TileEntityComparator(); } return new CraftComparator(material, (TileEntityComparator) te); + case PISTON_BASE: + default: throw new IllegalStateException("Missing blockState for " + material); }