Redesigned Steppe biome

This commit is contained in:
Forstride 2019-05-02 23:16:18 -04:00
parent b644b75920
commit 5266a2c112
3 changed files with 8 additions and 41 deletions

View file

@ -13,13 +13,12 @@ import biomesoplenty.api.block.BOPBlocks;
import biomesoplenty.api.enums.BOPClimates; import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.common.biome.BiomeBOP; import biomesoplenty.common.biome.BiomeBOP;
import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures; import biomesoplenty.common.world.gen.feature.BOPBiomeFeatures;
import biomesoplenty.common.world.gen.feature.ShortGrassFeature; import biomesoplenty.common.world.gen.feature.StandardGrassFeature;
import net.minecraft.block.state.pattern.BlockMatcher; import net.minecraft.block.state.pattern.BlockMatcher;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.EnumCreatureType;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Fluids; import net.minecraft.init.Fluids;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.BushConfig; import net.minecraft.world.gen.feature.BushConfig;
@ -42,14 +41,12 @@ import net.minecraft.world.gen.placement.FrequencyConfig;
import net.minecraft.world.gen.placement.IPlacementConfig; import net.minecraft.world.gen.placement.IPlacementConfig;
import net.minecraft.world.gen.placement.LakeChanceConfig; import net.minecraft.world.gen.placement.LakeChanceConfig;
import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder; import net.minecraft.world.gen.surfacebuilders.CompositeSurfaceBuilder;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class SteppeBiome extends BiomeBOP public class SteppeBiome extends BiomeBOP
{ {
public SteppeBiome() public SteppeBiome()
{ {
super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, BOPBiomeFeatures.SANDY_GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(1.2F).scale(0.2F).temperature(0.75F).downfall(0.1F).waterColor(4159204).waterFogColor(329011).parent((String)null)); super((new Biome.BiomeBuilder()).surfaceBuilder(new CompositeSurfaceBuilder(DEFAULT_SURFACE_BUILDER, BOPBiomeFeatures.SANDY_GRASS_DIRT_GRAVEL_SURFACE)).precipitation(Biome.RainType.RAIN).category(Biome.Category.PLAINS).depth(1.5F).scale(0.3F).temperature(0.75F).downfall(0.1F).waterColor(4159204).waterFogColor(329011).parent((String)null));
// Mineshafts and Strongholds // Mineshafts and Strongholds
this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL)); this.addStructure(Feature.MINESHAFT, new MineshaftConfig(0.004D, MineshaftStructure.Type.NORMAL));
@ -85,9 +82,9 @@ public class SteppeBiome extends BiomeBOP
this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.INFESTED_STONE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(7, 0, 0, 64))); this.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, createCompositeFeature(Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, Blocks.INFESTED_STONE.getDefaultState(), 9), COUNT_RANGE, new CountRangeConfig(7, 0, 0, 64)));
// Vegetation // Vegetation
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new ShortGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(8))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(new StandardGrassFeature(), IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(10)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.desert_grass), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(5))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.desert_grass), TWICE_SURFACE, new FrequencyConfig(12)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(Blocks.DEAD_BUSH), TWICE_SURFACE_WITH_CHANCE, new ChanceConfig(1))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.BUSH, new BushConfig(BOPBlocks.barley), TWICE_SURFACE, new FrequencyConfig(3)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.WATER), HEIGHT_BIASED_RANGE, new CountRangeConfig(50, 8, 8, 256)));
this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256))); this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.LIQUIDS, new LiquidsConfig(Fluids.LAVA), HEIGHT_VERY_BIASED_RANGE, new CountRangeConfig(20, 8, 16, 256)));
this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG)); this.addFeature(GenerationStage.Decoration.TOP_LAYER_MODIFICATION, createCompositeFeature(Feature.ICE_AND_SNOW, IFeatureConfig.NO_FEATURE_CONFIG, PASSTHROUGH, IPlacementConfig.NO_PLACEMENT_CONFIG));
@ -113,16 +110,4 @@ public class SteppeBiome extends BiomeBOP
this.addWeight(BOPClimates.DRY_TEMPERATE, 7); this.addWeight(BOPClimates.DRY_TEMPERATE, 7);
} }
@OnlyIn(Dist.CLIENT)
public int getGrassColor(BlockPos pos)
{
return 0xD1AD6A;
}
@OnlyIn(Dist.CLIENT)
public int getFoliageColor(BlockPos pos)
{
return 0xD1AD6A;
}
} }

View file

@ -30,7 +30,7 @@ public class BlockDriedSand extends Block
case Nether: return true; case Nether: return true;
case Crop: return false; case Crop: return false;
case Cave: return true; case Cave: return true;
case Plains: return false; case Plains: return true;
case Water: return false; case Water: return false;
case Beach: return false; case Beach: return false;
} }

View file

@ -23,11 +23,12 @@ import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.EnumPlantType; import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random; import java.util.Random;
public class BlockFoliageBOP extends BlockBush public class BlockFoliageBOP extends BlockBush implements IPlantable
{ {
protected static final VoxelShape NORMAL = Block.makeCuboidShape(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D); protected static final VoxelShape NORMAL = Block.makeCuboidShape(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);
protected static final VoxelShape SHORT = Block.makeCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 7.0D, 15.0D); protected static final VoxelShape SHORT = Block.makeCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 7.0D, 15.0D);
@ -107,25 +108,6 @@ public class BlockFoliageBOP extends BlockBush
@Override @Override
public EnumPlantType getPlantType(IBlockReader world, BlockPos pos) public EnumPlantType getPlantType(IBlockReader world, BlockPos pos)
{ {
Block block = world.getBlockState(pos).getBlock();
if (block == BOPBlocks.dead_grass)
{
return EnumPlantType.Desert;
}
if (block == BOPBlocks.desert_grass)
{
return EnumPlantType.Desert;
}
if (block == BOPBlocks.dune_grass)
{
return EnumPlantType.Desert;
}
if (block == BOPBlocks.devilweed)
{
return EnumPlantType.Nether;
}
return EnumPlantType.Plains; return EnumPlantType.Plains;
} }
} }