Skip to content

Commit

Permalink
minor changes to bayou
Browse files Browse the repository at this point in the history
  • Loading branch information
supermassimo committed Jun 28, 2021
1 parent a6cafa1 commit fe85f32
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
11 changes: 8 additions & 3 deletions src/main/java/therealeststu/dtbop/trees/CypressSpecies.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.ferreusveritas.dynamictrees.blocks.branches.BranchBlock;
import com.ferreusveritas.dynamictrees.blocks.leaves.LeavesProperties;
import com.ferreusveritas.dynamictrees.blocks.rootyblocks.RootyBlock;
import com.ferreusveritas.dynamictrees.systems.DirtHelper;
import com.ferreusveritas.dynamictrees.systems.GrowSignal;
import com.ferreusveritas.dynamictrees.systems.RootyBlockHelper;
import com.ferreusveritas.dynamictrees.trees.Family;
Expand Down Expand Up @@ -47,7 +48,7 @@ public boolean isAcceptableSoilForWorldgen(IWorld world, BlockPos pos, BlockStat
final BlockPos down = pos.below(i);
final BlockState downState = world.getBlockState(down);

if (!isWater(downState) && this.isAcceptableSoil(world, down, downState))
if (!isWater(downState) && isAcceptableSoilUnderWater(downState))
return true;
}
return false;
Expand All @@ -65,15 +66,19 @@ public BlockPos preGeneration(IWorld world, BlockPos rootPosition, int radius, D
final BlockPos down = rootPosition.below(i);
final BlockState downState = world.getBlockState(down);

if (!isWater(downState) && this.isAcceptableSoil(world, down, downState))
if (!isWater(downState) && isAcceptableSoilUnderWater(downState))
break;
}
root = root.below(i);
}
return super.preGeneration(world, root, radius, facing, safeBounds, joCode);
}

// @Override
public boolean isAcceptableSoilUnderWater(BlockState soilBlockState) {
return DirtHelper.isSoilAcceptable(soilBlockState.getBlock(), this.soilTypeFlags | DirtHelper.getSoilFlags("sand_like", "mud_like"));
}

// @Override
// public boolean placeRootyDirtBlock(IWorld world, BlockPos rootPos, int fertility) {
// if (this.isWater(world.getBlockState(rootPos)))
// return world.setBlock(rootPos, (DTBOPRegistries.largeRootyWater.defaultBlockState().setValue(RootyBlock.FERTILITY, fertility)).setValue(RootyBlock.IS_VARIANT, this.doesRequireTileEntity(world, rootPos)), 3);
Expand Down
19 changes: 10 additions & 9 deletions src/main/resources/trees/dtbop/world_gen/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"dtbop:jungle_twiglet" : 1
}
},
"density": [ 5 ],
"density": [ 5.0 ],
"chance": 1.0,
"forestness" : 0.5
}
Expand All @@ -48,7 +48,7 @@
"dtbop:short_jungle" : 1
}
},
"density": 2.0,
"density": 1.0,
"chance": 1.0,
"forestness" : 1.0
}
Expand All @@ -63,7 +63,7 @@
"dtbop:oak_bush" : 2
}
},
"density": 4.0,
"density": 1.0,
"chance": 1.0,
"forestness" : 1.0
}
Expand Down Expand Up @@ -121,7 +121,7 @@
"spruce" : 1
}
},
"density": 4.0,
"density": 1.0,
"chance": 1.0
}
},
Expand Down Expand Up @@ -275,7 +275,7 @@
"dtbop:spruce_twiglet" : 1
}
},
"density": 4.0,
"density": 1.0,
"chance": 1.0
}
},
Expand Down Expand Up @@ -346,7 +346,7 @@
{
"select": { "name": "biomesoplenty:shrubland_hills" },
"apply": {
"density": 2.0,
"density": 1.0,
"chance": 1.0
}
},
Expand All @@ -373,7 +373,7 @@
"dtbop:oak_bush" : 1
}
},
"density": 3.0,
"density": 1.0,
"chance": 1.0,
"forestness" : 1.0
}
Expand Down Expand Up @@ -555,10 +555,10 @@
}
},
{
"select": { "name": "biomesoplenty:.*bayou" },
"select": { "name": "biomesoplenty:bayou" },
"apply": {
"species" : "dtbop:cypress_willow",
"density": 1.0,
"density": 0.6,
"chance": 0.4
}
},
Expand All @@ -571,6 +571,7 @@
"dtbop:oak_bush" : 1
}
},
"density": 1.0,
"chance": 1.0
}
},
Expand Down

0 comments on commit fe85f32

Please sign in to comment.