Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix checks for altar structure #2008

Open
wants to merge 1 commit into
base: 1.20.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/wayoftime/bloodmagic/altar/AltarUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlockState> validStates = BloodMagicAPI.INSTANCE.getComponentStates(component.getComponent());
Expand Down Expand Up @@ -78,7 +78,7 @@ public static Pair<BlockPos, ComponentType> 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<BlockState> validStates = BloodMagicAPI.INSTANCE.getComponentStates(component.getComponent());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down