Fix Campfire detection on older versions

Previous Commit was "Added campfire as fire source for cauldrons"
This commit is contained in:
Sn0wStorm 2019-08-15 18:30:22 +02:00
parent d643982dd3
commit 37f22f248f

View File

@ -55,7 +55,8 @@ public class LegacyUtil {
FENCES = fences; 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 CLOCK = get("CLOCK", "WATCH");
public static final Material OAK_STAIRS = get("OAK_STAIRS", "WOOD_STAIRS"); public static final Material OAK_STAIRS = get("OAK_STAIRS", "WOOD_STAIRS");
public static final Material SPRUCE_STAIRS = get("SPRUCE_STAIRS", "SPRUCE_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) { public static boolean isFireForCauldron(Material type) {
return type == Material.FIRE return type != null && (type == Material.FIRE || type == CAMPFIRE || type == MAGMA_BLOCK || isLava(type));
|| type == Material.CAMPFIRE
|| LegacyUtil.isLava(type);
} }
// LAVA and STATIONARY_LAVA are merged as of 1.13 // LAVA and STATIONARY_LAVA are merged as of 1.13
public static boolean isLava(Material type) { 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) { public static boolean areStairsInverted(Block block) {