From 4d4db7dcd0c2ce99d59c32072247f0fc61fd27f6 Mon Sep 17 00:00:00 2001 From: SirYwell Date: Fri, 16 Jul 2021 17:52:44 +0200 Subject: [PATCH] Make sure leaves category is loaded for heightmaps (fixes #1176) --- .../core/beta/implementation/lighting/HeightMapType.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/beta/implementation/lighting/HeightMapType.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/beta/implementation/lighting/HeightMapType.java index fba5155b6..75de71f59 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/beta/implementation/lighting/HeightMapType.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/beta/implementation/lighting/HeightMapType.java @@ -39,6 +39,10 @@ public enum HeightMapType { } }; + static { + BlockCategories.LEAVES.getAll(); // make sure this category is initialized, otherwise isLeaf might fail + } + private static boolean isLeaf(BlockState state) { return BlockCategories.LEAVES.contains(state); }