From f4ac860799b789d2211c6d54a25418a34bc19340 Mon Sep 17 00:00:00 2001 From: Oth3r Date: Tue, 6 Aug 2024 15:28:40 -0500 Subject: [PATCH] fix (!) blockstates not working properly --- src/main/java/one/oth3r/sit/file/CustomBlock.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/one/oth3r/sit/file/CustomBlock.java b/src/main/java/one/oth3r/sit/file/CustomBlock.java index 6167bed..203eac6 100644 --- a/src/main/java/one/oth3r/sit/file/CustomBlock.java +++ b/src/main/java/one/oth3r/sit/file/CustomBlock.java @@ -56,8 +56,11 @@ public class CustomBlock { // now check if the state is one of the acceptable states for (String state : blockStates) { - // if there is a NOT (!) blockstate, and it is contained in the block, return false - if (state.startsWith("!") && blockState.toString().contains(state.substring(1))) return false; + // if there is a NOT (!) blockstate + if (state.startsWith("!")) { + // if it is contained in the block, return false + if (blockState.toString().contains(state.substring(1))) return false; + } // else check if the blockstate matches, if not return false else if (!blockState.toString().contains(state)) return false; }