From 37f22f248f2ef68c1950f0cba2b5789f1ac8aeda Mon Sep 17 00:00:00 2001 From: Sn0wStorm Date: Thu, 15 Aug 2019 18:30:22 +0200 Subject: [PATCH] Fix Campfire detection on older versions Previous Commit was "Added campfire as fire source for cauldrons" --- src/com/dre/brewery/LegacyUtil.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/com/dre/brewery/LegacyUtil.java b/src/com/dre/brewery/LegacyUtil.java index 2d4bfd1..adb2bfe 100644 --- a/src/com/dre/brewery/LegacyUtil.java +++ b/src/com/dre/brewery/LegacyUtil.java @@ -55,7 +55,8 @@ public class LegacyUtil { FENCES = fences; } - public static final Material MAGMA = get("MAGMA_BLOCK", "MAGMA"); + public static final Material MAGMA_BLOCK = get("MAGMA_BLOCK", "MAGMA"); + public static final Material CAMPFIRE = get("CAMPFIRE"); public static final Material CLOCK = get("CLOCK", "WATCH"); public static final Material OAK_STAIRS = get("OAK_STAIRS", "WOOD_STAIRS"); public static final Material SPRUCE_STAIRS = get("SPRUCE_STAIRS", "SPRUCE_WOOD_STAIRS"); @@ -105,14 +106,12 @@ public class LegacyUtil { } public static boolean isFireForCauldron(Material type) { - return type == Material.FIRE - || type == Material.CAMPFIRE - || LegacyUtil.isLava(type); + return type != null && (type == Material.FIRE || type == CAMPFIRE || type == MAGMA_BLOCK || isLava(type)); } // LAVA and STATIONARY_LAVA are merged as of 1.13 public static boolean isLava(Material type) { - return type == Material.LAVA || (!P.use1_13 && type == STATIONARY_LAVA) || (MAGMA != null && type == MAGMA); + return type == Material.LAVA || (!P.use1_13 && type == STATIONARY_LAVA); } public static boolean areStairsInverted(Block block) {