diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-15 18:32:55 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-15 18:32:55 +0000 |
commit | 4965a19cdb0a4d7a6bf3cc4e4584986a2d4520fa (patch) | |
tree | fe2d540e5c56b0ef66f62e5120b45802212200b8 /src | |
parent | ab874b1c3b0a269787958ac10f69fbc2817e738e (diff) | |
download | GT5-Unofficial-4965a19cdb0a4d7a6bf3cc4e4584986a2d4520fa.tar.gz GT5-Unofficial-4965a19cdb0a4d7a6bf3cc4e4584986a2d4520fa.tar.bz2 GT5-Unofficial-4965a19cdb0a4d7a6bf3cc4e4584986a2d4520fa.zip |
$ Fixed Overflow Valves properly this time.
Diffstat (limited to 'src')
4 files changed, 88 insertions, 344 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java index 430ae44d64..ef013fa3a2 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/Meta_GT_Proxy.java @@ -1,16 +1,11 @@ package gtPlusPlus.xmod.gregtech.common; -import static gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow.mOverflowCache; - import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; -import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Timer; -import java.util.TimerTask; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @@ -29,7 +24,6 @@ import gregtech.api.util.Recipe_GT; import gregtech.common.GT_Proxy; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.ObjMap; import gtPlusPlus.api.objects.minecraft.FormattedTooltipString; import gtPlusPlus.core.handler.AchievementHandler; import gtPlusPlus.core.lib.CORE; @@ -117,7 +111,6 @@ public class Meta_GT_Proxy { } public static void init() { - scheduleCoverMapCleaner(); setValidHeatingCoilMetas(); PollutionUtils.setPollutionFluids(); fixIC2FluidNames(); @@ -435,47 +428,6 @@ public class Meta_GT_Proxy { } } - - public static void scheduleCoverMapCleaner(){ - TimerTask repeatedTask = new TimerTask() { - public void run() { - cleanupOverFlowCoverCache(); - } - }; - Timer timer = new Timer("CoverCleanupManager"); - long delay = 120000L; - long period = 300000L; - timer.scheduleAtFixedRate(repeatedTask, delay, period); - } - - public static int cleanupOverFlowCoverCache() { - ObjMap<String, ?> cache = mOverflowCache; - int aRemoved = 0; - long aCurrentTime = System.currentTimeMillis()/1000; - for (Object o : cache.values()) { - if (o != null && o instanceof HashMap) { - @SuppressWarnings("unchecked") - HashMap<String, Object> m = (HashMap<String, Object>) o; - if (m != null) { - String s = (String) m.get("aCoverKey"); - if (m.containsKey("aLastUpdatedTime")) { - long mapTime = (long) m.get("mLastUpdatedTime"); - if ((aCurrentTime-(mapTime/1000) > 30)){ - mOverflowCache.remove(s); - aRemoved++; - } - } - else { - mOverflowCache.remove(s); - aRemoved++; - } - } - } - } - return aRemoved; - } - - static GT_Proxy[] mProxies = new GT_Proxy[2]; /** diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java index b220dd74e8..1c1f9c20f9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow.java @@ -1,13 +1,9 @@ package gtPlusPlus.xmod.gregtech.common.covers; -import java.util.HashMap; - import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IMachineProgress; import gregtech.api.util.GT_CoverBehavior; import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.ObjMap; +import gtPlusPlus.core.util.minecraft.LangUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.Fluid; @@ -15,123 +11,90 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; public class GTPP_Cover_Overflow extends GT_CoverBehavior { + + public final int mTransferRate; + public final int mInitialTransferRate; public final int mMaxTransferRate; - - public static final ObjMap<String, HashMap<String, Object>> mOverflowCache = new ObjMap<String, HashMap<String, Object>>(10000, 0.5f); public GTPP_Cover_Overflow(int aTransferRate) { - this.mMaxTransferRate = aTransferRate*1000; + this.mTransferRate = aTransferRate * 1000 / 10; + this.mInitialTransferRate = aTransferRate; + this.mMaxTransferRate = aTransferRate * 1000; } public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { - - HashMap<String, Object> aCoverData = getCover(aSide, aCoverID, aCoverVariable, aTileEntity); - //Do things - - if (aCoverData != null) { - if (aCoverData.containsKey("aCoverVariable")) - return (int) aCoverData.get("aCoverVariable"); - } - - - if (aCoverVariable % 6 > 1 && aTileEntity instanceof IMachineProgress - && ((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4) { + if (aCoverVariable == 0) { return aCoverVariable; - } else { - if (aTileEntity instanceof IFluidHandler) { - IFluidHandler tTank2 = aTileEntity.getITankContainerAtSide(aSide); - if (tTank2 != null) { - IFluidHandler tTank1 = (IFluidHandler) aTileEntity; - FluidStack tLiquid; - if (aCoverVariable % 2 == 0) { - tLiquid = tTank1.drain(ForgeDirection.getOrientation(aSide), this.mMaxTransferRate, false); - if (tLiquid != null) { - tLiquid = tLiquid.copy(); - tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, - false); - if (tLiquid.amount > 0) { - if ((aCoverVariable % 2 == 0 || aSide != 1) && (aCoverVariable % 2 != 0 || aSide != 0) - && aTileEntity.getUniversalEnergyCapacity() >= (long) Math.min(1, - tLiquid.amount / 10)) { - if (aTileEntity.isUniversalEnergyStored((long) Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits((long) Math.min(1, tLiquid.amount / 10), - true); - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain( - ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true); - } - } else { - tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), - tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), - true); - } - } - } - } else { - tLiquid = tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), this.mMaxTransferRate, - false); - if (tLiquid != null) { - tLiquid = tLiquid.copy(); - tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false); - if (tLiquid.amount > 0) { - if ((aCoverVariable % 2 == 0 || aSide != 1) && (aCoverVariable % 2 != 0 || aSide != 0) - && aTileEntity.getUniversalEnergyCapacity() >= (long) Math.min(1, - tLiquid.amount / 10)) { - if (aTileEntity.isUniversalEnergyStored((long) Math.min(1, tLiquid.amount / 10))) { - aTileEntity.decreaseStoredEnergyUnits((long) Math.min(1, tLiquid.amount / 10), - true); - tTank1.fill(ForgeDirection.getOrientation(aSide), - tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), - tLiquid.amount, true), - true); - } - } else { - tTank1.fill(ForgeDirection.getOrientation(aSide), - tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), - tLiquid.amount, true), - true); - } + } + if ((aTileEntity instanceof IFluidHandler)) { + //Logger.INFO("Trying to Void via Overflow."); + IFluidHandler tTank1; + ForgeDirection directionFrom; + directionFrom = ForgeDirection.UNKNOWN; + tTank1 = (IFluidHandler) aTileEntity; + if (tTank1 != null) { + //Logger.INFO("Found Self. "+aSide); + //FluidStack aTankStack = tTank1.drain(ForgeDirection.UNKNOWN, 1, false); + FluidStack aTankStack = tTank1.getTankInfo(directionFrom)[0].fluid; + if (aTankStack != null) { + //Logger.INFO("Found Fluid inside self - "+aTankStack.getLocalizedName()+", overflow point set at "+aCoverVariable+"L and we have "+aTankStack.amount+"L inside."); + if (aTankStack.amount > aCoverVariable) { + int aAmountToDrain = aTankStack.amount - aCoverVariable; + //Logger.INFO("There is "+aAmountToDrain+" more fluid in the tank than we would like."); + if (aAmountToDrain > 0) { + FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aAmountToDrain), true); + if (tLiquid != null) { + //Logger.INFO("Drained "+aAmountToDrain+"L."); } } } } + else { + //Logger.INFO("Could not simulate drain on self."); + } } - - return aCoverVariable; } + return aCoverVariable; } public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - - - if ((double) aX > 0.375D && (double) aX < 0.625D || aSide <= 3 || (double) aY > 0.375D && (double) aY < 0.625D - || (double) aZ <= 0.375D || (double) aZ >= 0.625D) { - HashMap<String, Object> aCoverData = getCover(aSide, aCoverID, aCoverVariable, aTileEntity); - float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ); - switch ((byte) ((byte) ((int) (tCoords[0] * 2.0F)) + 2 * (byte) ((int) (tCoords[1] * 2.0F)))) { - case 0 : - aCoverVariable -= 1000; - break; - case 1 : - aCoverVariable += 1000; - break; - case 2 : - aCoverVariable -= 32000; - break; - case 3 : - aCoverVariable += 32000; - } - aCoverData.remove("aCoverVariable"); - aCoverData.put("aCoverVariable", aCoverVariable); - updateCoverMap(aCoverData); - + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += aPlayer.isSneaking() ? 4096 : 1024; + } else { + aCoverVariable -= aPlayer.isSneaking() ? 4096 : 1024; } - GT_Utility.sendChatToPlayer(aPlayer, "Overflow Limit: " + aCoverVariable); - + if (aCoverVariable > mMaxTransferRate) { + aCoverVariable = mInitialTransferRate; + } + if (aCoverVariable <= 0) { + aCoverVariable = mInitialTransferRate; + } + GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); return aCoverVariable; } + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + boolean aShift = aPlayer.isSneaking(); + int aAmount = aShift ? 128 : 8; + if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { + aCoverVariable += aAmount; + } else { + aCoverVariable -= aAmount; + } + if (aCoverVariable > mMaxTransferRate) { + aCoverVariable = mInitialTransferRate; + } + if (aCoverVariable <= 0) { + aCoverVariable = mInitialTransferRate; + } + GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); + aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); + return true; + } + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { return true; } @@ -157,17 +120,11 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior { } public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aCoverVariable > 1 && aTileEntity instanceof IMachineProgress - && ((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4 - ? false - : aCoverVariable >= 6 || aCoverVariable % 2 != 0; + return false; } public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return aCoverVariable > 1 && aTileEntity instanceof IMachineProgress - && ((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable % 6 < 4 - ? false - : aCoverVariable >= 6 || aCoverVariable % 2 == 0; + return true; } public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { @@ -175,39 +132,6 @@ public class GTPP_Cover_Overflow extends GT_CoverBehavior { } public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 1; - } - - public HashMap<String, Object> getCover(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity){ - //Map this cover - String aTileDataKey = "|"+aTileEntity.getXCoord()+"|"+aTileEntity.getYCoord()+"|"+aTileEntity.getZCoord()+"|"+aTileEntity.getWorld().provider.dimensionId+"|"+aSide+"|"; - HashMap<String, Object> aTileData; - long aCurrentTime = System.currentTimeMillis(); - if (mOverflowCache.get(aTileDataKey) != null) { - aTileData = mOverflowCache.get(aTileDataKey); - aTileData.remove("aLastUpdatedTime"); - aTileData.put("aLastUpdateTime", aCurrentTime); - //Logger.INFO("Found Existing Cover in Cache."); - } - else { - aTileData = new HashMap<String, Object>(); - aTileData.put("aCoverKey", aTileDataKey); - aTileData.put("aSide", aSide); - aTileData.put("aCoverID", aCoverID); - aTileData.put("aCoverVariable", aCoverVariable); - aTileData.put("aLastUpdateTime", aCurrentTime); - mOverflowCache.put(aTileDataKey, aTileData); - Logger.INFO("Adding new Cover to Cache. Storing under key: "+aTileDataKey); - } - return aTileData; - } - - public void updateCoverMap(HashMap<String, Object> aCoverData) { - String mAccessKey = (String) aCoverData.get("aCoverKey"); - if (mOverflowCache.get(mAccessKey) != null) { - mOverflowCache.remove(mAccessKey); - } - mOverflowCache.put(mAccessKey, aCoverData); - return; + return 5; } -}
\ No newline at end of file +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow2.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow2.java deleted file mode 100644 index 92131c3928..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow2.java +++ /dev/null @@ -1,139 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.covers; - -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.LangUtils; -import gtPlusPlus.core.util.sys.KeyboardUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidHandler; - -public class GTPP_Cover_Overflow2 extends GT_CoverBehavior { - - public final int mTransferRate; - public final int mInitialTransferRate; - public final int mMaxTransferRate; - - public GTPP_Cover_Overflow2(int aTransferRate) { - this.mTransferRate = aTransferRate * 1000 / 10; - this.mInitialTransferRate = aTransferRate; - this.mMaxTransferRate = aTransferRate * 1000; - } - - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { - if (aCoverVariable == 0) { - return aCoverVariable; - } - if ((aTileEntity instanceof IFluidHandler)) { - //Logger.INFO("Trying to Void via Overflow."); - IFluidHandler tTank1; - ForgeDirection directionFrom; - directionFrom = ForgeDirection.UNKNOWN; - tTank1 = (IFluidHandler) aTileEntity; - if (tTank1 != null) { - //Logger.INFO("Found Self. "+aSide); - //FluidStack aTankStack = tTank1.drain(ForgeDirection.UNKNOWN, 1, false); - FluidStack aTankStack = tTank1.getTankInfo(directionFrom)[0].fluid; - if (aTankStack != null) { - //Logger.INFO("Found Fluid inside self - "+aTankStack.getLocalizedName()+", overflow point set at "+aCoverVariable+"L and we have "+aTankStack.amount+"L inside."); - if (aTankStack.amount > aCoverVariable) { - int aAmountToDrain = aTankStack.amount - aCoverVariable; - Logger.INFO("There is "+aAmountToDrain+" more fluid in the tank than we would like."); - if (aAmountToDrain > 0) { - FluidStack tLiquid = tTank1.drain(directionFrom, Math.abs(aAmountToDrain), true); - if (tLiquid != null) { - Logger.INFO("Drained "+aAmountToDrain+"L."); - } - } - } - } - else { - //Logger.INFO("Could not simulate drain on self."); - } - } - } - return aCoverVariable; - } - - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += aPlayer.isSneaking() ? 4096 : 1024; - } else { - aCoverVariable -= aPlayer.isSneaking() ? 4096 : 1024; - } - if (aCoverVariable > mMaxTransferRate) { - aCoverVariable = mInitialTransferRate; - } - if (aCoverVariable <= 0) { - aCoverVariable = mInitialTransferRate; - } - GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); - return aCoverVariable; - } - - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - boolean aShift = aPlayer.isSneaking(); - int aAmount = aShift ? 128 : 8; - if (GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ)[0] >= 0.5F) { - aCoverVariable += aAmount; - } else { - aCoverVariable -= aAmount; - } - if (aCoverVariable > mMaxTransferRate) { - aCoverVariable = mInitialTransferRate; - } - if (aCoverVariable <= 0) { - aCoverVariable = mInitialTransferRate; - } - GT_Utility.sendChatToPlayer(aPlayer, LangUtils.trans("009", "Overflow point: ") + aCoverVariable + trans("010", "L")); - aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); - return true; - } - - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return true; - } - - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } - - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return true; - } - - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return true; - } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 5; - } -} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index 15934784a3..5d4cf5ea94 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -2,20 +2,26 @@ package gtPlusPlus.xmod.gregtech.common.items; import static gtPlusPlus.core.util.Utils.getTcAspectStack; -import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemStack; - import gregtech.api.GregTech_API; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; +import gregtech.api.enums.TC_Aspects; +import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; -import gregtech.api.objects.*; -import gregtech.api.util.*; +import gregtech.api.objects.GT_MultiTexture; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.GT_FoodStat; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.Recipe_GT; import gregtech.common.covers.GT_Cover_Arm; import gregtech.common.covers.GT_Cover_Conveyor; import gregtech.common.covers.GT_Cover_Pump; import gregtech.common.items.behaviors.Behaviour_DataOrb; import gregtech.common.items.behaviors.Behaviour_DataStick; - import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.handler.OldCircuitHandler; import gtPlusPlus.core.lib.CORE; @@ -29,8 +35,9 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials; import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow; -import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow2; import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual; +import net.minecraft.item.EnumAction; +import net.minecraft.item.ItemStack; public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { @@ -263,12 +270,12 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { GregtechItemList.Cover_Overflow_EV.set(this.addItem(75, "Overflow Valve (EV)", "Maximum void amount: 32768000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); GregtechItemList.Cover_Overflow_IV.set(this.addItem(76, "Overflow Valve (IV)", "Maximum void amount: 262144000", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L), getTcAspectStack(TC_Aspects.AQUA, 1L)})); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow2(8)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow2(64)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow2(512)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow2(4096)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow2(32768)); - GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow2(262144)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_ULV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(8)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_LV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(64)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_MV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(512)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_HV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(4096)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_EV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(32768)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(262144)); //Fusion Reactor MK4 Singularity GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)")); |