mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 22:34:33 +00:00
Integrate the terrain in the tree gen helper
This commit is contained in:
1 parent
1c1dd4918a
commit
8a40dd6d27
5 files changed
+65
-20
No files matched your search
@@ -207,16 +207,10 @@ public class ButterflyRoot extends SpeciesRoot implements IButterflyRoot {
|
||||
|
||||
do {
|
||||
y--;
|
||||
} while (!canReplace(world, new BlockPos(x, y, z)));
|
||||
} while (!BlockUtil.canReplace(world, new BlockPos(x, y, z)));
|
||||
|
||||
return new BlockPos(x, y, z);
|
||||
}
|
||||
|
||||
private boolean canReplace(World world, BlockPos pos) {
|
||||
Block block = BlockUtil.getBlock(world, pos);
|
||||
Material material = block.getMaterial();
|
||||
return block.isReplaceable(world, pos) && !material.isLiquid() || block.isAir(world, pos) || material == Material.plants;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMated(ItemStack stack) {
|
||||
|
||||
Reference in new issue
Block a user