optimize imports and make gt (block) pump auto output on top
This commit is contained in:
parent
dde2673ba9
commit
4c19a7f330
7 changed files with 20 additions and 17 deletions
|
@ -17,7 +17,6 @@ import gregtech.api.util.GT_LanguageManager;
|
|||
import gregtech.api.util.GT_ModHandler;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.GT_Proxy;
|
||||
import mods.railcraft.api.core.items.IToolCrowbar;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
|
|
@ -26,8 +26,8 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package gregtech.api.metatileentity.implementations;
|
||||
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Dyes;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.enums.SubTag;
|
||||
import gregtech.api.enums.*;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.ICoverable;
|
||||
|
|
|
@ -17,8 +17,10 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.ChunkPosition;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
@ -34,7 +36,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
|||
public Block mPumpedBlock2 = null;
|
||||
|
||||
public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, 3, "The best way of emptying Oceans!");
|
||||
super(aID, aName, aNameRegional, aTier, 3, "The best way of emptying Oceans! Outputs on top.");
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Pump(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
|
@ -163,6 +165,19 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
|||
}
|
||||
getBaseMetaTileEntity().setActive(!this.mPumpList.isEmpty());
|
||||
}
|
||||
|
||||
//auto outputs on top
|
||||
if (this.mFluid != null && (aTick % 20 == 0)) {
|
||||
IFluidHandler tTank = aBaseMetaTileEntity.getITankContainerAtSide((byte)1);//1 is up.
|
||||
if (tTank != null) {
|
||||
FluidStack tDrained = drain(1000, false);
|
||||
if (tDrained != null) {
|
||||
int tFilledAmount = tTank.fill(ForgeDirection.UP, tDrained, false);
|
||||
if (tFilledAmount > 0)
|
||||
tTank.fill(ForgeDirection.UP, drain(tFilledAmount, true), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,7 +445,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@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) ? null : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP)};
|
||||
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
|
||||
|
|
|
@ -11,18 +11,13 @@ import gregtech.api.metatileentity.MetaTileEntity;
|
|||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.objects.ItemData;
|
||||
import gregtech.api.util.GT_LanguageManager;
|
||||
import gregtech.api.util.GT_Log;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.api.util.*;
|
||||
import gregtech.common.items.behaviors.Behaviour_DataOrb;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import scala.tools.nsc.symtab.SymbolLoadersStats;
|
||||
|
||||
public class GT_MetaTileEntity_Scanner
|
||||
extends GT_MetaTileEntity_BasicMachine {
|
||||
|
|
|
@ -6,7 +6,6 @@ import gregtech.api.gui.GT_GUIContainer_MultiMachine;
|
|||
import gregtech.api.interfaces.ITexture;
|
||||
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.MetaTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
|
|
|
@ -18,7 +18,6 @@ import gregtech.api.util.GT_OreDictUnificator;
|
|||
import gregtech.common.items.GT_MetaGenerated_Tool_01;
|
||||
import ic2.core.Ic2Items;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
|
|
Loading…
Reference in a new issue