From 5e7984beb8728fc3c9b979c23a3d7c2c24835226 Mon Sep 17 00:00:00 2001 From: AndreySolodovnikov <37311176+AndreySolodovnikov@users.noreply.github.com> Date: Sat, 11 Apr 2020 23:58:14 +0300 Subject: [PATCH 1/2] new pumps --- .../GT_MetaTileEntity_BasicDrillerBase.java | 138 ++++ .../basic/GT_MetaTileEntity_Miner.java | 109 +--- .../basic/GT_MetaTileEntity_Pump.java | 588 +++--------------- .../multi/GT_MetaTileEntity_OilDrillBase.java | 4 +- 4 files changed, 252 insertions(+), 587 deletions(-) create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BasicDrillerBase.java diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BasicDrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BasicDrillerBase.java new file mode 100644 index 000000000..ad8cd556d --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_BasicDrillerBase.java @@ -0,0 +1,138 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.FakePlayer; +import org.lwjgl.Sys; + +import static gregtech.api.enums.GT_Values.V; + +public abstract class GT_MetaTileEntity_BasicDrillerBase extends GT_MetaTileEntity_BasicMachine { + + static int[] RADIUS, //Miner radius per tier + SPEED, //Miner cycle time per tier + ENERGY ; //Miner energy consumption per tier + + protected static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0); + protected static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE); + protected static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); + + int drillX, drillY, drillZ; + boolean isPickingPipes; + boolean waitMiningPipe = true; + + public GT_MetaTileEntity_BasicDrillerBase(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, int aInSlots, int aOutSlots, String aGUIName, ITexture... aTextures){ + super(aID,aName,aNameRegional,aTier,1,aDescription,aInSlots,aOutSlots,aGUIName,"",aTextures); + } + + public GT_MetaTileEntity_BasicDrillerBase(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName) { + super(aName,aTier,1,aDescription,aTextures,aInputSlotCount,aOutputSlotCount,aGUIName,""); + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getItem() == MINING_PIPE.getItem()); + } + + public abstract boolean hasFreeSpace(); + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isUniversalEnergyStored(ENERGY[mTier] * (SPEED[mTier] - mProgresstime)) && hasFreeSpace()) { + miningPipe: + if (waitMiningPipe) { + mMaxProgresstime = 0; + for (int i = 0; i < mInputSlotCount; i++) { + ItemStack s = getInputAt(i); + if (s != null && s.getItem() == MINING_PIPE.getItem() && s.stackSize > 0) { + waitMiningPipe = false; + break miningPipe; + } + } + return; + } + aBaseMetaTileEntity.decreaseStoredEnergyUnits(ENERGY[mTier], true); + mMaxProgresstime = SPEED[mTier]; + } else { + mMaxProgresstime = 0; + return; + } + if (mProgresstime == SPEED[mTier] - 1) { + if (isPickingPipes) { + if (drillY == 0) { + aBaseMetaTileEntity.disableWorking(); + isPickingPipes = false; + } else if (aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_TIP_BLOCK || aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_BLOCK) { + mOutputItems[0] = MINING_PIPE.copy(); + mOutputItems[0].stackSize = 1; + aBaseMetaTileEntity.getWorld().setBlockToAir(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY, aBaseMetaTileEntity.getZCoord()); + drillY++; + } + return; + } + if (drillY == 0) { + moveOneDown(aBaseMetaTileEntity); + return; + } + if (drillZ > RADIUS[mTier]) { + moveOneDown(aBaseMetaTileEntity); + return; + } + while (drillZ <= RADIUS[mTier]) { + while (drillX <= RADIUS[mTier]) { + if(workBlock(aBaseMetaTileEntity)) + return; + drillX++; + } + drillX = -RADIUS[mTier]; + drillZ++; + } + } + } + } + + @Override + public long maxEUStore() { + return mTier == 1 ? 4096 : V[mTier] * 64; + } + + + public abstract boolean workBlock(IGregTechTileEntity aBaseMetaTileEntity); + + public abstract boolean moveOneDown(IGregTechTileEntity aBaseMetaTileEntity); + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("isPickingPipe", isPickingPipes); + aNBT.setInteger("drillX", drillX); + aNBT.setInteger("drillY", drillY); + aNBT.setInteger("drillZ", drillZ); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + isPickingPipes = aNBT.getBoolean("isPickingPipe"); + drillX = aNBT.getInteger("drillX"); + drillY = aNBT.getInteger("drillY"); + drillZ = aNBT.getInteger("drillZ"); + } + + private FakePlayer mFakePlayer = null; + + protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) { + if (mFakePlayer == null) mFakePlayer = GT_Utility.getFakePlayer(aBaseTile); + mFakePlayer.setWorld(aBaseTile.getWorld()); + mFakePlayer.setPosition(aBaseTile.getXCoord(), aBaseTile.getYCoord(), aBaseTile.getZCoord()); + return mFakePlayer; + } + +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java index 3e0da9048..06b73be4a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java @@ -23,40 +23,33 @@ import static gregtech.api.enums.GT_Values.V; -public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine { - 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_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); - - int drillX, drillY, drillZ; - boolean isPickingPipes; - boolean waitMiningPipe; - final static int[] RADIUS = new int[]{8, 8, 16, 24}; //Miner radius per tier - final static int[] SPEED = new int[]{160, 160, 80, 40}; //Miner cycle time per tier - final static int[] ENERGY = new int[]{8, 8, 32, 128}; //Miner energy consumption per tier +public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicDrillerBase { + static { + RADIUS = new int[]{8, 8, 16, 24}; + SPEED = new int[]{160, 160, 80, 40}; + ENERGY = new int[]{8, 8, 32, 128}; + } public GT_MetaTileEntity_Miner(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 1, new String[]{"Digging ore instead of you", ENERGY[aTier] + " EU/t, " + SPEED[aTier] / 20 + " sec per block", - "Work area " + (RADIUS[aTier] * 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1)}, 2, 2, "Miner.png", "", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); + super(aID, aName, aNameRegional, aTier, new String[]{"Digging ore instead of you", ENERGY[aTier] + " EU/t, " + SPEED[aTier] / 20 + " sec per block", + "Work area " + (RADIUS[aTier] * 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1)}, 2, 2, "Miner.png", new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_BOTTOM"))); } - public GT_MetaTileEntity_Miner(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); - } - public GT_MetaTileEntity_Miner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { - super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); + public GT_MetaTileEntity_Miner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName) { + super(aName, aTier, aDescription, aTextures, 2, 2, aGUIName); } @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_Miner(mName, mTier, mDescriptionArray, mTextures, mGUIName, mNEIName); + return new GT_MetaTileEntity_Miner(mName, mTier, mDescriptionArray, mTextures, mGUIName); } public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getItem() == MINING_PIPE.getItem()); } + @Override public boolean hasFreeSpace() { for (int i = getOutputSlot(); i < getOutputSlot() + 2; i++) { if (mInventory[i] != null) { @@ -67,73 +60,23 @@ public boolean hasFreeSpace() { } @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide()) { - if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isUniversalEnergyStored(ENERGY[mTier] * (SPEED[mTier] - mProgresstime)) && hasFreeSpace()) { - miningPipe: - if (waitMiningPipe) { - mMaxProgresstime = 0; - for (int i = 0; i < mInputSlotCount; i++) { - ItemStack s = getInputAt(i); - if (s != null && s.getItem() == MINING_PIPE.getItem() && s.stackSize > 0) { - waitMiningPipe = false; - break miningPipe; - } - } - return; - } - aBaseMetaTileEntity.decreaseStoredEnergyUnits(ENERGY[mTier], true); - mMaxProgresstime = SPEED[mTier]; - } else { - mMaxProgresstime = 0; - return; + public boolean workBlock(IGregTechTileEntity aBaseMetaTileEntity) { + Block block = aBaseMetaTileEntity.getBlockOffset(drillX, drillY, drillZ); + int blockMeta = aBaseMetaTileEntity.getMetaIDOffset(drillX, drillY, drillZ); + if (block instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(drillX, drillY, drillZ); + if (tTileEntity != null && tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) { + mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); + return true; } - if (mProgresstime == SPEED[mTier] - 1) { - if (isPickingPipes) { - if (drillY == 0) { - aBaseMetaTileEntity.disableWorking(); - isPickingPipes = false; - } else if (aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_TIP_BLOCK || aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_BLOCK) { - mOutputItems[0] = MINING_PIPE.copy(); - mOutputItems[0].stackSize = 1; - aBaseMetaTileEntity.getWorld().setBlockToAir(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY, aBaseMetaTileEntity.getZCoord()); - drillY++; - } - return; - } - if (drillY == 0) { - moveOneDown(aBaseMetaTileEntity); - return; - } - if (drillZ > RADIUS[mTier]) { - moveOneDown(aBaseMetaTileEntity); - return; - } - while (drillZ <= RADIUS[mTier]) { - while (drillX <= RADIUS[mTier]) { - Block block = aBaseMetaTileEntity.getBlockOffset(drillX, drillY, drillZ); - int blockMeta = aBaseMetaTileEntity.getMetaIDOffset(drillX, drillY, drillZ); - if (block instanceof GT_Block_Ores_Abstract) { - TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(drillX, drillY, drillZ); - if (tTileEntity != null && tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mNatural) { - mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); - return; - } - } else { - ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); - if (association != null && association.mPrefix.toString().startsWith("ore")) { - mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); - return; - } - } - drillX++; - } - drillX = -RADIUS[mTier]; - drillZ++; - } + } else { + ItemData association = GT_OreDictUnificator.getAssociation(new ItemStack(block, 1, blockMeta)); + if (association != null && association.mPrefix.toString().startsWith("ore")) { + mineBlock(aBaseMetaTileEntity, drillX, drillY, drillZ); + return true; } } + return false; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index 9e6f6088d..88a2e95dd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -35,40 +35,31 @@ import static gregtech.api.enums.GT_Values.V; import static gregtech.api.util.GT_Utility.getFakePlayer; -public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { - 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_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0)); +public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_BasicDrillerBase { - public static int getMaxDistanceForTier(byte aTier) { - return (10 * ((int) Math.pow(1.6D, aTier))); + static { + RADIUS = new int[]{8, 10, 20, 60,180,40,48,56,64,72,80}; + SPEED = new int[]{160, 160, 80, 40,20,10,5,2,2,2,2}; + ENERGY = new int[]{8, 2, 8, 32,128,512,8192,32768,131072,524288}; } - public static long getEuUsagePerTier(byte aTier) { - return (16 * ((long) Math.pow(4, aTier))); - } - - public ArrayDeque mPumpList = new ArrayDeque(); - public boolean wasPumping = false; - public int mPumpTimer = 0; - public int mPumpCountBelow = 0; - public Block mPrimaryPumpedBlock = null; - public Block mSecondaryPumpedBlock = null; - public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) { - - super(aID, aName, aNameRegional, aTier, 3, - new String[]{"The best way to empty Oceans!", - "Pumping Area: " + (GT_MetaTileEntity_Pump.getMaxDistanceForTier((byte)aTier) * 2 + 1) + "x" + - (GT_MetaTileEntity_Pump.getMaxDistanceForTier((byte)aTier) * 2 + 1)}); + super(aID,aName,aNameRegional,aTier,new String[]{"The best way to empty Oceans!", + "Pumping Area: " + (RADIUS[aTier]* 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1), + "Uses: "+ENERGY[aTier]+" EU per tick", + "Pumps one fluid block each "+SPEED[aTier]+" ticks"} + ,2,1,"Miner.png", + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), + new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT),new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) + ); } - public GT_MetaTileEntity_Pump(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); - } public GT_MetaTileEntity_Pump(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 3, aDescription, aTextures); + super(aName,aTier,aDescription,aTextures,2,1,"Miner.png"); } @Override @@ -76,520 +67,113 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); } - public void saveNBTData(NBTTagCompound aNBT) { - boolean wasPumping = this.wasPumping || !this.mPumpList.isEmpty(); - if (D1) { - GT_Log.out.println("PUMP: NBT:Save - WasPumping - " + wasPumping + " blocks (" + this.mPrimaryPumpedBlock + ", " + this.mSecondaryPumpedBlock + ")"); - } - super.saveNBTData(aNBT); - aNBT.setString("mPumpedBlock1", this.mPrimaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mPrimaryPumpedBlock)); - aNBT.setString("mPumpedBlock2", this.mSecondaryPumpedBlock == null ? "" : Block.blockRegistry.getNameForObject(this.mSecondaryPumpedBlock)); - aNBT.setBoolean("wasPumping", wasPumping); - } - - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - this.wasPumping = aNBT.getBoolean("wasPumping"); - this.mPrimaryPumpedBlock = Block.getBlockFromName(aNBT.getString("mPumpedBlock1")); - this.mSecondaryPumpedBlock = Block.getBlockFromName(aNBT.getString("mPumpedBlock2")); - - if (D1) { - GT_Log.out.println("PUMP: NBT:Load - WasPumping - " + this.wasPumping + "(" + aNBT.getString("mPumpedBlock1") + ") " + this.mPrimaryPumpedBlock); - } - - } - - @Override - public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_BasicTank(aPlayerInventory, aBaseMetaTileEntity); - } - - @Override - public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_GUIContainer_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); - } - - @Override - public boolean doesFillContainers() { - return true; - } - - @Override - public boolean doesEmptyContainers() { - return false; - } - - @Override - public boolean canTankBeFilled() { - return false; - } - - @Override - public boolean canTankBeEmptied() { - return true; - } - - @Override - public boolean displaysItemStack() { - return true; - } - - @Override - public boolean displaysStackSize() { - return false; - } - @Override public boolean isFluidInputAllowed(FluidStack aFluid) { return false; } - @Override - public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { - super.onPostTick(aBaseMetaTileEntity, aTick); - if (getBaseMetaTileEntity().isServerSide()) { - this.mPumpTimer -= 1; - if ((getBaseMetaTileEntity() instanceof BaseTileEntity)) { - ((BaseTileEntity) getBaseMetaTileEntity()).ignoreUnloadedChunks = false; - } - this.doTickProfilingInThisTick = true; - this.mPumpCountBelow = 0; - - IGregTechTileEntity tTileEntity; - for (int i = 1 ; - (i < 21) && ((tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) != null) - && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)) ; i++) - { - // Apparently someone might stack 21 pumps on top of each other, so let's check for that - getBaseMetaTileEntity().setActive(tTileEntity.isActive()); - this.mPumpCountBelow += 1; - // The more pumps we have stacked, the faster the ones below go - ((GT_MetaTileEntity_Pump) tTileEntity.getMetaTileEntity()).mPumpTimer -= 1; - } - if (this.mPumpCountBelow <= 0) { - // Only the bottom most pump does anything - if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().isUniversalEnergyStored(this.getEuUsagePerAction())) - && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { - boolean tMovedOneDown = false; - if ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) { - if (!this.wasPumping){ - tMovedOneDown = moveOneDown(); - if (D1) { - GT_Log.out.println("PUMP: Moved down"); - } - } else if (D1) { - GT_Log.out.println("PUMP: Was pumping, didn't move down"); - } - } - int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); - - if (!this.hasValidFluid()) { - // We don't have a valid block, let's try to find one - int y = getYOfPumpHead(); - - if (D1 && this.mPrimaryPumpedBlock != null) { - GT_Log.out.println("PUMP: Had an invalid pump block. Trying to find a fluid at Y: " + y + - " Previous blocks 1: " + this.mPrimaryPumpedBlock + " 2: " + this.mSecondaryPumpedBlock); - } - // First look down - checkForFluidToPump(x, y - 1, z ); - - // Then look all around - checkForFluidToPump(x, y, z + 1); - checkForFluidToPump(x, y, z - 1); - checkForFluidToPump(x + 1, y, z ); - checkForFluidToPump(x - 1, y, z ); - this.clearQueue(false); - - if(this.hasValidFluid()) { - // Don't move down and rebuild the queue if we now have a valid fluid - this.wasPumping = true; - } - - } else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) { - // We didn't just look for a block, and the pump head is below the pump - if ((tMovedOneDown) || this.wasPumping || - ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) || - (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) - { - // Rebuild the list to pump if any of the following conditions are true: - // 1) We just moved down - // 2) We were previously pumping (and possibly just reloaded) - // 3) We have an empty queue and enough time has passed - // 4) A long while has has passed - if (D1) { - GT_Log.out.println("PUMP: Rebuilding pump list - Size " + - this.mPumpList.size() + " WasPumping: " + this.wasPumping + " Timer " + getBaseMetaTileEntity().getTimer()); - } - int yPump = getBaseMetaTileEntity().getYCoord() - 1, yHead = getYOfPumpHead(); - - this.rebuildPumpQueue(x, yPump, z, yHead); - - if (D1) { - GT_Log.out.println("PUMP: Rebuilt pump list - Size " + this.mPumpList.size()); - } - - } - if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) { - while ((!this.mPumpList.isEmpty())) { - ChunkPosition pos = this.mPumpList.pollLast(); - if (consumeFluid(pos.chunkPosX, pos.chunkPosY, pos.chunkPosZ)) { - // Keep trying until we consume something, or the list is empty - break; - } - } - this.mPumpTimer = GT_Utility.safeInt(160 / (long)Math.pow(2, this.mTier) ); - this.mPumpTimer = mPumpTimer==0 ? 1 : mPumpTimer; - } - } else { - // We somehow have a valid fluid, but the head of the pump isn't below the pump. Perhaps someone broke some pipes - // -- Clear the queue and we should try to move down until we can find a valid fluid - this.clearQueue(false); - } - } - getBaseMetaTileEntity().setActive(!this.mPumpList.isEmpty()); - } - } - } - - private int getMaxPumpableDistance() { - return GT_MetaTileEntity_Pump.getMaxDistanceForTier(this.mTier); - } - private long getEuUsagePerAction() { - return GT_MetaTileEntity_Pump.getEuUsagePerTier(this.mTier); - } - - private boolean hasValidFluid() { - return (!GT_Utility.isBlockInvalid(this.mPrimaryPumpedBlock) && !GT_Utility.isBlockInvalid(this.mSecondaryPumpedBlock)); - } - - private boolean moveOneDown() { - if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1) || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) { - // No mining pipes - return false; - } - - int yHead = getYOfPumpHead(); - if (yHead <= 1) { - // Let's not punch through bedrock + @Override + public boolean moveOneDown(IGregTechTileEntity aBaseMetaTileEntity) { + if (aBaseMetaTileEntity.getYCoord() + drillY - 1 < 0 + ||!canPump(aBaseMetaTileEntity,0,drillY-1,0) + || !GT_Utility.setBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord(), MINING_PIPE_TIP_BLOCK, 0, true)) { + isPickingPipes = true; return false; } - - int x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); - - if ((!consumeFluid(x, yHead - 1, z)) && (!getBaseMetaTileEntity().getBlock(x, yHead - 1, z).isAir(getBaseMetaTileEntity().getWorld(), x, yHead - 1, z))) { - // Either we didn't consume a fluid, or it's a non Air block - return false; + if (aBaseMetaTileEntity.getBlockOffset(0, drillY, 0) == MINING_PIPE_TIP_BLOCK) { + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY, aBaseMetaTileEntity.getZCoord(), MINING_PIPE_BLOCK); } - - // Try to set the block below us to a a tip - if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), x, yHead - 1, z, MINING_PIPE_TIP_BLOCK, 0, false)) { + miningPipes: + { + for (int i = 0; i < mInputSlotCount; i++) { + ItemStack s = getInputAt(i); + if (s != null && s.getItem() == MINING_PIPE.getItem() && s.stackSize > 0) { + s.stackSize--; + if (s.stackSize == 0) { + mInventory[getInputSlot() + i] = null; + } + break miningPipes; + } + } + waitMiningPipe = true; return false; } - // And change the previous block to a pipe -- as long as it isn't the pump itself! - if (yHead != getBaseMetaTileEntity().getYCoord()) { - getBaseMetaTileEntity().getWorld().setBlock(x, yHead, z, MINING_PIPE_BLOCK); - } - getBaseMetaTileEntity().decrStackSize(0, 1); + pumpBlock(aBaseMetaTileEntity,0,drillY-1,0); + aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord(), MINING_PIPE_TIP_BLOCK); + drillY--; + drillZ = -RADIUS[mTier]; + drillX = -RADIUS[mTier]; return true; } - private int getYOfPumpHead() { - // Let's play find the pump head! - - // TODO: Handle pipe|pipe|head|pipe|pipe - int y = getBaseMetaTileEntity().getYCoord() - 1, x = getBaseMetaTileEntity().getXCoord(), z = getBaseMetaTileEntity().getZCoord(); - - while(y > 0) { - Block curBlock = getBaseMetaTileEntity().getBlock(x, y, z); - if(curBlock == MINING_PIPE_BLOCK) { - y--; - } else if (curBlock == MINING_PIPE_TIP_BLOCK) { - Block nextBlock = getBaseMetaTileEntity().getBlock(x, y - 1 , z); - if (nextBlock == MINING_PIPE_BLOCK || nextBlock == MINING_PIPE_TIP_BLOCK) { - // We're running into an existing set of pipes -- Turn this block into a pipe and keep going - this.clearQueue(true); - getBaseMetaTileEntity().getWorld().setBlock(x, y, z, MINING_PIPE_BLOCK); - } - y--; - - } else { - break; - } - } - - - if (getBaseMetaTileEntity().getBlock(x, y, z) != MINING_PIPE_TIP_BLOCK) { - if (y != getBaseMetaTileEntity().getYCoord() - 1 && getBaseMetaTileEntity().getBlock(x, y + 1, z) == MINING_PIPE_BLOCK) { - // We're below the pump at the bottom of the pipes, we haven't found a tip; make the previous pipe a tip! - this.clearQueue(true); - getBaseMetaTileEntity().getWorld().setBlock(x, y + 1, z, MINING_PIPE_TIP_BLOCK); - } - - return y + 1; - } - return y; + @Override + public boolean hasFreeSpace() { + return getFluid()==null||getFluid().amount<=getCapacity()-1000; } - private void clearQueue(boolean checkPumping) { - if(checkPumping) { - this.wasPumping = !this.mPumpList.isEmpty(); - } else { - this.wasPumping = false; - } - this.mPumpList.clear(); + @Override + public boolean workBlock(IGregTechTileEntity aBaseMetaTileEntity) { + return pumpBlock(aBaseMetaTileEntity,drillX,drillY,drillZ); } - private void rebuildPumpQueue(int aX, int yStart, int aZ, int yEnd) { - int mDist = this.getMaxPumpableDistance(); - doTickProfilingInThisTick = false; - ArrayDeque fluidsToSearch = new ArrayDeque(); - ArrayDeque fluidsFound = new ArrayDeque(); - Set checked = new HashSet(); - this.clearQueue(false); - - for (int aY = yStart ; this.mPumpList.isEmpty() && aY >= yEnd ; aY--) { - // Start at the top (presumably the block below the pump), and work our way down to the end (presumably the location of the pump Head) - // and build up a queue of fluids to pump - fluidsToSearch.add(new ChunkPosition(aX, aY, aZ)); + public boolean canPump(IGregTechTileEntity aBaseTileEntity, int aX, int aY, int aZ) { + if(aBaseTileEntity.getAirOffset(aX,aY,aZ)) + return true; + Block tBlock = aBaseTileEntity.getBlockOffset(aX,aY,aZ); + return tBlock == Blocks.water||tBlock == Blocks.lava|| tBlock == Blocks.flowing_lava || tBlock == Blocks.flowing_water||tBlock instanceof IFluidBlock; + } - while (!fluidsToSearch.isEmpty()) { - Iterator i$ = fluidsToSearch.iterator(); - while(i$.hasNext()) { - ChunkPosition tPos = i$.next(); - // Look all around - if (tPos.chunkPosX < aX + mDist) queueFluid(tPos.chunkPosX + 1, tPos.chunkPosY, tPos.chunkPosZ, fluidsFound, checked); - if (tPos.chunkPosX > aX - mDist) queueFluid(tPos.chunkPosX - 1, tPos.chunkPosY, tPos.chunkPosZ, fluidsFound, checked); - if (tPos.chunkPosZ < aZ + mDist) queueFluid(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ + 1, fluidsFound, checked); - if (tPos.chunkPosZ > aZ - mDist) queueFluid(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ - 1, fluidsFound, checked); - // And then look up - queueFluid(tPos.chunkPosX, tPos.chunkPosY + 1, tPos.chunkPosZ, this.mPumpList, checked); - } - this.mPumpList.addAll(fluidsFound); - fluidsToSearch = fluidsFound; - fluidsFound = new ArrayDeque(); + public boolean pumpBlock(IGregTechTileEntity aBaseTileEntity, int aX, int aY, int aZ){ + if(aBaseTileEntity.getAirOffset(aX,aY,aZ)) + return false; + Block tBlock = aBaseTileEntity.getBlockOffset(aX,aY,aZ); + if(tBlock == Blocks.water){ + if(aBaseTileEntity.getWorld().setBlock(aBaseTileEntity.getXCoord()+aX,aBaseTileEntity.getYCoord()+aY,aBaseTileEntity.getZCoord()+aZ,Blocks.air,0,2)) { + if (mOutputFluid == null) + mOutputFluid = GT_ModHandler.getWater(1000L); + else if (mOutputFluid.equals(GT_ModHandler.getWater(1000L))) + mOutputFluid.amount += 1000; + return true; } - // Make sure we don't have the pipe location in the queue - this.mPumpList.remove(new ChunkPosition(aX, aY, aZ)); } - } - - private boolean queueFluid(int aX, int aY, int aZ, ArrayDeque fluidsFound, Set checked) { - // If we haven't already looked at this coordinate set, and it's not already in the list of fluids found, see if there is - // a valid fluid and add it to the fluids found - ChunkPosition tCoordinate = new ChunkPosition(aX, aY, aZ); - if (checked.add(tCoordinate) && !fluidsFound.contains(tCoordinate)) { - Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); - if ((this.mPrimaryPumpedBlock == aBlock) || (this.mSecondaryPumpedBlock == aBlock)) { - fluidsFound.addFirst(tCoordinate); + else if(tBlock == Blocks.lava){ + if(aBaseTileEntity.getWorld().setBlock(aBaseTileEntity.getXCoord()+aX,aBaseTileEntity.getYCoord()+aY,aBaseTileEntity.getZCoord()+aZ,Blocks.air,0,2)) { + if (mOutputFluid == null) + mOutputFluid = GT_ModHandler.getLava(1000L); + else if (mOutputFluid.equals(GT_ModHandler.getLava(1000L))) + mOutputFluid.amount += 1000; return true; } - } - return false; - } - - private void checkForFluidToPump(int aX, int aY, int aZ) { - // If we don't currently have a valid fluid to pump, try pumping the fluid at the given coordinates - if(this.hasValidFluid()) - return; - Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); - if (GT_Utility.isBlockValid(aBlock)) { - if ((aBlock == Blocks.water) || (aBlock == Blocks.flowing_water)) { - this.mPrimaryPumpedBlock = Blocks.water; - this.mSecondaryPumpedBlock = Blocks.flowing_water; - return; - } - if ((aBlock == Blocks.lava) || (aBlock == Blocks.flowing_lava)) { - this.mPrimaryPumpedBlock = Blocks.lava; - this.mSecondaryPumpedBlock = Blocks.flowing_lava; - return; - } - if ((aBlock instanceof IFluidBlock)) { - this.mPrimaryPumpedBlock = aBlock; - this.mSecondaryPumpedBlock = aBlock; - return; - } } - this.mPrimaryPumpedBlock = null; - this.mSecondaryPumpedBlock = null; - } - - private boolean consumeFluid(int aX, int aY, int aZ) { - // Try to consume a fluid at a location - // Returns true if something was consumed, otherwise false - if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), aX, aY, aZ, true)) return false; - - Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); - - if ((GT_Utility.isBlockValid(aBlock)) && ((this.mPrimaryPumpedBlock == aBlock) || (this.mSecondaryPumpedBlock == aBlock))) { - boolean isWaterOrLava = ((this.mPrimaryPumpedBlock == Blocks.water || this.mPrimaryPumpedBlock == Blocks.lava)); - - if (isWaterOrLava && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) != 0) { - // Water/Lava that isn't a source block - do nothing here, but set the block to air and consume energy below - if (D1) { - GT_Log.out.println("PUMP: Water/Lava - Not a source block"); - } - } else if (this.mFluid == null) { - // The pump has no internal fluid - if (this.mPrimaryPumpedBlock == Blocks.water) - this.mFluid = GT_ModHandler.getWater(1000L); - else if (this.mPrimaryPumpedBlock == Blocks.lava) - this.mFluid = GT_ModHandler.getLava(1000L); - else { - // Not water or lava; try to drain and set to air - this.mFluid = ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, true); - } - } else if (GT_ModHandler.isWater(this.mFluid) || GT_ModHandler.isLava(this.mFluid) || - this.mFluid.isFluidEqual(((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))) - { - if (!isWaterOrLava) { - // Only set Block to Air for non lava/water fluids - this.getBaseMetaTileEntity().getWorld().setBlockToAir(aX, aY, aZ); - } - this.mFluid.amount += 1000; - - } else { - if (D1) { - GT_Log.out.println("PUMP: Couldn't consume " + aBlock); - } - // We didn't do anything - return false; - } - - getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.getEuUsagePerAction(), true); - getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, Blocks.air, 0, 2); + else if(tBlock == Blocks.flowing_lava || tBlock == Blocks.flowing_water) { + aBaseTileEntity.getWorld().setBlock(aBaseTileEntity.getXCoord() + aX, aBaseTileEntity.getYCoord() + aY, aBaseTileEntity.getZCoord() + aZ,Blocks.air,0,2); return true; } - return false; - } - - @Override - public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { - if (aBaseMetaTileEntity.isClientSide()) return true; - aBaseMetaTileEntity.openGUI(aPlayer); - return true; - } - - - @Override - public boolean isSimpleMachine() { - return false; - } - - @Override - public boolean isOverclockerUpgradable() { - return false; - } - - @Override - public boolean isTransformerUpgradable() { - return false; - } - - @Override - public boolean isElectric() { - return true; - } - - @Override - public boolean isFacingValid(byte aFacing) { - return true; - } - - @Override - public boolean isEnetInput() { - return true; - } - - @Override - public boolean isInputFacing(byte aSide) { - return true; - } + else if(tBlock instanceof IFluidBlock){ + FluidStack fStack = ((IFluidBlock)tBlock).drain(aBaseTileEntity.getWorld(),aBaseTileEntity.getXCoord() + aX, aBaseTileEntity.getYCoord() + aY, aBaseTileEntity.getZCoord() + aZ,false); + aBaseTileEntity.getWorld().setBlock(aBaseTileEntity.getXCoord() + aX, aBaseTileEntity.getYCoord() + aY, aBaseTileEntity.getZCoord() + aZ,Blocks.air,0,2); + if(fStack==null) + return true; + if(mOutputFluid== null) + mOutputFluid = fStack; + else if(fStack.equals(mOutputFluid)) { + mOutputFluid.amount += fStack.amount; + return true; + } - @Override - public boolean isOutputFacing(byte aSide) { + } return false; - } - @Override - public boolean isTeleporterCompatible() { - return false; } - @Override - public long getMinimumStoredEU() { - return V[mTier] * 16; - } - - @Override - public long maxEUStore() { - return V[mTier] * 64; - } - - @Override - public long maxEUInput() { - return V[mTier]; - } - - @Override - public long maxSteamStore() { - return maxEUStore(); - } - - @Override - public long maxAmperesIn() { - return 2; - } - - @Override - public int getStackDisplaySlot() { - return 2; - } - - @Override - public boolean isAccessAllowed(EntityPlayer aPlayer) { - return true; - } - - @Override public int getCapacity() { return 16000 * this.mTier; } - @Override - public int getTankPressure() { - return 100; - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide == 0 || aSide == 1) ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP)}; - } - - @Override - public ITexture[] getTexturesActive(ITexture aBaseTexture) { - return getTexturesInactive(aBaseTexture); - } - - @Override - public ITexture[] getTexturesInactive(ITexture aBaseTexture) { - return new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),}; - } - - private FakePlayer mFakePlayer = null; - - protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) { - if (mFakePlayer == null) mFakePlayer = GT_Utility.getFakePlayer(aBaseTile); - mFakePlayer.setWorld(aBaseTile.getWorld()); - mFakePlayer.setPosition(aBaseTile.getXCoord(), aBaseTile.getYCoord(), aBaseTile.getZCoord()); - return mFakePlayer; - } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java index 14bc11fff..d50d26ed0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java @@ -87,7 +87,7 @@ protected void setElectricityStats() { this.mEfficiencyIncrease = 10000; int tier = Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); this.mEUt = -3 * (1 << (tier << 1)); - this.mMaxProgresstime = (workState == STATE_AT_BOTTOM ? (1280 * getRangeInChunks() * getRangeInChunks() / (1 << getMinTier())) : 80) / (1 << tier); + this.mMaxProgresstime = (workState == STATE_AT_BOTTOM ? 320 : 80) / (1 << tier); this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); } @@ -99,7 +99,7 @@ protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int } if (reachingVoidOrBedrock() && tryFillChunkList()) { - float speed = .5F+(GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()) *.25F; + float speed = 1f/getMinTier()/(getMinTier()>2?2:1); FluidStack tFluid = pumpOil(speed); if (tFluid != null && tFluid.amount > getTotalConfigValue()){ this.mOutputFluids = new FluidStack[]{tFluid}; From 7c638d1b1da4118db9f53be5f8de2f4320450d5c Mon Sep 17 00:00:00 2001 From: AndreySolodovnikov <37311176+AndreySolodovnikov@users.noreply.github.com> Date: Sun, 12 Apr 2020 00:26:39 +0300 Subject: [PATCH 2/2] add gui --- .../tileentities/machines/basic/GT_MetaTileEntity_Pump.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index 88a2e95dd..7ff8073c7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -48,7 +48,7 @@ public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int a "Pumping Area: " + (RADIUS[aTier]* 2 + 1) + "x" + (RADIUS[aTier] * 2 + 1), "Uses: "+ENERGY[aTier]+" EU per tick", "Pumps one fluid block each "+SPEED[aTier]+" ticks"} - ,2,1,"Miner.png", + ,2,2,"Pump.png", new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/miner/OVERLAY_FRONT")),