Removed color provider

This commit is contained in:
paulevsGitch 2021-07-10 16:25:34 +03:00
parent 2c8862a37b
commit 4040597a6d
475 changed files with 5411 additions and 7521 deletions

View file

@ -19,7 +19,7 @@ import java.util.Random;
public class SilkMothNestFeature extends DefaultFeature {
private static final MutableBlockPos POS = new MutableBlockPos();
private boolean canGenerate(WorldGenLevel world, BlockPos pos) {
BlockState state = world.getBlockState(pos.above());
if (state.is(BlockTags.LEAVES) || state.is(BlockTags.LOGS)) {
@ -32,7 +32,7 @@ public class SilkMothNestFeature extends DefaultFeature {
}
return false;
}
@Override
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
final Random random = featureConfig.random();
@ -45,11 +45,9 @@ public class SilkMothNestFeature extends DefaultFeature {
POS.setY(y);
if (canGenerate(world, POS)) {
Direction dir = BlocksHelper.randomHorizontal(random);
BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.SILK_MOTH_NEST.defaultBlockState()
.setValue(BlockStateProperties.HORIZONTAL_FACING, dir).setValue(BlockProperties.ACTIVE, false));
BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.SILK_MOTH_NEST.defaultBlockState().setValue(BlockStateProperties.HORIZONTAL_FACING, dir).setValue(BlockProperties.ACTIVE, false));
POS.setY(y - 1);
BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.SILK_MOTH_NEST.defaultBlockState()
.setValue(BlockStateProperties.HORIZONTAL_FACING, dir));
BlocksHelper.setWithoutUpdate(world, POS, EndBlocks.SILK_MOTH_NEST.defaultBlockState().setValue(BlockStateProperties.HORIZONTAL_FACING, dir));
return true;
}
}