From 8d856dd6db01e6789df605108229f28c37e7d1a9 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Sat, 18 Jun 2022 15:31:54 -0400 Subject: [PATCH] Fix paths and farmland not being solid (#4915) Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com> --- .../java/com/earth2me/essentials/utils/LocationUtil.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Essentials/src/main/java/com/earth2me/essentials/utils/LocationUtil.java b/Essentials/src/main/java/com/earth2me/essentials/utils/LocationUtil.java index 2d1dce809..729caac39 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/utils/LocationUtil.java +++ b/Essentials/src/main/java/com/earth2me/essentials/utils/LocationUtil.java @@ -31,6 +31,11 @@ public final class LocationUtil { "FLOWING_LAVA", "LAVA", "STATIONARY_LAVA"); private static final Material PORTAL = EnumUtil.getMaterial("NETHER_PORTAL", "PORTAL"); private static final Material LIGHT = EnumUtil.getMaterial("LIGHT"); + + private static final Material PATH = EnumUtil.getMaterial("GRASS_PATH"); + + private static final Material FARMLAND = EnumUtil.getMaterial("FARMLAND"); + // The player can stand inside these materials private static final Set HOLLOW_MATERIALS = EnumSet.noneOf(Material.class); private static final Set TRANSPARENT_MATERIALS = EnumSet.noneOf(Material.class); @@ -49,6 +54,10 @@ public final class LocationUtil { // Barrier is transparent, but solid HOLLOW_MATERIALS.remove(Material.BARRIER); + // Path and farmland are transparent, but solid + HOLLOW_MATERIALS.remove(PATH); + HOLLOW_MATERIALS.remove(FARMLAND); + // Light blocks can be passed through and are not considered transparent for some reason if (LIGHT != null) { HOLLOW_MATERIALS.add(LIGHT);