added feature appender/prepender for simple adds
This commit is contained in:
parent
0423925e17
commit
ef0fbb7c7f
@ -69,10 +69,18 @@ public class BushFeature extends Feature<BushFeature.Config> {
|
||||
private boolean place(IWorld world, BlockPos.Mutable center, BlockPos.Mutable pos, Random random, Config config) {
|
||||
center.setY(world.getHeight(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, center.getX(), center.getZ()));
|
||||
|
||||
// don't replace solid blocks
|
||||
if (BlockUtils.isSolid(world, center)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// only place on solid blocks
|
||||
center.move(Direction.DOWN, 1);
|
||||
if (!BlockUtils.isSolid(world, center)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
center.move(Direction.UP, 1);
|
||||
world.setBlockState(center, config.trunk, 2);
|
||||
|
||||
for (Vec3i neighbour : leaves) {
|
||||
|
@ -2,12 +2,8 @@
|
||||
"biomes": [
|
||||
"terraforged:cold_steppe"
|
||||
],
|
||||
"match": [
|
||||
[
|
||||
"minecraft:grass"
|
||||
]
|
||||
],
|
||||
"before": {
|
||||
"stage": "VEGETAL_DECORATION",
|
||||
"prepend": {
|
||||
"name": "minecraft:decorated",
|
||||
"config": {
|
||||
"feature": {
|
||||
|
@ -4,12 +4,8 @@
|
||||
"terraforged:savanna_scrub",
|
||||
"terraforged:shattered_savanna_scrub"
|
||||
],
|
||||
"match": [
|
||||
[
|
||||
"minecraft:grass"
|
||||
]
|
||||
],
|
||||
"before": {
|
||||
"stage": "VEGETAL_DECORATION",
|
||||
"prepend": {
|
||||
"name": "minecraft:decorated",
|
||||
"config": {
|
||||
"feature": {
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"biomes": [
|
||||
"terraforged:taiga_scrub"
|
||||
"minecraft:snowy_tundra",
|
||||
"minecraft:taiga",
|
||||
"minecraft:taiga_hills",
|
||||
"terraforged:taiga_scrub",
|
||||
"terraforged:snowy_taiga_scrub"
|
||||
],
|
||||
"match": [
|
||||
[
|
||||
"minecraft:grass"
|
||||
]
|
||||
],
|
||||
"before": {
|
||||
"stage": "VEGETAL_DECORATION",
|
||||
"prepend": {
|
||||
"name": "minecraft:decorated",
|
||||
"config": {
|
||||
"feature": {
|
||||
|
Loading…
Reference in New Issue
Block a user