diff options
Diffstat (limited to 'src/Java/gtPlusPlus')
6 files changed, 412 insertions, 19 deletions
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java index 37428b18d6..badd318414 100644 --- a/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java +++ b/src/Java/gtPlusPlus/core/item/chemistry/CoalTar.java @@ -5,7 +5,6 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.minecraft.ItemPackage; -import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.Utils; @@ -289,6 +288,7 @@ public class CoalTar extends ItemPackage { FluidStack aGtAcid = FluidUtils.getFluidStack("phtalicacid", 500); if (aMyAcid != null && aGtAcid != null) { CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(8), aMyAcid, aGtAcid, null, 50, 16, false); + CORE.RA.addDistilleryRecipe(CI.getNumberedBioCircuit(9), aGtAcid, aMyAcid, null, 50, 16, false); } } @@ -354,7 +354,7 @@ public class CoalTar extends ItemPackage { Naphthalene = FluidUtils.generateFluidNonMolten("Naphthalene", "Naphthalene", 115, new short[]{210, 185, 135, 100}, null, null); // v - Oxidize with mercury and nitric acid //Create Phthalic Acid - Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phtalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); + Phthalic_Acid = FluidUtils.generateFluidNonMolten("PhthalicAcid", "Phthalic Acid", 207, new short[]{210, 220, 210, 100}, null, null); // v - Dehydrate at 180C+ //Create Phthalic Anhydride //ItemUtils.generateSpecialUseDusts("PhthalicAnhydride", "Phthalic Anhydride", "C6H4(CO)2O", Utils.rgbtoHexValue(175, 175, 175)); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index d152e9afd2..817683cb1e 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -108,16 +108,16 @@ public class RECIPES_GREGTECH { addFuels(); } - + private static void chemplantRecipes() { //This is subsequently absorbed in water to form nitric acid and nitric oxide. - //3 NO2 (g) + H2O (l) → 2 HNO3 (aq) + NO (g) (ΔH = −117 kJ/mol) - //The nitric oxide is cycled back for reoxidation. Alternatively, if the last step is carried out in air: - //4 NO2 (g) + O2 (g) + 2 H2O (l) → 4 HNO3 (aq) - + //3 NO2 (g) + H2O (l) → 2 HNO3 (aq) + NO (g) (ΔH = −117 kJ/mol) + //The nitric oxide is cycled back for reoxidation. Alternatively, if the last step is carried out in air: + //4 NO2 (g) + O2 (g) + 2 H2O (l) → 4 HNO3 (aq) + // Advanced method for Nitric Acid Production CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -158,7 +158,7 @@ public class RECIPES_GREGTECH { FLUORIDES.FLUORITE.getOre(4), }, new FluidStack[] { - + }, new int[] { 0, 2500, 2000, 1500 @@ -166,7 +166,7 @@ public class RECIPES_GREGTECH { 10 * 20, 1024, 5); - + // Advanced recipe for Fluorine Production CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -186,7 +186,7 @@ public class RECIPES_GREGTECH { FLUORIDES.FLUORITE.getOre(2), }, new FluidStack[] { - + }, new int[] { 7500, 1500, 1000, 500 @@ -194,7 +194,7 @@ public class RECIPES_GREGTECH { 10 * 20, 1024, 5); - + CORE.RA.addChemicalPlantRecipe( new ItemStack[] { CI.getNumberedAdvancedCircuit(16), @@ -214,7 +214,7 @@ public class RECIPES_GREGTECH { 10 * 20, 480, 2); - + // Produce Boric Acid CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -235,7 +235,7 @@ public class RECIPES_GREGTECH { 20 * 30, MaterialUtils.getVoltageForTier(3), 3); - + // Produce Th232 CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -261,7 +261,7 @@ public class RECIPES_GREGTECH { 20 * 300, MaterialUtils.getVoltageForTier(4), 4); - + // Modify Sapling into Pine Sapling CORE.RA.addChemicalPlantRecipe( new ItemStack[] { @@ -276,12 +276,68 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine, 16) }, new FluidStack[] { - + }, 120 * 20, 64, 2); + + // Convert GT++ Plutonium239 into normal Plutonium + if (Materials.Plutonium.mDefaultLocalName.equals("Plutonium 239")) { + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getSmallDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustSmallPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedAdvancedCircuit(16), + ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1) + }, + new FluidStack[] { + + }, + new ItemStack[] { + ItemUtils.getItemStackOfAmountFromOreDict("dustTinyPlutonium", 1) + }, + new FluidStack[] { + + }, + 5 * 20, + 1, + 2); + } + } private static void fluidheaterRecipes() { @@ -607,7 +663,7 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(ModItems.itemChargePack_High_3, 1), ItemUtils.getSimpleStack(ModItems.itemChargePack_High_4, 1), }; - + int aCurrSlot = 0; for (int h = 6; h < 10; h++) { CORE.RA.addAssemblylineRecipe( diff --git a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java index f0b93a32dc..137b05d85a 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/HazmatUtils.java @@ -3,6 +3,7 @@ package gtPlusPlus.core.util.minecraft; import static gregtech.api.GregTech_API.*; import java.lang.reflect.Field; +import java.lang.reflect.Method; import java.util.HashMap; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -101,6 +102,143 @@ public class HazmatUtils { addProtection(aItem); } Logger.INFO("[Hazmat] Registered EMT Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("DraconicEvolution")) { + AutoMap<Field> aItemFields = new AutoMap<Field>(); + Class aItemsDE = ReflectionUtils.getClass("com.brandon3055.draconicevolution.ModItems"); + + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicChest")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicLeggs")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "draconicBoots")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernChest")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernLeggs")); + aItemFields.add(ReflectionUtils.getField(aItemsDE, "wyvernBoots")); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsDE.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Draconic Evolution Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Draconic Evolution Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("TaintedMagic")) { + AutoMap<Field> aItemFields = new AutoMap<Field>(); + Class aItemsTaintedMagic = ReflectionUtils.getClass("taintedmagic.common.registry.ItemRegistry"); + + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressHelmet")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressChestplate")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemShadowFortressLeggings")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemVoidwalkerBoots")); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Tainted Magic Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Tainted Magic Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("WitchingGadgets")) { + AutoMap<Field> aItemFields = new AutoMap<Field>(); + Class aItemsTaintedMagic = ReflectionUtils.getClass("witchinggadgets.common.WGContent"); + + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialHelm")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialChest")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialLegs")); + aItemFields.add(ReflectionUtils.getField(aItemsTaintedMagic, "ItemPrimordialBoots")); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + for (Field aItemField : aItemFields) { + Item aItemObject = null; + if (aItemField != null) { + try { + aItemObject = (Item) aItemField.get(null); + } + catch (Exception t) { + t.printStackTrace(); + } + } + if (aItemObject != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get "+aItemField.getName()+" from "+aItemsTaintedMagic.getName()); + } + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Witching Gadgets Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Witching Gadgets Items as hazmat gear."); + } + + if (LoadedMods.isModLoaded("ThaumicTinkerer")) { + AutoMap<Item> aItems = new AutoMap<Item>(); + Class aMainTT = ReflectionUtils.getClass("thaumic.tinkerer.common.ThaumicTinkerer"); + Class aItemRegistryTT = ReflectionUtils.getClass("thaumic.tinkerer.common.registry.TTRegistry"); + Field aRegistryInstance = ReflectionUtils.getField(aMainTT, "registry"); + Object aRegistry = ReflectionUtils.getFieldValue(aRegistryInstance); + Method aFuckingStupidMethodHandlingMethod = ReflectionUtils.getMethod(aItemRegistryTT, "getFirstItemFromClass", new Class[] {Class.class}); + Item aIchorHelm = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemHelm")}); + Item aIchorChest = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemChest")}); + Item aIchorLegs = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemLegs")}); + Item aIchorBoots = (Item) ReflectionUtils.invokeNonBool(aRegistry, aFuckingStupidMethodHandlingMethod, new Object[] {ReflectionUtils.getClass("thaumic.tinkerer.common.item.kami.armor.ItemGemBoots")}); + aItems.add(aIchorHelm); + aItems.add(aIchorChest); + aItems.add(aIchorLegs); + aItems.add(aIchorBoots); + AutoMap<ItemStack> aItemMap = new AutoMap<ItemStack>(); + int aIndex = 0; + for (Item aItem : aItems) { + Item aItemObject = null; + if (aItem != null) { + aItemMap.add(ItemUtils.getSimpleStack(aItemObject)); + } + else { + Logger.INFO("[Hazmat] Could not get item "+aIndex+" from "+aItemRegistryTT.getName()); + } + aIndex++; + } + Logger.INFO("[Hazmat] Registering "+aItemMap.size()+" Thaumic Tinkerer Items as hazmat gear."); + for (ItemStack aItem : aItemMap) { + addProtection(aItem); + } + Logger.INFO("[Hazmat] Registered Thaumic Tinkerer Items as hazmat gear."); } if (LoadedMods.isModLoaded("GraviSuite")) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 161ba24378..53bb8d8410 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -705,6 +705,9 @@ public enum GregtechItemList implements GregtechItemContainer { //Fluid Void Covers Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV, + //Item Void Covers + Cover_Overflow_Item_ULV, Cover_Overflow_Item_LV, Cover_Overflow_Item_MV, Cover_Overflow_Item_HV, Cover_Overflow_Item_EV, Cover_Overflow_Item_IV, + //Fake Hull Covers FakeMachineCasingPlate_ULV, FakeMachineCasingPlate_LV, FakeMachineCasingPlate_MV, FakeMachineCasingPlate_HV, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java new file mode 100644 index 0000000000..0299447694 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_Overflow_Item.java @@ -0,0 +1,182 @@ +package gtPlusPlus.xmod.gregtech.common.covers; + +import java.lang.reflect.Field; +import java.util.HashMap; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.LangUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; + +public class GTPP_Cover_Overflow_Item extends GT_CoverBehavior { + + public final int mInitialCapacity; + public final int mMaxItemCapacity; + + public static final Class sQuantumChest; + public static final Class sSuperChestGTPP; + public static final Class sSuperChestGTNH; + public static HashMap<Integer, Field> mItemAmountFields = new HashMap<Integer, Field>(); + public static HashMap<Integer, Field> mItemTypeFields = new HashMap<Integer, Field>(); + + static { + sQuantumChest = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest"); + sSuperChestGTPP = ReflectionUtils.getClass("gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest"); + if (CORE.GTNH) { + sSuperChestGTNH = ReflectionUtils.getClass("gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest"); + } + else { + sSuperChestGTNH = null; + } + if (sQuantumChest != null) { + mItemAmountFields.put(0, ReflectionUtils.getField(sQuantumChest, "mItemCount")); + mItemTypeFields.put(0, ReflectionUtils.getField(sQuantumChest, "mItemStack")); + } + if (sSuperChestGTPP != null) { + mItemAmountFields.put(1, ReflectionUtils.getField(sSuperChestGTPP, "mItemCount")); + mItemTypeFields.put(1, ReflectionUtils.getField(sSuperChestGTPP, "mItemStack")); + } + if (sSuperChestGTNH != null) { + mItemAmountFields.put(2, ReflectionUtils.getField(sSuperChestGTNH, "mItemCount")); + mItemTypeFields.put(2, ReflectionUtils.getField(sSuperChestGTNH, "mItemStack")); + } + } + + public GTPP_Cover_Overflow_Item(int aCapacity) { + this.mInitialCapacity = aCapacity; + this.mMaxItemCapacity = aCapacity * 1000; + } + + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + if (aCoverVariable == 0) { + return aCoverVariable; + } + + // Get the IGTTile + IGregTechTileEntity aGtTileEntity = aTileEntity.getIGregTechTileEntity(aTileEntity.getXCoord(), aTileEntity.getYCoord(), aTileEntity.getZCoord()); + if (aGtTileEntity == null) { + return aCoverVariable; + } + + // Get the MetaTile + final IMetaTileEntity aMetaTileEntity = aGtTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return aCoverVariable; + } + boolean didHandle = false; + // Special Case for everything I want to support. /facepalm + if (sQuantumChest != null && sQuantumChest.isInstance(aMetaTileEntity)) { + didHandle = handleDigitalChest(aMetaTileEntity, 0); + } + else if (sSuperChestGTPP.isInstance(aMetaTileEntity)) { + didHandle = handleDigitalChest(aMetaTileEntity, 1); + + } + else if (CORE.GTNH && sSuperChestGTNH != null && sSuperChestGTNH.isInstance(aMetaTileEntity)) { + didHandle = handleDigitalChest(aMetaTileEntity, 2); + } + + return aCoverVariable; + } + + private boolean handleDigitalChest(IMetaTileEntity aTile, int aType) { + int aItemAmount = (int) ReflectionUtils.getFieldValue(mItemAmountFields.get(aType), aTile); + ItemStack aItemType = (ItemStack) ReflectionUtils.getFieldValue(mItemTypeFields.get(aType), aTile); + + if (aItemType == null || aItemAmount <= 0) { + return false; + } + else { + if (aItemAmount > mInitialCapacity) { + int aNewItemAmount = mInitialCapacity; + ReflectionUtils.setField(aTile, mItemAmountFields.get(aType), aNewItemAmount); + } + } + return true; + } + + 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 += (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f)); + } else { + aCoverVariable -= (mMaxItemCapacity * (aPlayer.isSneaking() ? 0.1f : 0.01f)); + } + if (aCoverVariable > mMaxItemCapacity) { + aCoverVariable = mInitialCapacity; + } + if (aCoverVariable <= 0) { + aCoverVariable = mMaxItemCapacity; + } + 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 > mMaxItemCapacity) { + aCoverVariable = mInitialCapacity; + } + if (aCoverVariable <= 0) { + aCoverVariable = mMaxItemCapacity; + } + 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 1472ff9f23..c2e88305ad 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -35,6 +35,7 @@ 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_Overflow_Item; import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_ToggleVisual; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; @@ -370,9 +371,22 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { GregtechItemList.Chip_MultiNerf_NoOutputBonus.set(this.addItem(160, "No-Bonus Chip", "You won't like using this")); GregtechItemList.Chip_MultiNerf_NoSpeedBonus.set(this.addItem(161, "No-Bonus Chip", "You won't like using this")); - GregtechItemList.Chip_MultiNerf_NoEuBonus.set(this.addItem(162, "No-Bonus Chip", "You won't like using this")); - - + GregtechItemList.Chip_MultiNerf_NoEuBonus.set(this.addItem(162, "No-Bonus Chip", "You won't like using this")); + + + GregtechItemList.Cover_Overflow_Item_ULV.set(this.addItem(165, "Item Overflow Valve (ULV)", "Maximum void amount: 8000", 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_Item_LV.set(this.addItem(166, "Item Overflow Valve (LV)", "Maximum void amount: 64000", 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_Item_MV.set(this.addItem(167, "Item Overflow Valve (MV)", "Maximum void amount: 512000", 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_Item_HV.set(this.addItem(168, "Item Overflow Valve (HV)", "Maximum void amount: 4096000", 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_Item_EV.set(this.addItem(169, "Item 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_Item_IV.set(this.addItem(170, "Item 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_Item_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_Item(8)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_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_Item(64)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_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_Item(512)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_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_Item(4096)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_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_Item(32768)); + GregTech_API.registerCover(GregtechItemList.Cover_Overflow_Item_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_Item(262144)); } |