CrystalMossCover

This commit is contained in:
Frank 2022-06-24 14:17:10 +02:00
parent 84f9c7de9e
commit c6411dc237
3 changed files with 15 additions and 6 deletions

View file

@ -109,12 +109,21 @@ public class CrystalMountainPiece extends MountainPiece {
chunk.setBlockState(pos, Blocks.END_STONE.defaultBlockState(), false); chunk.setBlockState(pos, Blocks.END_STONE.defaultBlockState(), false);
} }
if (needSurroundCover && chunk.getBlockState(pos.above()).is(Blocks.AIR)) { if (needSurroundCover && chunk.getBlockState(pos.above()).is(Blocks.AIR)) {
chunk.setBlockState( BlockState coverState = EndBlocks.CRYSTAL_MOSS_COVER
pos.above(), .defaultBlockState();
EndBlocks.CRYSTAL_MOSS_COVER.defaultBlockState().setValue( BlockPos above = pos.above();
CrystalMossCoverBlock.getFaceProperty(Direction.DOWN), true), boolean didChange = false;
false for (Direction dir : Direction.values()) {
if (chunk.getBlockState(above.relative(dir)).is(CommonBlockTags.END_STONES)) {
coverState = coverState.setValue(
CrystalMossCoverBlock.getFaceProperty(dir),
true
); );
didChange = true;
}
}
if (didChange) chunk.setBlockState(above, coverState, false);
} }
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After