From 338d924537ea154851e94c33cff1b82f21ba6a71 Mon Sep 17 00:00:00 2001 From: minecraft7771 Date: Thu, 16 Feb 2023 21:52:36 +0100 Subject: Fixed blacklisted blocks deleting entries from ModBlocks.blocks --- .../github/technus/tectech/thing/block/TileEyeOfHarmony.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java index 1907906750..655a531432 100644 --- a/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java +++ b/src/main/java/com/github/technus/tectech/thing/block/TileEyeOfHarmony.java @@ -111,14 +111,15 @@ public class TileEyeOfHarmony extends TileEntity { private static final Set BLACKLISTED_BLOCKS = Collections .unmodifiableSet(new HashSet<>(Arrays.asList("Tf", "Ow", "ED", "EA", "VA"))); // Map of strings to blocks - private static final Map BLOCKS; + private static final Map BLOCKS = new HashMap<>(); static { // Initialize the map of blocks - BLOCKS = ModBlocks.blocks; - - // Remove blacklisted blocks from the map - BLOCKS.keySet().removeAll(BLACKLISTED_BLOCKS); + ModBlocks.blocks.forEach((dimString, dimBlock) -> { + if (!BLACKLISTED_BLOCKS.contains(dimString)) { + BLOCKS.put(dimString, dimBlock); + } + }); } private static final float MAX_ANGLE = 30; -- cgit