Merge pull request #1232 from Dimach/unstable-1

Fixed small bug - basic miner cant work using battery in inner slot.
This commit is contained in:
Blood-Asp 2017-11-05 17:40:05 +01:00 committed by GitHub
commit 471376dc70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,8 @@ import net.minecraftforge.common.util.FakePlayer;
import java.util.ArrayList; import java.util.ArrayList;
import static gregtech.api.enums.GT_Values.V;
public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0); private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0);
private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE); private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE);
@ -133,6 +135,11 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
} }
} }
@Override
public long maxEUStore() {
return mTier == 1 ? 4096 : V[mTier] * 64;
}
public boolean moveOneDown(IGregTechTileEntity aBaseMetaTileEntity) { public boolean moveOneDown(IGregTechTileEntity aBaseMetaTileEntity) {
if (aBaseMetaTileEntity.getYCoord() + drillY - 1 < 0 if (aBaseMetaTileEntity.getYCoord() + drillY - 1 < 0
|| GT_Utility.getBlockHardnessAt(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord()) < 0 || GT_Utility.getBlockHardnessAt(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord()) < 0