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) {
|
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()));
|
center.setY(world.getHeight(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, center.getX(), center.getZ()));
|
||||||
|
|
||||||
|
// don't replace solid blocks
|
||||||
if (BlockUtils.isSolid(world, center)) {
|
if (BlockUtils.isSolid(world, center)) {
|
||||||
return false;
|
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);
|
world.setBlockState(center, config.trunk, 2);
|
||||||
|
|
||||||
for (Vec3i neighbour : leaves) {
|
for (Vec3i neighbour : leaves) {
|
||||||
|
|
|
@ -2,12 +2,8 @@
|
||||||
"biomes": [
|
"biomes": [
|
||||||
"terraforged:cold_steppe"
|
"terraforged:cold_steppe"
|
||||||
],
|
],
|
||||||
"match": [
|
"stage": "VEGETAL_DECORATION",
|
||||||
[
|
"prepend": {
|
||||||
"minecraft:grass"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"before": {
|
|
||||||
"name": "minecraft:decorated",
|
"name": "minecraft:decorated",
|
||||||
"config": {
|
"config": {
|
||||||
"feature": {
|
"feature": {
|
||||||
|
|
|
@ -4,12 +4,8 @@
|
||||||
"terraforged:savanna_scrub",
|
"terraforged:savanna_scrub",
|
||||||
"terraforged:shattered_savanna_scrub"
|
"terraforged:shattered_savanna_scrub"
|
||||||
],
|
],
|
||||||
"match": [
|
"stage": "VEGETAL_DECORATION",
|
||||||
[
|
"prepend": {
|
||||||
"minecraft:grass"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"before": {
|
|
||||||
"name": "minecraft:decorated",
|
"name": "minecraft:decorated",
|
||||||
"config": {
|
"config": {
|
||||||
"feature": {
|
"feature": {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"biomes": [
|
"biomes": [
|
||||||
"terraforged:taiga_scrub"
|
"minecraft:snowy_tundra",
|
||||||
|
"minecraft:taiga",
|
||||||
|
"minecraft:taiga_hills",
|
||||||
|
"terraforged:taiga_scrub",
|
||||||
|
"terraforged:snowy_taiga_scrub"
|
||||||
],
|
],
|
||||||
"match": [
|
"stage": "VEGETAL_DECORATION",
|
||||||
[
|
"prepend": {
|
||||||
"minecraft:grass"
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"before": {
|
|
||||||
"name": "minecraft:decorated",
|
"name": "minecraft:decorated",
|
||||||
"config": {
|
"config": {
|
||||||
"feature": {
|
"feature": {
|
||||||
|
|
Loading…
Reference in New Issue