use of forestry.core.worldgen.BlockType in project ForestryMC by ForestryMC.
the class WorldGenTree method getWood.
@Override
public BlockType getWood() {
ItemStack woodStack = tree.getGenome().getPrimary().getLogStacks()[0];
Block block = StackUtils.getBlock(woodStack);
int meta = woodStack.getItemDamage();
// if we have a fireproof tree, return the fireproof log
if (block instanceof BlockLog) {
IAlleleBoolean fireproof = (IAlleleBoolean) tree.getGenome().getActiveAllele(EnumTreeChromosome.FIREPROOF);
if (fireproof.getValue()) {
BlockLog blockLog = (BlockLog) block;
ForestryBlock fireproofLogBlock = BlockFireproofLog.getFireproofLog(blockLog);
return new BlockType(fireproofLogBlock.block(), meta);
}
}
return new BlockType(block, meta);
}
use of forestry.core.worldgen.BlockType in project ForestryMC by ForestryMC.
the class WorldGenArboriculture method addZWood.
protected final void addZWood(int x, int y, int z, EnumReplaceMode replace) {
BlockType woodZ = new BlockType(wood.getBlock(), wood.getMeta() + 8);
addBlock(x, y, z, woodZ, replace);
}
use of forestry.core.worldgen.BlockType in project ForestryMC by ForestryMC.
the class WorldGenArboriculture method addXWood.
protected final void addXWood(int x, int y, int z, EnumReplaceMode replace) {
BlockType woodX = new BlockType(wood.getBlock(), wood.getMeta() + 4);
addBlock(x, y, z, woodX, replace);
}
Aggregations