From 3f0c333870ba74705e98d19322174d6f0c10c900 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 25 Jun 2020 20:08:32 +1000 Subject: [PATCH] SPIGOT-5809: block.getState() wall signs too --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 2 ++ .../org/bukkit/craftbukkit/inventory/CraftItemFactory.java | 2 ++ .../org/bukkit/craftbukkit/inventory/CraftItemStack.java | 2 ++ .../bukkit/craftbukkit/inventory/CraftMetaBlockState.java | 6 ++++++ 4 files changed, 12 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 9b24274998..1d75200e73 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -316,6 +316,7 @@ public class CraftBlock implements Block { case BIRCH_SIGN: case BIRCH_WALL_SIGN: case CRIMSON_SIGN: + case CRIMSON_WALL_SIGN: case DARK_OAK_SIGN: case DARK_OAK_WALL_SIGN: case JUNGLE_SIGN: @@ -325,6 +326,7 @@ public class CraftBlock implements Block { case SPRUCE_SIGN: case SPRUCE_WALL_SIGN: case WARPED_SIGN: + case WARPED_WALL_SIGN: return new CraftSign(this); case CHEST: case TRAPPED_CHEST: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java index cf7d2230b1..c55c7d765d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -201,6 +201,7 @@ public final class CraftItemFactory implements ItemFactory { case BIRCH_SIGN: case BIRCH_WALL_SIGN: case CRIMSON_SIGN: + case CRIMSON_WALL_SIGN: case DARK_OAK_SIGN: case DARK_OAK_WALL_SIGN: case JUNGLE_SIGN: @@ -210,6 +211,7 @@ public final class CraftItemFactory implements ItemFactory { case SPRUCE_SIGN: case SPRUCE_WALL_SIGN: case WARPED_SIGN: + case WARPED_WALL_SIGN: case SPAWNER: case BREWING_STAND: case ENCHANTING_TABLE: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index 0ae4087d18..993fae70fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -470,6 +470,7 @@ public final class CraftItemStack extends ItemStack { case BIRCH_SIGN: case BIRCH_WALL_SIGN: case CRIMSON_SIGN: + case CRIMSON_WALL_SIGN: case DARK_OAK_SIGN: case DARK_OAK_WALL_SIGN: case JUNGLE_SIGN: @@ -479,6 +480,7 @@ public final class CraftItemStack extends ItemStack { case SPRUCE_SIGN: case SPRUCE_WALL_SIGN: case WARPED_SIGN: + case WARPED_WALL_SIGN: case SPAWNER: case BREWING_STAND: case ENCHANTING_TABLE: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index e71c44c59c..c8c451b461 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -196,6 +196,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case BIRCH_SIGN: case BIRCH_WALL_SIGN: case CRIMSON_SIGN: + case CRIMSON_WALL_SIGN: case DARK_OAK_SIGN: case DARK_OAK_WALL_SIGN: case JUNGLE_SIGN: @@ -205,6 +206,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case SPRUCE_SIGN: case SPRUCE_WALL_SIGN: case WARPED_SIGN: + case WARPED_WALL_SIGN: case SPAWNER: case BREWING_STAND: case ENCHANTING_TABLE: @@ -303,6 +305,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case BIRCH_SIGN: case BIRCH_WALL_SIGN: case CRIMSON_SIGN: + case CRIMSON_WALL_SIGN: case DARK_OAK_SIGN: case DARK_OAK_WALL_SIGN: case JUNGLE_SIGN: @@ -312,6 +315,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case SPRUCE_SIGN: case SPRUCE_WALL_SIGN: case WARPED_SIGN: + case WARPED_WALL_SIGN: if (te == null) { te = new TileEntitySign(); } @@ -534,6 +538,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case BIRCH_SIGN: case BIRCH_WALL_SIGN: case CRIMSON_SIGN: + case CRIMSON_WALL_SIGN: case DARK_OAK_SIGN: case DARK_OAK_WALL_SIGN: case JUNGLE_SIGN: @@ -543,6 +548,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case SPRUCE_SIGN: case SPRUCE_WALL_SIGN: case WARPED_SIGN: + case WARPED_WALL_SIGN: valid = blockState instanceof CraftSign; break; case CHEST: