Update to BCLib 0.3.0

This commit is contained in:
paulevsGitch 2021-07-20 00:39:58 +03:00
parent 1a52251af0
commit b2431153dc
294 changed files with 7484 additions and 1440 deletions

View file

@ -28,15 +28,24 @@ public class ChorusPlantFeatureMixin {
final Random random = featureConfig.random();
final BlockPos blockPos = featureConfig.origin();
final WorldGenLevel structureWorldAccess = featureConfig.level();
if (structureWorldAccess.isEmptyBlock(blockPos) && structureWorldAccess.getBlockState(blockPos.below()).is(EndBlocks.CHORUS_NYLIUM)) {
if (structureWorldAccess.isEmptyBlock(blockPos) && structureWorldAccess.getBlockState(blockPos.below())
.is(EndBlocks.CHORUS_NYLIUM)) {
ChorusFlowerBlock.generatePlant(structureWorldAccess, blockPos, random, MHelper.randRange(8, 16, random));
BlockState bottom = structureWorldAccess.getBlockState(blockPos);
if (bottom.is(Blocks.CHORUS_PLANT)) {
if ((GeneratorOptions.changeChorusPlant())) {
BlocksHelper.setWithoutUpdate(structureWorldAccess, blockPos, bottom.setValue(VanillaBlockProperties.ROOTS, true).setValue(PipeBlock.DOWN, true));
BlocksHelper.setWithoutUpdate(
structureWorldAccess,
blockPos,
bottom.setValue(VanillaBlockProperties.ROOTS, true).setValue(PipeBlock.DOWN, true)
);
}
else {
BlocksHelper.setWithoutUpdate(structureWorldAccess, blockPos, bottom.setValue(PipeBlock.DOWN, true));
BlocksHelper.setWithoutUpdate(
structureWorldAccess,
blockPos,
bottom.setValue(PipeBlock.DOWN, true)
);
}
}
info.setReturnValue(true);