Removed color provider
This commit is contained in:
parent
2c8862a37b
commit
4040597a6d
475 changed files with 5411 additions and 7521 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue