Fixed melons/pumpkins growing on BOP soils, changed density of trees in Ominous Woods, added large oak trees to Mystic Grove

This commit is contained in:
Forstride 2016-08-08 13:14:31 -04:00
parent df0bb97252
commit 14105a4645
4 changed files with 22 additions and 31 deletions

View file

@ -52,7 +52,7 @@ public class BiomeGenMysticGrove extends BOPBiome
super("mystic_grove", new PropsBuilder("Mystic Grove").withGuiColour(0x69CFDB).withTemperature(0.6F).withRainfall(0.8F).withWaterColor(0xFF107A)); super("mystic_grove", new PropsBuilder("Mystic Grove").withGuiColour(0x69CFDB).withTemperature(0.6F).withRainfall(0.8F).withWaterColor(0xFF107A));
// terrain // terrain
this.terrainSettings.avgHeight(63).heightVariation(5, 25); this.terrainSettings.avgHeight(63).heightVariation(5, 20);
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SILTY); this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SILTY);
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY); this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY);
@ -84,10 +84,11 @@ public class BiomeGenMysticGrove extends BOPBiome
// trees & logs // trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(10); GeneratorWeighted treeGenerator = new GeneratorWeighted(10);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("flowering_vine", 2, (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("flowering_vine", 8, (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", 9, (new GeneratorBasicTree.Builder()).log(BOPWoods.MAGIC).leaves(BOPTrees.MAGIC).create()); treeGenerator.add("magic", 15, (new GeneratorBasicTree.Builder()).log(BOPWoods.MAGIC).leaves(BOPTrees.MAGIC).create());
treeGenerator.add("jacaranda", 1, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).log(BOPWoods.JACARANDA).leaves(BOPTrees.JACARANDA).create()); treeGenerator.add("jacaranda", 7, (new GeneratorBasicTree.Builder()).minHeight(4).maxHeight(7).log(BOPWoods.JACARANDA).leaves(BOPTrees.JACARANDA).create());
treeGenerator.add("oak_large", 3, (new GeneratorBigTree.Builder()).altLeaves(BOPTrees.FLOWERING).create()); treeGenerator.add("oak_large", 9, (new GeneratorBigTree.Builder()).altLeaves(BOPTrees.FLOWERING).create());
treeGenerator.add("oak_huge", 1, (new GeneratorBigTree.Builder()).minHeight(20).maxHeight(25).altLeaves(BOPTrees.FLOWERING).create());
// grasses // grasses
GeneratorWeighted grassGenerator = new GeneratorWeighted(3.0F); GeneratorWeighted grassGenerator = new GeneratorWeighted(3.0F);

View file

@ -44,7 +44,7 @@ public class BiomeGenOminousWoods extends BOPBiome
super("ominous_woods", new PropsBuilder("Ominous Woods").withGuiColour(0x3F4151).withTemperature(0.45F).withRainfall(0.6F).withWaterColor(0x1E1B26)); super("ominous_woods", new PropsBuilder("Ominous Woods").withGuiColour(0x3F4151).withTemperature(0.45F).withRainfall(0.6F).withWaterColor(0x1E1B26));
// terrain // terrain
this.terrainSettings.avgHeight(70).heightVariation(5, 25); this.terrainSettings.avgHeight(68).heightVariation(5, 15);
this.skyColor = 0x34333D; this.skyColor = 0x34333D;
@ -66,7 +66,7 @@ public class BiomeGenOminousWoods extends BOPBiome
this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create()); this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.1F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create());
// trees & logs // trees & logs
GeneratorWeighted treeGenerator = new GeneratorWeighted(9); GeneratorWeighted treeGenerator = new GeneratorWeighted(12);
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator); this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
treeGenerator.add("umbran_moss", 4, (new GeneratorBasicTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).minHeight(8).maxHeight(12).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.UMBRAN).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).maxLeavesRadius(2).vine(BOPBlocks.tree_moss.getDefaultState()).create()); treeGenerator.add("umbran_moss", 4, (new GeneratorBasicTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).minHeight(8).maxHeight(12).leaves(BlockBOPLeaves.paging.getVariantState(BOPTrees.UMBRAN).withProperty(BlockOldLeaf.CHECK_DECAY, Boolean.valueOf(false))).maxLeavesRadius(2).vine(BOPBlocks.tree_moss.getDefaultState()).create());
treeGenerator.add("umbran_spruce", 5, (new GeneratorTaigaTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).maxHeight(20).create()); // TODO: implement pine cones treeGenerator.add("umbran_spruce", 5, (new GeneratorTaigaTree.Builder()).log(BOPWoods.UMBRAN).leaves(BOPTrees.UMBRAN).maxHeight(20).create()); // TODO: implement pine cones

