From 983305bb4a8601367e31f44b691f6e598bde9d0c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 27 Jun 2020 17:18:34 +1000 Subject: [PATCH] SPIGOT-5856: Soul Campfire BlockState cannot be cast to Campfire --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 1 + .../org/bukkit/craftbukkit/inventory/CraftItemFactory.java | 1 + .../java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | 1 + .../org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java | 3 +++ 4 files changed, 6 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 1d75200e73..606a89a905 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -453,6 +453,7 @@ public class CraftBlock implements Block { case BLAST_FURNACE: return new CraftBlastFurnace(this); case CAMPFIRE: + case SOUL_CAMPFIRE: return new CraftCampfire(this); case JIGSAW: return new CraftJigsaw(this); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java index c55c7d765d..97a58900ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java @@ -246,6 +246,7 @@ public final class CraftItemFactory implements ItemFactory { case BELL: case BLAST_FURNACE: case CAMPFIRE: + case SOUL_CAMPFIRE: case JIGSAW: case LECTERN: case SMOKER: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index 993fae70fe..6a797a0ac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -515,6 +515,7 @@ public final class CraftItemStack extends ItemStack { case BELL: case BLAST_FURNACE: case CAMPFIRE: + case SOUL_CAMPFIRE: case JIGSAW: case LECTERN: case SMOKER: diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index c8c451b461..a2100aa6e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -241,6 +241,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta case BELL: case BLAST_FURNACE: case CAMPFIRE: + case SOUL_CAMPFIRE: case JIGSAW: case LECTERN: case SMOKER: @@ -497,6 +498,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta } return new CraftBlastFurnace(material, (TileEntityBlastFurnace) te); case CAMPFIRE: + case SOUL_CAMPFIRE: if (te == null) { te = new TileEntityCampfire(); } @@ -680,6 +682,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta valid = blockState instanceof CraftBlastFurnace; break; case CAMPFIRE: + case SOUL_CAMPFIRE: valid = blockState instanceof CraftCampfire; break; case JIGSAW: