The right method to find out whether the machine should break the block.
This commit is contained in:
parent
4372034ff4
commit
f5abfcefe8
2 changed files with 2 additions and 3 deletions
|
@ -183,7 +183,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
||||||
if (yHead <= 0) {
|
if (yHead <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord())) && (!getBaseMetaTileEntity().getAir(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) {
|
if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord())) && (!getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()).isAir(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord(), MINING_PIPE_TIP_BLOCK, 0, false)) {
|
if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord(), MINING_PIPE_TIP_BLOCK, 0, false)) {
|
||||||
|
|
|
@ -92,8 +92,7 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
|
||||||
|
|
||||||
private boolean isRefillableBlock(int aX, int aY, int aZ){
|
private boolean isRefillableBlock(int aX, int aY, int aZ){
|
||||||
IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
|
IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
|
||||||
if (aBaseTile.getTileEntity(aX, aY, aZ) != null) return false;
|
if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ) || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid()) return false;
|
||||||
if (!aBaseTile.getAir(aX, aY, aZ) && aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid()) return false;
|
|
||||||
if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true)) return false;
|
if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true)) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue