mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 13:10:13 +00:00
Spaced rubber sapling with gaps when auto planted.
This commit is contained in:
1 parent
a900a4da56
commit
3b7b43b689
2 files changed
+17
No files matched your search
@@ -34,6 +34,19 @@ public class RubberTreeFarmerIC2 extends TreeFarmer {
|
||||
return woods != null && woods.length > 0 && sapling != null && saplingItem != null && treeTap != null && stickyResin != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean prepareBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
for(int x=-1;x<2;x++) {
|
||||
for(int z=-1;z<2;z++) {
|
||||
Block blk = farm.getBlock(bc.x + x, bc.y, bc.z + z);
|
||||
if(isWood(blk) || sapling == blk) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.prepareBlock(farm, bc, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHarvestResult harvestBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
HarvestResult res = new HarvestResult();
|
||||
|
||||
@@ -202,6 +202,10 @@ public class TileFarmStation extends AbstractPoweredTaskEntity /*implements IEnt
|
||||
public Block getBlock(BlockCoord bc) {
|
||||
return worldObj.getBlock(bc.x, bc.y, bc.z);
|
||||
}
|
||||
|
||||
public Block getBlock(int x, int y, int z) {
|
||||
return worldObj.getBlock(x, y, z);
|
||||
}
|
||||
|
||||
public int getBlockMeta(BlockCoord bc) {
|
||||
return worldObj.getBlockMetadata(bc.x, bc.y, bc.z);
|
||||
|
||||
Reference in new issue
Block a user