use of forestry.arboriculture.genetics.CheckPollinatableTree in project ForestryMC by ForestryMC.
the class GeneticsUtil method getCheckPollinatable.
/**
* Returns an ICheckPollinatable that can be checked but not mated.
* Used to check for pollination traits without altering the world by changing vanilla leaves to forestry ones.
*/
public static ICheckPollinatable getCheckPollinatable(World world, final int x, final int y, final int z) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile instanceof IPollinatable) {
return new CheckPollinatable((IPollinatable) tile);
}
ITree pollen = getErsatzPollen(world, x, y, z);
if (pollen != null) {
return new CheckPollinatableTree(pollen);
}
return null;
}
Aggregations