Fixed sand/gravel generation to not replace village farmland blocks, tweaked the Mystic Grove/Redwood Forest

This commit is contained in:
Forstride 2017-06-13 03:53:37 -04:00
parent 570954e7c6
commit 41cdbabdb5
5 changed files with 11 additions and 6 deletions

View File

@ -20,6 +20,7 @@ import biomesoplenty.api.enums.BOPWoods;
import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.entities.EntityButterfly;
import biomesoplenty.common.world.generator.GeneratorFlora;
import biomesoplenty.common.world.generator.GeneratorGrass;
@ -27,6 +28,7 @@ import biomesoplenty.common.world.generator.GeneratorOreSingle;
import biomesoplenty.common.world.generator.GeneratorWeighted;
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
import net.minecraft.block.BlockOldLeaf;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
@ -57,7 +59,7 @@ public class BiomeGenLavenderFields extends BOPOverworldBiome
GeneratorWeighted treeGenerator = new GeneratorWeighted(1);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("jacaranda", 3, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).log(BOPWoods.JACARANDA).leaves(BOPTrees.JACARANDA).create());
treeGenerator.add("oak", 1, (new GeneratorBigTree.Builder()).altLeaves(BOPTrees.FLOWERING).create());
treeGenerator.add("oak", 1, (new GeneratorBigTree.Builder()).altLeaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.FLOWERING).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(15);

View File

@ -22,6 +22,7 @@ import biomesoplenty.api.generation.GeneratorStage;
import biomesoplenty.common.block.BlockBOPCoral;
import biomesoplenty.common.block.BlockBOPDirt;
import biomesoplenty.common.block.BlockBOPGrass;
import biomesoplenty.common.block.BlockBOPLeaves;
import biomesoplenty.common.block.BlockBOPLilypad;
import biomesoplenty.common.block.BlockBOPMushroom;
import biomesoplenty.common.entities.EntityButterfly;
@ -90,8 +91,7 @@ public class BiomeGenMysticGrove extends BOPOverworldBiome
treeGenerator.add("flowering_vine", 10, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).maxLeavesRadius(2).leaves(Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).vine(BOPBlocks.flower_vine.getDefaultState()).create());
treeGenerator.add("magic", 17, (new GeneratorBasicTree.Builder()).log(BOPWoods.MAGIC).leaves(BOPTrees.MAGIC).create());
treeGenerator.add("jacaranda", 9, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).log(BOPWoods.JACARANDA).leaves(BOPTrees.JACARANDA).create());
treeGenerator.add("oak_large", 11, (new GeneratorBigTree.Builder()).altLeaves(BOPTrees.FLOWERING).create());
treeGenerator.add("oak_huge", 1, (new GeneratorBigTree.Builder()).minHeight(20).maxHeight(25).altLeaves(BOPTrees.FLOWERING).create());
treeGenerator.add("oak_large", 8, (new GeneratorBigTree.Builder()).altLeaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.FLOWERING).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.5F);

View File

@ -46,7 +46,9 @@ public class BiomeGenRedwoodForest extends BOPOverworldBiome
this.topBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL);
this.canSpawnInBiome = false;
this.canGenerateVillages = false;
this.canGenerateRivers = false;
this.addWeight(BOPClimates.WARM_TEMPERATE, 7);

View File

@ -57,7 +57,7 @@ public class BiomeGenSacredSprings extends BOPOverworldBiome
// trees
this.addGenerator("sacred_oak_trees", GeneratorStage.POST, (new GeneratorBigTree.Builder()).amountPerChunk(0.4F).log(BOPWoods.SACRED_OAK).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.SACRED_OAK).withProperty(BlockOldLeaf.DECAYABLE, Boolean.valueOf(false))).minHeight(35).maxHeight(40).trunkWidth(2).foliageDensity(2.0D).create());
this.addGenerator("leaves_clusters", GeneratorStage.TREE, (new GeneratorBush.Builder()).amountPerChunk(12.5F).maxHeight(2).create());
this.addGenerator("large_oak", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(3.0F).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).altLeaves(BOPTrees.FLOWERING).create());
this.addGenerator("large_oak", GeneratorStage.TREE, (new GeneratorBigTree.Builder()).amountPerChunk(3.0F).altLeaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.FLOWERING).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).create());
// grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.75F);

View File

@ -10,11 +10,12 @@ package biomesoplenty.common.world.generator;
import java.util.Random;
import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.block.BlockQueries;
import biomesoplenty.api.block.IBlockPosQuery;
import biomesoplenty.api.config.IConfigObj;
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
import biomesoplenty.common.util.block.BlockQuery.BlockQueryMaterial;
import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
@ -35,7 +36,7 @@ public class GeneratorWaterside extends GeneratorReplacing
// defaults
this.amountPerChunk = 1.0F;
this.placeOn = BlockQueries.anything;
this.replace = new BlockQueryMaterial(Material.GRASS, Material.GROUND);
this.replace = new BlockQueryBlock(Blocks.GRASS, Blocks.DIRT, BOPBlocks.grass, BOPBlocks.dirt);
this.with = Blocks.GRAVEL.getDefaultState();
this.scatterYMethod = ScatterYMethod.AT_GROUND;
this.maxRadius = 7;