View file

@ -163,6 +163,11 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla
@Override @Override
public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable) public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable)
{ {
if (plantable == Blocks.MELON_STEM || plantable == Blocks.PUMPKIN_STEM)
{
return true;
}
return this.canSustainPlantType(world, pos, plantable.getPlantType(world, pos)); return this.canSustainPlantType(world, pos, plantable.getPlantType(world, pos));
} }
@ -188,19 +193,6 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla
IBlockState state = this.getStateFromMeta(meta); IBlockState state = this.getStateFromMeta(meta);
switch ((BOPGrassType) state.getValue(VARIANT)) switch ((BOPGrassType) state.getValue(VARIANT))
{ {
// spectral moss makes a hideous noise and throws a big fuss of particles around when placed in the nether
case SPECTRAL_MOSS:
if (world.provider instanceof net.minecraft.world.WorldProviderHell)
{
//TODO: 1.9 world.playSound(pos.getX(), pos.getY(), pos.getZ(), "mob.ghast.death", 20.0F, (float)Math.random() * 0.1F, true);
for (int l = 0; l < 8; ++l)
{
world.spawnParticle(EnumParticleTypes.FLAME, (double)pos.getX() + Math.random(), (double)pos.getY() + 0.5D + Math.random(), (double)pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D);
world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, (double)pos.getX() + Math.random(), (double)pos.getY() + 0.5D + Math.random(), (double)pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D);
}
}
break;
default: default:
break; break;
} }
@ -237,15 +229,6 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla
public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) { public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) {
switch ((BOPGrassType) state.getValue(VARIANT)) switch ((BOPGrassType) state.getValue(VARIANT))
{ {
case SPECTRAL_MOSS:
// spectral moss in the nether catches on fire and turns to smoldering grass
if (world.provider instanceof net.minecraft.world.WorldProviderHell)
{
world.setBlockState(pos.up(), Blocks.FIRE.getDefaultState()); // might need to set fire AGE value... not sure
world.setBlockState(pos, this.getDefaultState().withProperty(VARIANT, BOPGrassType.SMOLDERING));
}
break;
case SMOLDERING: case SMOLDERING:
// smoldering grass melts snow // smoldering grass melts snow
IBlockState stateAbove = world.getBlockState(pos.up()); IBlockState stateAbove = world.getBlockState(pos.up());
@ -260,7 +243,7 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla
} }
switch ((BOPGrassType) state.getValue(VARIANT)) switch ((BOPGrassType) state.getValue(VARIANT))
{ {
case SMOLDERING: case SMOLDERING: case SPECTRAL_MOSS: case OVERGROWN_NETHERRACK:
// smoldering grass doesn't spread to nearby dirt // smoldering grass doesn't spread to nearby dirt
break; break;

View file

@ -19,6 +19,7 @@ import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemBlock;
import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IStringSerializable; import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -127,6 +128,12 @@ public class BlockBOPTerrarium extends Block implements IBOPBlock
return false; return false;
} }
@Override
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
{
return worldIn.getBlockState(pos).getBlock().isReplaceable(worldIn, pos) && worldIn.getBlockState(pos.down()).isSideSolid(worldIn, pos, EnumFacing.UP);
}
@Override @Override
public BlockRenderLayer getBlockLayer() public BlockRenderLayer getBlockLayer()
{ {