Cured tree cancer. i.e. Fixed trees not generating in the Mystic grove
This commit is contained in:
parent
d54ad4acd6
commit
14148242ad
4 changed files with 31 additions and 31 deletions
|
@ -54,7 +54,7 @@ public class BlockMagicSapling extends BlockSapling
|
|||
{
|
||||
Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
|
||||
return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) &&
|
||||
(soil != null && soil.blockID == BOPBlocks.holyGrass.blockID);
|
||||
(soil != null && soil.blockID == BOPBlocks.holyGrass.blockID || soil.blockID == Block.grass.blockID || soil.blockID == Block.dirt.blockID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
package tdwp_ftw.biomesop.items;
|
||||
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public class ItemBOPSlab extends ItemSlab
|
||||
{
|
||||
private static Optional<BlockHalfSlab> singleSlab = Optional.absent();
|
||||
private static Optional<BlockHalfSlab> doubleSlab = Optional.absent();
|
||||
|
||||
static public void setSlabs(BlockHalfSlab singleSlab, BlockHalfSlab doubleSlab)
|
||||
{
|
||||
ItemBOPSlab.singleSlab = Optional.of(singleSlab);
|
||||
ItemBOPSlab.doubleSlab = Optional.of(doubleSlab);
|
||||
}
|
||||
|
||||
public ItemBOPSlab(int id) {
|
||||
super(id, singleSlab.get(), doubleSlab.get(), id == doubleSlab.get().blockID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
return itemStack.getItem().getUnlocalizedName();
|
||||
}
|
||||
}
|
||||
package tdwp_ftw.biomesop.items;
|
||||
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
public class ItemBOPSlab extends ItemSlab
|
||||
{
|
||||
private static Optional<BlockHalfSlab> singleSlab = Optional.absent();
|
||||
private static Optional<BlockHalfSlab> doubleSlab = Optional.absent();
|
||||
|
||||
static public void setSlabs(BlockHalfSlab singleSlab, BlockHalfSlab doubleSlab)
|
||||
{
|
||||
ItemBOPSlab.singleSlab = Optional.of(singleSlab);
|
||||
ItemBOPSlab.doubleSlab = Optional.of(doubleSlab);
|
||||
}
|
||||
|
||||
public ItemBOPSlab(int id) {
|
||||
super(id, singleSlab.get(), doubleSlab.get(), id == doubleSlab.get().blockID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
return itemStack.getItem().getUnlocalizedName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public class WorldGenMystic1 extends WorldGenerator
|
|||
{
|
||||
var11 = par1World.getBlockId(par3, par4 - 1, par5);
|
||||
|
||||
if ((var11 == BOPBlocks.holyGrass.blockID) && par4 < 256 - var6 - 1)
|
||||
if ((var11 == BOPBlocks.holyGrass.blockID || var11 == Block.grass.blockID || var11 == Block.dirt.blockID) && par4 < 256 - var6 - 1)
|
||||
{
|
||||
this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID);
|
||||
var21 = par2Random.nextInt(2);
|
||||
|
|
|
@ -71,7 +71,7 @@ public class WorldGenMystic2 extends WorldGenerator
|
|||
{
|
||||
var11 = var1.getBlockId(var3, var4 - 1, var5);
|
||||
|
||||
if ((var11 == BOPBlocks.holyGrass.blockID) && var4 < 256 - var6 - 1)
|
||||
if ((var11 == BOPBlocks.holyGrass.blockID || var11 == Block.grass.blockID || var11 == Block.dirt.blockID) && var4 < 256 - var6 - 1)
|
||||
{
|
||||
var1.setBlock(var3, var4 - 1, var5, Block.dirt.blockID);
|
||||
var21 = var2.nextInt(2);
|
||||
|
|
Loading…
Reference in a new issue