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 quartz fixtures not being placeable on wall blocks #6624

Merged
merged 1 commit into from
Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/main/java/appeng/block/misc/LightDetectorBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,8 @@ public boolean isValidOrientation(LevelAccessor level, BlockPos pos, Direction f
return this.canPlaceAt(level, pos, up.getOpposite());
}

private boolean canPlaceAt(BlockGetter level, BlockPos pos, Direction dir) {
final BlockPos test = pos.relative(dir);
BlockState blockstate = level.getBlockState(test);
return blockstate.isFaceSturdy(level, test, dir.getOpposite());
private boolean canPlaceAt(LevelReader level, BlockPos pos, Direction dir) {
return canSupportCenter(level, pos.relative(dir), dir.getOpposite());
}

@Override
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/appeng/block/misc/QuartzFixtureBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ public boolean isValidOrientation(LevelAccessor level, BlockPos pos, Direction f
}

private boolean canPlaceAt(LevelReader level, BlockPos pos, Direction dir) {
final BlockPos test = pos.relative(dir);
BlockState blockstate = level.getBlockState(test);
return blockstate.isFaceSturdy(level, test, dir.getOpposite());
return canSupportCenter(level, pos.relative(dir), dir.getOpposite());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ protected void addTags() {
AEBlocks.CHISELED_QUARTZ_WALL.block(),
AEBlocks.QUARTZ_PILLAR_WALL.block());

// Fixtures should cause walls to have posts
tag(BlockTags.WALL_POST_OVERRIDE).add(AEBlocks.QUARTZ_FIXTURE.block(), AEBlocks.LIGHT_DETECTOR.block());

addEffectiveTools();

addConventionTags();
Expand Down