From a576a880f70c8af2dc6b5a4ff4c2778dc8ab85cd Mon Sep 17 00:00:00 2001 From: mystchonky Date: Fri, 10 Nov 2023 00:45:30 +0530 Subject: [PATCH] fix checks for altar structure --- src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java | 4 ++-- .../compat/patchouli/RegisterPatchouliMultiblocks.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java b/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java index 7866fb39c..cd264e6ab 100644 --- a/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java +++ b/src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java @@ -33,7 +33,7 @@ public static AltarTier getTier(Level world, BlockPos pos) BlockPos componentPos = pos.offset(component.getOffset()); BlockState worldState = world.getBlockState(componentPos); - if (component.getComponent() == ComponentType.NOTAIR && worldState.isSolid()) + if (component.getComponent() == ComponentType.NOTAIR && !worldState.isAir() && !worldState.liquid()) continue; List validStates = BloodMagicAPI.INSTANCE.getComponentStates(component.getComponent()); @@ -78,7 +78,7 @@ public static Pair getFirstMissingComponent(Level world { BlockPos componentPos = pos.offset(component.getOffset()); BlockState worldState = world.getBlockState(componentPos); - if (component.getComponent() == ComponentType.NOTAIR && worldState.isSolid()) + if (component.getComponent() == ComponentType.NOTAIR && !worldState.isAir() && !worldState.liquid()) continue; List validStates = BloodMagicAPI.INSTANCE.getComponentStates(component.getComponent()); diff --git a/src/main/java/wayoftime/bloodmagic/compat/patchouli/RegisterPatchouliMultiblocks.java b/src/main/java/wayoftime/bloodmagic/compat/patchouli/RegisterPatchouliMultiblocks.java index db84eb29b..584583a90 100644 --- a/src/main/java/wayoftime/bloodmagic/compat/patchouli/RegisterPatchouliMultiblocks.java +++ b/src/main/java/wayoftime/bloodmagic/compat/patchouli/RegisterPatchouliMultiblocks.java @@ -116,7 +116,7 @@ public RegisterPatchouliMultiblocks() BMStateMatcher bloodRuneSM = new BMStateMatcher(bmAPI.getComponentStates(ComponentType.BLOODRUNE)); BMStateMatcher blankBloodRuneSM = new BMStateMatcher(BloodMagicBlocks.BLANK_RUNE.get(), bmAPI.getComponentStates(ComponentType.BLOODRUNE)); - IStateMatcher notAirSM = patAPI.predicateMatcher(Blocks.STONE_BRICKS, state -> state.isSolid()); + IStateMatcher notAirSM = patAPI.predicateMatcher(Blocks.STONE_BRICKS, state -> !state.isAir() && !state.liquid()); BMStateMatcher glowstoneSM = new BMStateMatcher(bmAPI.getComponentStates(ComponentType.GLOWSTONE)); BMStateMatcher bloodStoneSM = new BMStateMatcher(bmAPI.getComponentStates(ComponentType.BLOODSTONE)); BMStateMatcher beaconSM = new BMStateMatcher(bmAPI.getComponentStates(ComponentType.BEACON));