Fix rubber sapling finding top most block of world to grow from. Fixes #782

This commit is contained in:
modmuss50 2016-10-18 15:53:04 +01:00
parent 603c12590d
commit cff4878eb0
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA

View file

@ -32,7 +32,7 @@ public class BlockRubberSapling extends BlockSapling {
return;
}
worldIn.setBlockToAir(pos);
if (!new RubberTreeGenerator(false).generate(worldIn, rand, pos)) {
if (!new RubberTreeGenerator(false).growTree(worldIn, rand, pos.getX(), pos.getY(), pos.getZ())) {
worldIn.setBlockState(pos, state); // Re-add the sapling if the tree
// failed to grow
}