From f97698b054c1d3ef1544365a65ccd90ba8d3bb6c Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sat, 15 Oct 2016 15:42:45 +0200 Subject: Catch crash with Fossils Archeology Revival #642 --- src/main/java/gregtech/api/util/GT_Utility.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index f14d4ad08f..31cf28b250 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -863,6 +863,7 @@ public class GT_Utility { ItemStack[] tStack = GT_OreDictUnificator.getStackArray(true, aOutput); if(tStack==null||(tStack.length>0&>_Utility.areStacksEqual(aInput, tStack[0])))return false; if (tOreName != null) { + if(tOreName.toString().equals("dustAsh")&&tStack[0].getUnlocalizedName().equals("tile.volcanicAsh"))return false; aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, tStack)); } else { aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, tStack)); -- cgit From 6c4f17d52edaba38d1cf4a5e1f7488c1a70c9b59 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sat, 22 Oct 2016 23:19:32 +0200 Subject: Try to move full stack into targed inventory, not single operation. --- src/main/java/gregtech/api/util/GT_Utility.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 31cf28b250..a6dff31d62 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -531,16 +531,17 @@ public class GT_Utility { } for (int i = 0; i < tGrabSlots.length; i++) { + byte tMovedItemCount = 0; for (int j = 0; j < tPutSlots.length; j++) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(tGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, aTileEntity1.getStackInSlot(tGrabSlots[i]))) { if (isAllowedToPutIntoSlot((IInventory) aTileEntity2, tPutSlots[j], aPutTo, aTileEntity1.getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) { - byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); - if (tMovedItemCount > 0) return tMovedItemCount; + tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, (IInventory) aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); } } } } + if (tMovedItemCount > 0) return tMovedItemCount; } if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) { -- cgit From 4b29e30e75474cc601dc8e0f23b4b3ff49a19f5b Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sun, 23 Oct 2016 00:30:24 +0200 Subject: Fix droping of items when pulling from doublechests --- src/main/java/gregtech/api/util/GT_Utility.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index a6dff31d62..a16c4213dd 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -353,13 +353,21 @@ public class GT_Utility { return ((buildcraft.api.transport.IPipeTile) aTileEntity).isPipeConnected(ForgeDirection.getOrientation(aSide)); return false; } - /** * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. * * @return the Amount of moved Items */ public static byte moveStackIntoPipe(IInventory aTileEntity1, Object aTileEntity2, int[] aGrabSlots, int aGrabFrom, int aPutTo, List aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { + return moveStackIntoPipe(aTileEntity1, aTileEntity2, aGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, true); + } + + /** + * Moves Stack from Inv-Slot to Inv-Slot, without checking if its even allowed. + * + * @return the Amount of moved Items + */ + public static byte moveStackIntoPipe(IInventory aTileEntity1, Object aTileEntity2, int[] aGrabSlots, int aGrabFrom, int aPutTo, List aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, boolean dropItem) { if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMaxMoveAtOnce <= 0 || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; if (aTileEntity2 != null) { @@ -408,7 +416,7 @@ public class GT_Utility { ForgeDirection tDirection = ForgeDirection.getOrientation(aGrabFrom); if (aTileEntity1 instanceof TileEntity && tDirection != ForgeDirection.UNKNOWN && tDirection.getOpposite() == ForgeDirection.getOrientation(aPutTo)) { int tX = ((TileEntity) aTileEntity1).xCoord + tDirection.offsetX, tY = ((TileEntity) aTileEntity1).yCoord + tDirection.offsetY, tZ = ((TileEntity) aTileEntity1).zCoord + tDirection.offsetZ; - if (!hasBlockHitBox(((TileEntity) aTileEntity1).getWorldObj(), tX, tY, tZ)) { + if (!hasBlockHitBox(((TileEntity) aTileEntity1).getWorldObj(), tX, tY, tZ) && dropItem) { for (int i = 0; i < aGrabSlots.length; i++) { if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte) aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { @@ -578,7 +586,7 @@ public class GT_Utility { } } - return moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); + return moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aDoCheckChests); } /** -- cgit From b3ed735ef2e9fbf155bc07fc9dd686373d73a11b Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 30 Oct 2016 11:09:24 +0100 Subject: Fix for Scanner being derp when looking @ pollution --- src/main/java/gregtech/api/util/GT_Utility.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index a16c4213dd..fe3565cd9f 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1754,7 +1754,7 @@ public class GT_Utility { tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(aX/16, 1, aZ/16); + ChunkPosition tPos = new ChunkPosition(aX>>4, 1, aZ>>4); if(GT_Proxy.chunkData.containsKey(tPos)){ int[] tPollution = GT_Proxy.chunkData.get(tPos); if(tPollution.length>1){ @@ -2075,4 +2075,4 @@ public class GT_Utility { } } -} \ No newline at end of file +} -- cgit From 60328e2adff7cc017f5c9d8f177698e5cd438e07 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 23 Dec 2016 18:01:36 +0100 Subject: Fix oil only be found on second scan --- src/main/java/gregtech/api/util/GT_Utility.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index fe3565cd9f..25703274ff 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1550,7 +1550,7 @@ public class GT_Utility { if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); if(tInts.length>0){ - if(tInts[0]>=0){tAmount = tInts[0];} + if(tInts[0]>0){tAmount = tInts[0];} } GT_Proxy.chunkData.remove(tPos); } -- cgit From 4aa8fd45c4258b183e86c95ea79c57e9aa24400e Mon Sep 17 00:00:00 2001 From: KpoxaPy Date: Thu, 5 Jan 2017 02:45:01 +0300 Subject: Add advanced seismic prospector --- src/main/java/gregtech/api/enums/ItemList.java | 2 +- src/main/java/gregtech/api/util/GT_Utility.java | 175 +++++++++++++++- .../GT_MetaTileEntity_AdvSeismicProspector.java | 221 +++++++++++++++++++++ .../preload/GT_Loader_MetaTileEntities.java | 2 + 4 files changed, 389 insertions(+), 11 deletions(-) create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index f68ecbade8..7998ba7de3 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -632,7 +632,7 @@ public enum ItemList implements IItemContainer { Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_TungstenSteel, Casing_Coil_HSSG, Casing_Coil_Naquadah, Casing_Coil_NaquadahAlloy, MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, MobRep_LuV, MobRep_ZPM, MobRep_UV, Cover_PlayerDetector, Machine_Multi_HeatExchanger, Block_BronzePlate, Block_IridiumTungstensteel, Block_Plascrete, Block_TungstenSteelReinforced, - Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, OilDrill, AdvancedMiner2, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite, + Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, Seismic_Prospector_Adv, OilDrill, AdvancedMiner2, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite, Battery_Charger_4by4_ULV, Battery_Charger_4by4_LV, Battery_Charger_4by4_MV, Battery_Charger_4by4_HV, Battery_Charger_4by4_EV, Battery_Charger_4by4_IV, Battery_Charger_4by4_LuV, Battery_Charger_4by4_ZPM, Battery_Charger_4by4_UV, Battery_Charger_4by4_MAX, MicroTransmitter_HV, MicroTransmitter_EV, MicroTransmitter_IV, MicroTransmitter_LUV, MicroTransmitter_ZPM, Crop_Drop_Bauxite, Crop_Drop_Ilmenite, Crop_Drop_Pitchblende, Crop_Drop_Uraninite, Crop_Drop_Thorium, Crop_Drop_Nickel, Crop_Drop_Zinc, Crop_Drop_Manganese, Crop_Drop_Scheelite, Crop_Drop_Platinum, Crop_Drop_Iridium, Crop_Drop_Osmium, Crop_Drop_Naquadah, Uraniumcell_1, Uraniumcell_2, Uraniumcell_4, Moxcell_1, Moxcell_2, Moxcell_4, diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 25703274ff..b652696d16 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1867,6 +1867,58 @@ public class GT_Utility { return formatter.format(aNumber); } + /* + * Check if stack has enough items of given type and subtract from stack, if there's no creative or 111 stack. + */ + public static boolean consumeItems(EntityPlayer player, ItemStack stack, Item item, int count) { + if (stack != null && stack.getItem() == item && stack.stackSize >= count) { + if ((!player.capabilities.isCreativeMode) && (stack.stackSize != 111)) + stack.stackSize -= count; + return true; + } + return false; + } + + /* + * Check if stack has enough items of given gregtech material (will be oredicted) + * and subtract from stack, if there's no creative or 111 stack. + */ + public static boolean consumeItems(EntityPlayer player, ItemStack stack, gregtech.api.enums.Materials mat, int count) { + if (stack != null + && GT_OreDictUnificator.getItemData(stack).mMaterial.mMaterial == mat + && stack.stackSize >= count) { + if ((!player.capabilities.isCreativeMode) && (stack.stackSize != 111)) + stack.stackSize -= count; + return true; + } + return false; + } + + public static ArrayList sortByValueToList( Map map ) + { + List> list = + new LinkedList>( map.entrySet() ); + Collections.sort( list, new Comparator>() + { + public int compare( Map.Entry o1, Map.Entry o2 ) + { + return o2.getValue() - o1.getValue(); + } + } ); + + ArrayList result = new ArrayList(); + for (Map.Entry e : list) + result.add(e.getKey()); + return result; + } + + public static String joinListToString(List list) { + String result = ""; + for (String s : list) + result += (result.isEmpty() ? "" : "|") + s; + return result; + } + public static class ItemNBT { public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) { if (aNBT == null) { @@ -1954,21 +2006,124 @@ public class GT_Utility { setNBT(aStack, tNBT); } + public static void setAdvancedProspectionData( + byte aTier, + ItemStack aStack, + int aX, short aY, int aZ, int aDim, + ArrayList aOils, + ArrayList aNearOres, + ArrayList aMiddleOres, + ArrayList aFarOres, + int aNear, int aMiddle, int aRadius) { + + setBookTitle(aStack, "Raw Prospection Data"); + + NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); + + tNBT.setByte("prospection_tier", aTier); + tNBT.setString("prospection_pos", "X: " + aX + " Y: " + aY + " Z: " + aZ + " Dim: " + aDim); + + // ores + tNBT.setString("prospection_near", joinListToString(aNearOres)); + tNBT.setString("prospection_middle", joinListToString(aMiddleOres)); + tNBT.setString("prospection_far", joinListToString(aFarOres)); + + // oils + ArrayList tOilsTransformed = new ArrayList(aOils.size()); + for (String aStr : aOils) { + String[] aStats = aStr.split(","); + tOilsTransformed.add(aStats[3] + " " + aStats[2] + "L"); + } + tNBT.setString("prospection_oils", joinListToString(tOilsTransformed)); + + tNBT.setString("prospection_bounds", aNear + "|" + aMiddle + "|" + aRadius); + + setNBT(aStack, tNBT); + } + public static void convertProspectionData(ItemStack aStack) { NBTTagCompound tNBT = getNBT(aStack); - String tData = tNBT.getString("prospection"); - String[] tDataArray = tData.split(","); - if (tDataArray.length > 6) { - tNBT.setString("author", "X: " + tDataArray[0] + " Y: " + tDataArray[1] + " Z: " + tDataArray[2] + " Dim: " + tDataArray[3]); - NBTTagList tNBTList = new NBTTagList(); - String tOres = " Prospected Ores: "; - for (int i = 6; tDataArray.length > i; i++) { - tOres += (tDataArray[i] + " "); + byte tTier = tNBT.getByte("prospection_tier"); + + if (tTier == 0) { // basic prospection data + String tData = tNBT.getString("prospection"); + String[] tDataArray = tData.split(","); + if (tDataArray.length > 6) { + tNBT.setString("author", "X: " + tDataArray[0] + " Y: " + tDataArray[1] + " Z: " + tDataArray[2] + " Dim: " + tDataArray[3]); + NBTTagList tNBTList = new NBTTagList(); + String tOres = " Prospected Ores: "; + for (int i = 6; tDataArray.length > i; i++) { + tOres += (tDataArray[i] + " "); + } + tNBTList.appendTag(new NBTTagString("Prospection Data From: X" + tDataArray[0] + " Z:" + tDataArray[2] + " Dim:" + tDataArray[3] + " Produces " + tDataArray[4] + "L " + tDataArray[5] + " " + tOres)); + tNBT.setTag("pages", tNBTList); } - tNBTList.appendTag(new NBTTagString("Prospection Data From: X" + tDataArray[0] + " Z:" + tDataArray[2] + " Dim:" + tDataArray[3] + " Produces " + tDataArray[4] + "L " + tDataArray[5] + " " + tOres)); + setNBT(aStack, tNBT); + } else { // advanced prospection data + String tPos = tNBT.getString("prospection_pos"); + String[] tBounds = tNBT.getString("prospection_bounds").split("\\|"); + + String tNearOresStr = tNBT.getString("prospection_near"); + String tMiddleOresStr = tNBT.getString("prospection_middle"); + String tFarOresStr = tNBT.getString("prospection_far"); + String tOilsStr = tNBT.getString("prospection_oils"); + + String[] tNearOres = tNearOresStr.isEmpty() ? null : tNearOresStr.split("\\|"); + String[] tMiddleOres = tMiddleOresStr.isEmpty() ? null : tMiddleOresStr.split("\\|"); + String[] tFarOres = tFarOresStr.isEmpty() ? null : tFarOresStr.split("\\|"); + String[] tOils = tOilsStr.isEmpty() ? null : tOilsStr.split("\\|"); + + NBTTagList tNBTList = new NBTTagList(); + + String tPageText = "Advanced prospection\n" + + tPos + "\n" + + "Results:\n" + + "- Close Range Ores: " + (tNearOres != null ? tNearOres.length : 0) + "\n" + + "- Mid Range Ores: " + (tMiddleOres != null ? tMiddleOres.length : 0) + "\n" + + "- Far Range Ores: " + (tFarOres != null ? tFarOres.length : 0) + "\n" + + "- Oils: " + (tOils != null ? tOils.length : 0) + "\n\n" + + "Lists was sorted by volume"; + tNBTList.appendTag(new NBTTagString(tPageText)); + + if (tNearOres != null) + fillBookWithList(tNBTList, "Close Range Ores%s\n\n", ", ", 20, tNearOres); + if (tMiddleOres != null) + fillBookWithList(tNBTList, "Mid Range Ores%s\n\n", ", ", 20, tMiddleOres); + if (tFarOres != null) + fillBookWithList(tNBTList, "Far Range Ores%s\n\n", ", ", 20, tFarOres); + if (tOils != null) + fillBookWithList(tNBTList, "Oils%s\n\n", "\n", 9, tOils); + + tPageText = "Notes\n\n" + + "Close range:\nR <= " + tBounds[0] + "\n" + + "Mid range:\n" + tBounds[0] + " < R <= " + tBounds[1] + "\n" + + "Far range:\n" + tBounds[1] + " < R <= " + tBounds[2]; + tNBTList.appendTag(new NBTTagString(tPageText)); + + tNBT.setString("author", tPos); tNBT.setTag("pages", tNBTList); + setNBT(aStack, tNBT); } - setNBT(aStack, tNBT); + } + + public static void fillBookWithList(NBTTagList aBook, String aPageHeader, String aListDelimiter, int aItemsPerPage, String[] list) { + String aPageFormatter = " %d/%d"; + int tTotalPages = list.length / aItemsPerPage + (list.length % aItemsPerPage > 0 ? 1 : 0); + int tPage = 0; + String tPageText; + do { + tPageText = ""; + for (int i = tPage*aItemsPerPage; i < (tPage+1)*aItemsPerPage && i < list.length; i += 1) + tPageText += (tPageText.isEmpty() ? "" : aListDelimiter) + list[i]; + + if (!tPageText.isEmpty()) { + String tPageCounter = tTotalPages > 1 ? String.format(aPageFormatter, tPage + 1, tTotalPages) : ""; + NBTTagString tPageTag = new NBTTagString(String.format(aPageHeader, tPageCounter) + tPageText); + aBook.appendTag(tPageTag); + } + + ++tPage; + } while (!tPageText.isEmpty()); } public static void addEnchantment(ItemStack aStack, Enchantment aEnchantment, int aLevel) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java new file mode 100644 index 0000000000..bf58418246 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -0,0 +1,221 @@ +package gregtech.common.tileentities.machines.basic; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +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_BasicMachine; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Block_Ores_Abstract; +import gregtech.common.blocks.GT_TileEntity_Ores; +import ic2.core.Ic2Items; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.fluids.FluidStack; +import sun.text.resources.es.CollationData_es; + +public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_BasicMachine { + boolean ready = false; + int radius; + int near; + int middle; + int step; + + public GT_MetaTileEntity_AdvSeismicProspector(int aID, String aName, String aNameRegional, int aTier, int aRadius, int aStep) { + super(aID, aName, aNameRegional, aTier, 1, // amperage + "Place, activate with explosives (" + + "8 Glyceryl, " + + "32 TNT or " + + "16 ITNT), use Data Stick", + 1, // input slot count + 1, // output slot count + "Default.png", // GUI name + "", // NEI name + new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) }); + radius = aRadius; + near = radius / 3; + near = near + near % 2; // making near value even; + middle = near * 2; + step = aStep; + } + + protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, + String aGUIName, String aNEIName, int aNear, int aMiddle, int aRadius, int aStep) { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + radius = aRadius; + near = aNear; + middle = aMiddle; + step = aStep; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, + this.mGUIName, this.mNEIName, this.near, this.middle, this.radius, this.step); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isServerSide()) { + ItemStack aStack = aPlayer.getCurrentEquippedItem(); + + if (!ready && (GT_Utility.consumeItems(aPlayer, aStack, Item.getItemFromBlock(Blocks.tnt), 32) + || GT_Utility.consumeItems(aPlayer, aStack, Ic2Items.industrialTnt.getItem(), 16) + || GT_Utility.consumeItems(aPlayer, aStack, Materials.Glyceryl, 8))) { + + this.ready = true; + this.mMaxProgresstime = (aPlayer.capabilities.isCreativeMode ? 20 : 800); + + } else if (ready && mMaxProgresstime == 0 + && aStack != null && aStack.stackSize == 1 + && aStack.getItem() == ItemList.Tool_DataStick.getItem()) { + this.ready = false; + + // prospecting ores + HashMap tNearOres = new HashMap(); + HashMap tMiddleOres = new HashMap(); + HashMap tFarOres = new HashMap(); + prospectOres(tNearOres, tMiddleOres, tFarOres); + + // prospecting oils + HashMap tOils = new HashMap(9); + prospectOils(tOils); + + GT_Utility.ItemNBT.setAdvancedProspectionData(mTier, + aStack, + this.getBaseMetaTileEntity().getXCoord(), + this.getBaseMetaTileEntity().getYCoord(), + this.getBaseMetaTileEntity().getZCoord(), + this.getBaseMetaTileEntity().getWorld().provider.dimensionId, + GT_Utility.sortByValueToList(tOils), + GT_Utility.sortByValueToList(tNearOres), + GT_Utility.sortByValueToList(tMiddleOres), + GT_Utility.sortByValueToList(tFarOres), + near, middle, radius); + } + } + + return true; + } + + private void prospectOils(HashMap aOils) { + + int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius; + int tRightXBound = tLeftXBound + 2*radius; + + int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius; + int tRightZBound = tLeftZBound + 2*radius; + + ArrayList filterList = new ArrayList(9); + String filter; + + for (int x = tLeftXBound; x <= tRightXBound; ++x) + for (int z = tLeftZBound; z <= tRightZBound; ++z) { + filter = x/96 + "," + z/96; + + if (!filterList.contains(filter)) { + filterList.add(filter); + + putOil((x/96)*96, (z/96)*96, aOils); + } + } + } + + private void putOil(int x, int z, HashMap aOils) { + FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x, z); + if (tFluid.amount / 5000 > 0) + aOils.put(x + "," + z + "," + (tFluid.amount / 5000) + "," + tFluid.getLocalizedName(), tFluid.amount / 5000); + } + + private void prospectOres(Map aNearOres, Map aMiddleOres, Map aFarOres) { + int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius; + int tRightXBound = tLeftXBound + 2*radius; + + int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius; + int tRightZBound = tLeftZBound + 2*radius; + + for (int i = tLeftXBound; i <= tRightXBound; i += step) + for (int k = tLeftZBound; k <= tRightZBound; k += step) { + int di = Math.abs(i - this.getBaseMetaTileEntity().getXCoord()); + int dk = Math.abs(k - this.getBaseMetaTileEntity().getZCoord()); + + if (di <= near && dk <= near) + prospectHole(i, k, aNearOres); + else if (di <= middle && dk <= middle) + prospectHole(i, k, aMiddleOres); + else + prospectHole(i, k, aFarOres); + } + } + + private void prospectHole( + int i, int k, Map aOres) { + + String tFoundOre = null; + for (int j = this.getBaseMetaTileEntity().getYCoord(); j > 0; j--) { + tFoundOre = checkForOre(i, j, k); + if (tFoundOre == null) + continue; + + countOre(aOres, tFoundOre); + } + } + + private String checkForOre(int x, int y, int z) { + Block tBlock = this.getBaseMetaTileEntity().getBlock(x, y, z); + + if (tBlock instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(x, y, z); + + if ((tTileEntity instanceof GT_TileEntity_Ores) + && (((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000)) { // Filtering small ores + Materials tMaterial + = GregTech_API.sGeneratedMaterials[((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000]; + + if ((tMaterial != null) && (tMaterial != Materials._NULL)) + return tMaterial.mDefaultLocalName; + } + } else { + int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z); + ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID)); + + if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) + return tAssotiation.mMaterial.mMaterial.mDefaultLocalName; + } + + return null; + } + + private static void countOre(Map map, String ore) { + Integer oldCount = map.get(ore); + oldCount = (oldCount == null) ? 0 : oldCount; + + map.put(ore, oldCount + 1); + } +} diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index d2216073e1..141f08c203 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1201,7 +1201,9 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_ModHandler.addCraftingRecipe(ItemList.Charcoal_Pile.get(1L, new Object[0]), bitsd, new Object[]{"EME", "CCC", 'M', ItemList.Hull_Bronze_Bricks, 'E', OrePrefixes.nugget.get(Materials.WroughtIron), 'C', new ItemStack(Items.flint, 1)}); ItemList.Seismic_Prospector.set(new GT_MetaTileEntity_SeismicProspector(1156, "basicmachine.seismicprospector", "Seismic Prospector", 1).getStackForm(1)); + ItemList.Seismic_Prospector_Adv.set(new GT_MetaTileEntity_AdvSeismicProspector(1173, "basicmachine.seismicprospector.3", "Advanced Seismic Prospector", 4, 95, 4).getStackForm(1)); GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_Steel, 'W', OrePrefixes.plateDouble.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', ItemList.Sensor_LV}); + GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv.get(1L, new Object[0]), bitsd, new Object[] { "WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.plateDouble.get(Materials.VanadiumSteel),'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Sensor_EV }); ItemList.OilDrill.set(new GT_MetaTileEntity_OilDrill(1157, "multimachine.oildrill", "Oil Drilling Rig").getStackForm(1)); GT_ModHandler.addCraftingRecipe(ItemList.OilDrill.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV}); -- cgit From 2c82f057aa0a01862d487d73aacebc13fbdebf93 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Sun, 5 Feb 2017 18:36:34 +0300 Subject: Fix respawn oil amount if amount down to 0 and reduction amount oil if use Seismic Prospector or more --- src/main/java/gregtech/api/util/GT_Utility.java | 7 ++++++- .../tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index b652696d16..b3fffa5b47 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1519,6 +1519,10 @@ public class GT_Utility { } public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { + return getUndergroundOil(aWorld, aX, aZ, false); + } + + public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) { Random tRandom = new Random((aWorld.getSeed() + (aX / 96) + (7 * (aZ / 96)))); @@ -1554,7 +1558,8 @@ public class GT_Utility { } GT_Proxy.chunkData.remove(tPos); } - tAmount = tAmount - 5; + if (needConsumeOil && tAmount >= 5000) + tAmount = tAmount - 5; tInts[0] = tAmount; GT_Proxy.chunkData.put(tPos, tInts); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index d90093fcd6..eef57f9059 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -73,7 +73,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } } } - FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord()); + FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), true); if (tFluid == null) { return false; } -- cgit From 811644f90a7850febcb0679ba8c5a35e80027650 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Mon, 6 Feb 2017 17:53:03 +0300 Subject: Fix bug > Oil Teleportation to GC Planets #837 --- src/main/java/gregtech/api/util/GT_Utility.java | 13 ++++++++++--- .../basic/GT_MetaTileEntity_AdvSeismicProspector.java | 5 +++-- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index b3fffa5b47..c2d0cbebf0 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1524,7 +1524,11 @@ public class GT_Utility { public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) { - + if (aWorld.provider.dimensionId!=0) + { + return null; + } + Random tRandom = new Random((aWorld.getSeed() + (aX / 96) + (7 * (aZ / 96)))); int oil = tRandom.nextInt(3); double amount = tRandom.nextInt(50) + tRandom.nextDouble(); @@ -1756,7 +1760,8 @@ public class GT_Utility { } if (aPlayer.capabilities.isCreativeMode&>_Values.D1) { FluidStack tFluid = getUndergroundOil(aWorld, aX, aZ); - tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); + if (tFluid!=null) + tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ ChunkPosition tPos = new ChunkPosition(aX>>4, 1, aZ>>4); @@ -2003,7 +2008,9 @@ public class GT_Utility { public static void setProspectionData(ItemStack aStack, int aX, int aY, int aZ, int aDim, FluidStack aFluid, String[] aOres) { NBTTagCompound tNBT = getNBT(aStack); - String tData = aX + "," + aY + "," + aZ + "," + aDim + "," + (aFluid.amount / 5000) + "," + aFluid.getLocalizedName() + ","; + String tData = aX + "," + aY + "," + aZ + "," + aDim + ","; + if (aFluid!=null) + tData += (aFluid.amount / 5000) + "," + aFluid.getLocalizedName() + ","; for (String tString : aOres) { tData += tString + ","; } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index bf58418246..e975242cc3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -149,8 +149,9 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void putOil(int x, int z, HashMap aOils) { FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x, z); - if (tFluid.amount / 5000 > 0) - aOils.put(x + "," + z + "," + (tFluid.amount / 5000) + "," + tFluid.getLocalizedName(), tFluid.amount / 5000); + if (tFluid != null) + if (tFluid.amount / 5000 > 0) + aOils.put(x + "," + z + "," + (tFluid.amount / 5000) + "," + tFluid.getLocalizedName(), tFluid.amount / 5000); } private void prospectOres(Map aNearOres, Map aMiddleOres, Map aFarOres) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index eef57f9059..60863e4c52 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -75,6 +75,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), true); if (tFluid == null) { + stopMachine(); return false; } if (getYOfPumpHead() > 0 && getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) { -- cgit From 379b6a8bd15abeff04fd5c411689f438b08ee62c Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Mon, 6 Feb 2017 20:05:08 +0300 Subject: Fix generate oil around coordinates 0 0 --- src/main/java/gregtech/api/util/GT_Utility.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index c2d0cbebf0..1346eef201 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1529,11 +1529,11 @@ public class GT_Utility { return null; } - Random tRandom = new Random((aWorld.getSeed() + (aX / 96) + (7 * (aZ / 96)))); + Random tRandom = new Random((aWorld.getSeed() + ((int)Math.floor(aX / 96.d)) + (7 * ((int)Math.floor(aZ / 96.d))))); int oil = tRandom.nextInt(3); double amount = tRandom.nextInt(50) + tRandom.nextDouble(); oil = tRandom.nextInt(4); -// System.out.println("Oil: "+(aX/96)+" "+(aZ/96)+" "+oil+" "+amount); +// System.out.println("Oil: "+((int)Math.floor(aX/96.d))+" "+((int)Math.floor(aZ/96.d))+" "+oil+" "+amount+"dd"); // amount = 40; Fluid tFluid = null; switch (oil) { -- cgit From 00834b6c4bc69bc825d6dfc84ed9750e3cdedf51 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Tue, 7 Feb 2017 02:52:26 +0300 Subject: Add Underground Oil Spawn Dimensions Fix bug reduction oil around coordinates 0 0 Add value MaxAmount in GregTech.cfg --- src/main/java/gregtech/api/util/GT_Utility.java | 28 ++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 1346eef201..9d9fada605 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -2,6 +2,7 @@ package gregtech.api.util; import cofh.api.transport.IItemDuct; import cpw.mods.fml.common.FMLCommonHandler; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; @@ -1518,22 +1519,35 @@ public class GT_Utility { return false; } + public static int getScaleСoordinates(double aValue, int aScale) { + return (int)Math.floor(aValue / aScale); + } + + public static boolean getUndergroundOilSpawns(int aDimensionId) { + + if (Math.abs(aDimensionId)==1) return false; //If Nether or End... + + if (GT_Mod.gregtechproxy.mUndergroundOilOverworld && aDimensionId==0) return true; //Overworld + if (GT_Mod.gregtechproxy.mUndergroundOilInRealDimension && isRealDimension(aDimensionId)) return true; //Other real world + + return false; //If other planets... + + } + public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { return getUndergroundOil(aWorld, aX, aZ, false); } public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) { - if (aWorld.provider.dimensionId!=0) - { + if (!getUndergroundOilSpawns(aWorld.provider.dimensionId)) return null; - } - Random tRandom = new Random((aWorld.getSeed() + ((int)Math.floor(aX / 96.d)) + (7 * ((int)Math.floor(aZ / 96.d))))); + Random tRandom = new Random((aWorld.getSeed() + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); int oil = tRandom.nextInt(3); - double amount = tRandom.nextInt(50) + tRandom.nextDouble(); + double amount = tRandom.nextInt(GT_Mod.gregtechproxy.mUndergroundOilMaxAmount) + tRandom.nextDouble(); oil = tRandom.nextInt(4); -// System.out.println("Oil: "+((int)Math.floor(aX/96.d))+" "+((int)Math.floor(aZ/96.d))+" "+oil+" "+amount+"dd"); +// System.out.println("Oil: "+(getScaleСoordinates(aX,96))+" "+(getScaleСoordinates(aX,96))+" "+oil+" "+amount); // amount = 40; Fluid tFluid = null; switch (oil) { @@ -1553,7 +1567,7 @@ public class GT_Utility { tFluid = Materials.Oil.mFluid; } int tAmount = (int) (Math.pow(amount, 5) / 100); - ChunkPosition tPos = new ChunkPosition(aX/16, 1, aZ/16); + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), 1, getScaleСoordinates(aZ,16)); int[] tInts = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); -- cgit From 2d3310718a5ec386d2ba6bada824d0a96f12f6f4 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Tue, 7 Feb 2017 04:44:35 +0300 Subject: Add Dimension BlackList Add Other Dimension Oil Generating Save Amount for Other Dimension --- src/main/java/gregtech/api/util/GT_Utility.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 9d9fada605..ba43153217 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1525,11 +1525,14 @@ public class GT_Utility { public static boolean getUndergroundOilSpawns(int aDimensionId) { - if (Math.abs(aDimensionId)==1) return false; //If Nether or End... + //Black list + if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("net.minecraft.world.WorldProviderHell")) return false; + if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("net.minecraft.world.WorldProviderEnd")) return false; + //Use settings if (GT_Mod.gregtechproxy.mUndergroundOilOverworld && aDimensionId==0) return true; //Overworld if (GT_Mod.gregtechproxy.mUndergroundOilInRealDimension && isRealDimension(aDimensionId)) return true; //Other real world - + return false; //If other planets... } @@ -1543,7 +1546,7 @@ public class GT_Utility { if (!getUndergroundOilSpawns(aWorld.provider.dimensionId)) return null; - Random tRandom = new Random((aWorld.getSeed() + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); + Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); int oil = tRandom.nextInt(3); double amount = tRandom.nextInt(GT_Mod.gregtechproxy.mUndergroundOilMaxAmount) + tRandom.nextDouble(); oil = tRandom.nextInt(4); @@ -1567,7 +1570,7 @@ public class GT_Utility { tFluid = Materials.Oil.mFluid; } int tAmount = (int) (Math.pow(amount, 5) / 100); - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), 1, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId+1, getScaleСoordinates(aZ,16)); int[] tInts = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); -- cgit From 6567820a9b2dde53ccf92697857135caef1aff7e Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Tue, 7 Feb 2017 13:34:31 +0300 Subject: Fix generating Pollution in to other worlds --- .../gregtech/api/metatileentity/BaseMetaTileEntity.java | 2 +- .../implementations/GT_MetaTileEntity_BasicGenerator.java | 2 +- .../implementations/GT_MetaTileEntity_Hatch_Muffler.java | 2 +- src/main/java/gregtech/api/util/GT_Utility.java | 2 +- src/main/java/gregtech/common/GT_Pollution.java | 13 ++++++++++--- .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- .../multi/GT_MetaTileEntity_BronzeBlastFurnace.java | 2 +- .../machines/multi/GT_MetaTileEntity_Charcoal_Pit.java | 2 +- 10 files changed, 19 insertions(+), 12 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 3b2f37085a..4aa49a954c 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1146,7 +1146,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } } } - GT_Pollution.addPollution(new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); + GT_Pollution.addPollution(getWorld(), new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); mMetaTileEntity.doExplosion(aAmount); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 751a33e255..bd5b8d9ea6 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -210,7 +210,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity } } if(tProducedEU>0&&getPollution()>0){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), (int) ((tProducedEU * getPollution()/(500*mTier))+1)); } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 319b549d38..7246a58c26 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -61,7 +61,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { public boolean polluteEnvironment() { if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); return true; } return false; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index ba43153217..0bc98d457f 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1781,7 +1781,7 @@ public class GT_Utility { tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(aX>>4, 1, aZ>>4); + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId+1, getScaleСoordinates(aZ,16)); if(GT_Proxy.chunkData.containsKey(tPos)){ int[] tPollution = GT_Proxy.chunkData.get(tPos); if(tPollution.length>1){ diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 25b7521721..0c21e1ec6a 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -9,6 +9,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; +import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; @@ -187,12 +188,18 @@ public class GT_Pollution { else if(tBlock == Blocks.gravel){world.setBlock(x, y, z, Blocks.sand); } } } - + + //Backward compatibility (NOT USE) public static void addPollution(ChunkPosition aPos, int aPollution){ + addPollution(MinecraftServer.getServer().worldServerForDimension(0), aPos, aPollution); + } + + //Add aWorld to Save Pollution + public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; try{ - ChunkPosition tPos = new ChunkPosition(aPos.chunkPosX>>4, 1, aPos.chunkPosZ>>4); -// System.out.println("add pollution x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId + 1, GT_Utility.getScaleСoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 +// System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); int[] tData = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ tData = GT_Proxy.chunkData.get(tPos); diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index 776f71761e..5c6fdeeb33 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -141,7 +141,7 @@ public class GT_MetaTileEntity_Boiler_Bronze this.mTemperature += 1; } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 8480b03733..2806cbc943 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -120,7 +120,7 @@ public class GT_MetaTileEntity_Boiler_Lava } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 4016e7be35..c5ad432ad7 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -146,7 +146,7 @@ public class GT_MetaTileEntity_Boiler_Steel this.mTemperature += 1; } if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 89b9adaa7e..7efc667ade 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -209,7 +209,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } } if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){ - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 50); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 50); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index 22d901f13a..9c4881d18c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -86,7 +86,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock this.mEfficiency = 10000; this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - GT_Pollution.addPollution(new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5); + GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*5); return true; } else { this.mEfficiency = 0; -- cgit From 772ec04bf33679baed10c72991336b5b648603bb Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Thu, 9 Feb 2017 05:38:20 +0300 Subject: Add Underground Oil Generating settings in GregTech.cfg Add supports White and Black List (DIM ID) Add settings generating for standart Dimension and Galacticraft Dimension - Moon and Mars Add settings for select type Underground Fluid - for Nether default Pahoehoe Lava, for Moon - Helium 3 Add settings max Amount Generating For generating oil in other Dimension (Twilight Forest or Mystcraft) use settings - RealDimensionEnable --- src/main/java/gregtech/GT_Mod.java | 17 ++++++-- src/main/java/gregtech/api/util/GT_Utility.java | 55 ++++++++++++++++++++----- src/main/java/gregtech/common/GT_Proxy.java | 15 +++++-- 3 files changed, 70 insertions(+), 17 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 43cf7d6b9e..d551d64b2e 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -251,9 +251,20 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", 750000).getInt(750000); gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", 1000000).getInt(1000000); gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", 2000000).getInt(2000000); - gregtechproxy.mUndergroundOilOverworld = tMainConfig.get("UndergroundOil", "EnableOverworld", true).getBoolean(true); - gregtechproxy.mUndergroundOilInRealDimension = tMainConfig.get("UndergroundOil", "EnableInRealDimension", true).getBoolean(true); - gregtechproxy.mUndergroundOilMaxAmount = tMainConfig.get("UndergroundOil", "MaxAmount", 50).getInt(50); + gregtechproxy.mUndergroundOilOverworld = tMainConfig.get("UndergroundOil", "OverworldEnable", true, "Generate Underground Oil on Overworld").getBoolean(true); + gregtechproxy.mUndergroundOilInRealDimension = tMainConfig.get("UndergroundOil", "RealDimensionEnable", true, "Generate Underground Oil on other world (not another Planet)").getBoolean(true); + gregtechproxy.mUndergroundOilNether = tMainConfig.get("UndergroundOil", "NetherEnable", true, "Generate Underground Oil on Nether").getBoolean(true); + gregtechproxy.mUndergroundOilMoon = tMainConfig.get("UndergroundOil", "MoonEnable", true, "Generate Underground Oil on Moon").getBoolean(true); + gregtechproxy.mUndergroundOilMars = tMainConfig.get("UndergroundOil", "MarsEnable", false, "Generate Underground Oil on Mars").getBoolean(false); + gregtechproxy.mUndergroundOilMaxAmount = tMainConfig.get("UndergroundOil", "OverworldMaxAmount", 625, "Max amount on Overworld").getInt(625); + gregtechproxy.mUndergroundOilNetherMaxAmount = tMainConfig.get("UndergroundOil", "NetherMaxAmount", 625, "Max amount on Nether").getInt(625); + gregtechproxy.mUndergroundOilMoonMaxAmount = tMainConfig.get("UndergroundOil", "MoonMaxAmount", 625, "Max amount on Moon").getInt(625); + gregtechproxy.mUndergroundOilNetherResType = tMainConfig.get("UndergroundOil", "NetherResType", 1, "Type of the generated resource on Nether (0 - Oil, 1 - Basalt Lava, 2- He3)", 0, 2).getInt(1); + gregtechproxy.mUndergroundOilMoonResType = tMainConfig.get("UndergroundOil", "MoonResType", 2, "Type of the generated resource on Moon (0 - Oil, 1 - Basalt Lava, 2- He3)", 0, 2).getInt(2); + gregtechproxy.mUndergroundOilBlackList = tMainConfig.get("UndergroundOil", "DimBlackList", new int[0], "Dimension IDs Black List").getIntList(); + java.util.Arrays.sort(gregtechproxy.mUndergroundOilBlackList); + gregtechproxy.mUndergroundOilWhiteList = tMainConfig.get("UndergroundOil", "DimWhiteList", new int[0], "Dimension IDs White List").getIntList(); + java.util.Arrays.sort(gregtechproxy.mUndergroundOilWhiteList); gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 0bc98d457f..ade000012a 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1523,19 +1523,36 @@ public class GT_Utility { return (int)Math.floor(aValue / aScale); } - public static boolean getUndergroundOilSpawns(int aDimensionId) { + public static boolean getUndergroundOilGenerating(int aDimensionId) { - //Black list - if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("net.minecraft.world.WorldProviderHell")) return false; - if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("net.minecraft.world.WorldProviderEnd")) return false; - //Use settings - if (GT_Mod.gregtechproxy.mUndergroundOilOverworld && aDimensionId==0) return true; //Overworld - if (GT_Mod.gregtechproxy.mUndergroundOilInRealDimension && isRealDimension(aDimensionId)) return true; //Other real world + if (java.util.Arrays.binarySearch(GT_Mod.gregtechproxy.mUndergroundOilBlackList, aDimensionId) >= 0) return false; //Use BlackList Settings + if (java.util.Arrays.binarySearch(GT_Mod.gregtechproxy.mUndergroundOilWhiteList, aDimensionId) >= 0) return true; //Use WhiteList Settings + if (aDimensionId == 1) return false; //No bedrock, no oil. End. + if (aDimensionId==0) return GT_Mod.gregtechproxy.mUndergroundOilOverworld; //Overworld + if (aDimensionId == -1) return GT_Mod.gregtechproxy.mUndergroundOilNether; //Nether + + if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("Moon")) return GT_Mod.gregtechproxy.mUndergroundOilMoon; //Moon + if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("Mars")) return GT_Mod.gregtechproxy.mUndergroundOilMars; //Mars + + if (isRealDimension(aDimensionId)) return GT_Mod.gregtechproxy.mUndergroundOilInRealDimension; //Other real world - return false; //If other planets... + return false; //If other planets or worlds... } + + public static int getUndergroundOilType(int aType, int aOil) { + switch (aType) { + case 1: + aOil = 10; + break; + case 2: + aOil = 11; + break; + } + return aOil; + } + public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { return getUndergroundOil(aWorld, aX, aZ, false); @@ -1543,15 +1560,25 @@ public class GT_Utility { public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) { - if (!getUndergroundOilSpawns(aWorld.provider.dimensionId)) + if (!getUndergroundOilGenerating(aWorld.provider.dimensionId)) return null; Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); int oil = tRandom.nextInt(3); - double amount = tRandom.nextInt(GT_Mod.gregtechproxy.mUndergroundOilMaxAmount) + tRandom.nextDouble(); oil = tRandom.nextInt(4); + int maxAmount; + if (aWorld.provider.dimensionId == -1){ + maxAmount = GT_Mod.gregtechproxy.mUndergroundOilNetherMaxAmount; + oil=getUndergroundOilType(GT_Mod.gregtechproxy.mUndergroundOilNetherResType,oil); + } else if (DimensionManager.getProvider(aWorld.provider.dimensionId).getClass().getName().contains("Moon")){ + maxAmount = GT_Mod.gregtechproxy.mUndergroundOilMoonMaxAmount; + oil=getUndergroundOilType(GT_Mod.gregtechproxy.mUndergroundOilMoonResType,oil); + } + else maxAmount = GT_Mod.gregtechproxy.mUndergroundOilMaxAmount; + + maxAmount = (int)Math.round(Math.pow(maxAmount*500000.d, 0.2)); + double amount = tRandom.nextInt(maxAmount) + tRandom.nextDouble(); // System.out.println("Oil: "+(getScaleСoordinates(aX,96))+" "+(getScaleСoordinates(aX,96))+" "+oil+" "+amount); -// amount = 40; Fluid tFluid = null; switch (oil) { case 0: @@ -1566,6 +1593,12 @@ public class GT_Utility { case 3: tFluid = Materials.OilHeavy.mFluid; break; + case 10: + tFluid = FluidRegistry.getFluid("ic2pahoehoelava"); + break; + case 11: + tFluid = Materials.Helium_3.mGas; + break; default: tFluid = Materials.Oil.mFluid; } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 1680fb50c3..7fcdd1ad6f 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -165,8 +165,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mHideUnusedOres = true; public boolean mHideRecyclingRecipes = true; public boolean mPollution = true; - public boolean mUndergroundOilOverworld = true; - public boolean mUndergroundOilInRealDimension = true; + public boolean mUndergroundOilOverworld = true; //in DIM 0 + public boolean mUndergroundOilInRealDimension = true; //in other + public boolean mUndergroundOilNether = true; //in DIM -1 + public boolean mUndergroundOilMoon = true; //in Galacticraft Moon + public boolean mUndergroundOilMars = false; //in Galacticraft Mars public boolean mExplosionItemDrop = false; public int mSkeletonsShootGTArrows = 16; public int mMaxEqualEntitiesAtOneSpot = 3; @@ -181,8 +184,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public int mPollutionPoisonLimit = 750000; public int mPollutionVegetationLimit = 1000000; public int mPollutionSourRainLimit = 2000000; - public int mUndergroundOilMaxAmount = 50; + public int mUndergroundOilMaxAmount = 625; //mb in step + public int mUndergroundOilNetherMaxAmount = 625; //mb in step + public int mUndergroundOilNetherResType = 1; //0 - Oil; 1 - basalt lava; 3 - He3 + public int mUndergroundOilMoonMaxAmount = 625; //mb in step + public int mUndergroundOilMoonResType = 2; //0 - Oil; 1 - basalt lava; 3 - He3 public int mTicksUntilNextCraftSound = 0; + public int[] mUndergroundOilBlackList; + public int[] mUndergroundOilWhiteList; public double mMagneticraftBonusOutputPercent = 100.0d; private World mUniverse = null; private final String aTextThermalExpansion = "ThermalExpansion"; -- cgit From 901a7d66c1766b3f21de4f74e696a30e5d178018 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Mon, 13 Feb 2017 04:24:48 +0300 Subject: Add new flexible configuration undeground oil --- src/main/java/gregtech/GT_Mod.java | 19 +---- .../java/gregtech/api/objects/GT_UO_Dimension.java | 48 +++++++++++ .../gregtech/api/objects/GT_UO_DimensionList.java | 92 +++++++++++++++++++++ .../java/gregtech/api/objects/GT_UO_Fluid.java | 41 +++++++++ src/main/java/gregtech/api/util/GT_Utility.java | 96 ++++++++-------------- src/main/java/gregtech/common/GT_Proxy.java | 58 +++++-------- 6 files changed, 240 insertions(+), 114 deletions(-) create mode 100644 src/main/java/gregtech/api/objects/GT_UO_Dimension.java create mode 100644 src/main/java/gregtech/api/objects/GT_UO_DimensionList.java create mode 100644 src/main/java/gregtech/api/objects/GT_UO_Fluid.java (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index d551d64b2e..8e9502047b 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -46,13 +46,13 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.ChestGenHooks; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.StringUtils; - import java.io.*; import java.util.*; import java.util.regex.Matcher; @@ -251,22 +251,9 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mPollutionPoisonLimit = tMainConfig.get("Pollution", "PoisonLimit", 750000).getInt(750000); gregtechproxy.mPollutionVegetationLimit = tMainConfig.get("Pollution", "VegetationLimit", 1000000).getInt(1000000); gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", 2000000).getInt(2000000); - gregtechproxy.mUndergroundOilOverworld = tMainConfig.get("UndergroundOil", "OverworldEnable", true, "Generate Underground Oil on Overworld").getBoolean(true); - gregtechproxy.mUndergroundOilInRealDimension = tMainConfig.get("UndergroundOil", "RealDimensionEnable", true, "Generate Underground Oil on other world (not another Planet)").getBoolean(true); - gregtechproxy.mUndergroundOilNether = tMainConfig.get("UndergroundOil", "NetherEnable", true, "Generate Underground Oil on Nether").getBoolean(true); - gregtechproxy.mUndergroundOilMoon = tMainConfig.get("UndergroundOil", "MoonEnable", true, "Generate Underground Oil on Moon").getBoolean(true); - gregtechproxy.mUndergroundOilMars = tMainConfig.get("UndergroundOil", "MarsEnable", false, "Generate Underground Oil on Mars").getBoolean(false); - gregtechproxy.mUndergroundOilMaxAmount = tMainConfig.get("UndergroundOil", "OverworldMaxAmount", 625, "Max amount on Overworld").getInt(625); - gregtechproxy.mUndergroundOilNetherMaxAmount = tMainConfig.get("UndergroundOil", "NetherMaxAmount", 625, "Max amount on Nether").getInt(625); - gregtechproxy.mUndergroundOilMoonMaxAmount = tMainConfig.get("UndergroundOil", "MoonMaxAmount", 625, "Max amount on Moon").getInt(625); - gregtechproxy.mUndergroundOilNetherResType = tMainConfig.get("UndergroundOil", "NetherResType", 1, "Type of the generated resource on Nether (0 - Oil, 1 - Basalt Lava, 2- He3)", 0, 2).getInt(1); - gregtechproxy.mUndergroundOilMoonResType = tMainConfig.get("UndergroundOil", "MoonResType", 2, "Type of the generated resource on Moon (0 - Oil, 1 - Basalt Lava, 2- He3)", 0, 2).getInt(2); - gregtechproxy.mUndergroundOilBlackList = tMainConfig.get("UndergroundOil", "DimBlackList", new int[0], "Dimension IDs Black List").getIntList(); - java.util.Arrays.sort(gregtechproxy.mUndergroundOilBlackList); - gregtechproxy.mUndergroundOilWhiteList = tMainConfig.get("UndergroundOil", "DimWhiteList", new int[0], "Dimension IDs White List").getIntList(); - java.util.Arrays.sort(gregtechproxy.mUndergroundOilWhiteList); gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); + gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundoil"); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); @@ -816,6 +803,7 @@ public class GT_Mod implements IGT_Mod { } } achievements = new GT_Achievements(); + GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables."); GregTech_API.sBeforeGTPreload = null; GregTech_API.sAfterGTPreload = null; @@ -968,6 +956,7 @@ public class GT_Mod implements IGT_Mod { GT_OreDictUnificator.setStack(tOutput); } } + GregTech_API.mServerStarted = true; GT_Log.out.println("GT_Mod: ServerStarting-Phase finished!"); GT_Log.ore.println("GT_Mod: ServerStarting-Phase finished!"); diff --git a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java new file mode 100644 index 0000000000..9d10284f22 --- /dev/null +++ b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java @@ -0,0 +1,48 @@ +package gregtech.api.objects; + +import java.util.ArrayList; +import java.util.Random; +import java.util.Set; + +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + +import gregtech.api.enums.GT_Values; +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.fluids.Fluid; + +public class GT_UO_Dimension { + + private BiMap fFluids; + private int maxChance; + public String Dimension; + + public GT_UO_Dimension(ConfigCategory aConfigCategory) { + fFluids = HashBiMap.create(); + Dimension = aConfigCategory.get("Dimension").getString(); + maxChance = 0; + //System.out.println("GT UO "+aConfigCategory.getName()+" Dimension:"+Dimension); + for (int i = 0 ; i < aConfigCategory.getChildren().size(); i++) { + GT_UO_Fluid fluid = new GT_UO_Fluid((ConfigCategory)aConfigCategory.getChildren().toArray()[i]); + fFluids.put(fluid.Registry, fluid); + maxChance += fluid.Chance; + } + } + + public GT_UO_Fluid getRandomFluid (Random aRandom) { + int random = aRandom.nextInt(3); + random = aRandom.nextInt(1000); + int step = 0; + for (BiMap.Entry fl : fFluids.entrySet()) { + int chance = fl.getValue().Chance*1000/maxChance; + if (random<=chance) return fl.getValue(); + //System.out.println("GT UO "+fl.getValue().Registry+" Chance:"+chance+" Random:"+random); + random-=chance; + } + + return null; + + } + +} diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java new file mode 100644 index 0000000000..b380392249 --- /dev/null +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -0,0 +1,92 @@ +package gregtech.api.objects; + +import com.google.common.collect.BiMap; +import com.google.common.collect.HashBiMap; + +import gregtech.GT_Mod; +import gregtech.api.enums.GT_Values; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.common.config.Configuration; + +public class GT_UO_DimensionList { + + private Configuration fConfig; + private String fCategory; + private BiMap fDimensionList; + + public int[] BlackList; + + public GT_UO_DimensionList() { + fDimensionList = HashBiMap.create(); + } + + public GT_UO_Dimension GetDimension(int aDimension) { + if (fDimensionList.containsKey(Integer.toString(aDimension))) + return fDimensionList.get(Integer.toString(aDimension)); + for (BiMap.Entry dl : fDimensionList.entrySet()) + if (DimensionManager.getProvider(aDimension).getClass().getName().contains(dl.getValue().Dimension)) + return dl.getValue(); + return fDimensionList.get("Default"); + } + + public boolean CheckBlackList(int aDimensionId){ + try { + if (java.util.Arrays.binarySearch(BlackList, aDimensionId) >= 0) return true; + else return false; + } catch (Exception e) { + return false; + } + } + + public void SetConfigValues(String aDimensionName, String aDimension, String aName, String aRegistry, int aMinAmount, int aMaxAmount, int aChance) { + String Category = fCategory+"."+aDimensionName; + fConfig.get(Category, "Dimension", aDimension, "Dimension ID or Class Name").getString(); + Category+="."+aName; + fConfig.get(Category, "Registry", aRegistry, "Fluid registry").getString(); + fConfig.get(Category, "MinAmount", aMinAmount, "Min amount (Amount in step)").getInt(aMinAmount); + fConfig.get(Category, "MaxAmount", aMaxAmount, "Max amount (Amount in step)").getInt(aMaxAmount); + fConfig.get(Category, "Chance", aChance, "Chance generating").getInt(aChance); + } + + public void SetDafultValues() { + fConfig.setCategoryComment(fCategory+".Default", "Set Default Generating"); + SetConfigValues("Default", "Default", "gas_natural_gas", "gas_natural_gas", 0, 625, 20); + SetConfigValues("Default", "Default", "liquid_light_oil", "liquid_light_oil", 0, 625, 20); + SetConfigValues("Default", "Default", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20); + SetConfigValues("Default", "Default", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20); + SetConfigValues("Default", "Default", "oil", "oil", 0, 625, 20); + + fConfig.setCategoryComment(fCategory+".Overworld", "Set Overworld Generating"); + SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20); + SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 625, 20); + SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20); + SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20); + SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20); + + fConfig.setCategoryComment(fCategory+".Nether", "Set Nether Generating"); + SetConfigValues("Nether", "-1", "ic2pahoehoelava", "ic2pahoehoelava", 0, 250, 100); + + fConfig.setCategoryComment(fCategory+".Moon", "Set Moon Generating"); + SetConfigValues("Moon", "Moon", "molten-cheese", "molten.cheese", 0, 125, 5); + SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 0, 375, 95); + } + + public void getConfig(Configuration aConfig, String aCategory) { + fCategory=aCategory; + fConfig = aConfig; + if (!fConfig.hasCategory(fCategory)) + SetDafultValues(); + + fConfig.setCategoryComment(fCategory, "Config Undeground Fluids (Delete this Category for regenerate)"); + int[] BlackList = {1}; + BlackList = aConfig.get(fCategory, "DimBlackList", BlackList, "Dimension IDs Black List").getIntList(); + java.util.Arrays.sort(BlackList); + + for (int i = 0 ; i < fConfig.getCategory(fCategory).getChildren().size(); i++) { + GT_UO_Dimension Dimension = new GT_UO_Dimension((ConfigCategory)fConfig.getCategory(fCategory).getChildren().toArray()[i]); + fDimensionList.put(Dimension.Dimension, Dimension); + } + } + +} diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java new file mode 100644 index 0000000000..e326fac46c --- /dev/null +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -0,0 +1,41 @@ +package gregtech.api.objects; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Random; + +import gregtech.api.enums.GT_Values; +import net.minecraftforge.common.config.ConfigCategory; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +public class GT_UO_Fluid { + public String Registry; + public int MaxAmount; + public int MinAmount; + public int Chance; + + public GT_UO_Fluid(ConfigCategory aConfigCategory) { + Registry = aConfigCategory.get("Registry").getString();; + MaxAmount = aConfigCategory.get("MaxAmount").getInt(); + MinAmount = aConfigCategory.get("MinAmount").getInt(); + Chance = aConfigCategory.get("Chance").getInt(); + //System.out.println("GT UO "+aConfigCategory.getName()+" Fluid:"+Registry+" Max:"+MaxAmount+" Min:"+MinAmount+" Chance:"+Chance); + } + + public Fluid getFluid(){ + try { + return FluidRegistry.getFluid(this.Registry); + } catch (Exception e) { + return null; + } + } + + public int getRandomAmount(Random aRandom){ + int r1 = (int)Math.round(Math.pow((MaxAmount-MinAmount)*500000.d, 0.2)); + int r2 = (int)Math.floor(Math.pow(MinAmount*500000.d, 0.2)); + double amount = aRandom.nextInt(r1)+r2+aRandom.nextDouble(); + return (int) (Math.pow(amount, 5) / 100); + } + +} \ No newline at end of file diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index ade000012a..0d8100c332 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -18,6 +18,7 @@ import gregtech.api.items.GT_EnergyArmor_Item; import gregtech.api.items.GT_Generic_Item; import gregtech.api.net.GT_Packet_Sound; import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.ItemData; import gregtech.api.threads.GT_Runnable_Sound; import gregtech.common.GT_Proxy; @@ -1523,24 +1524,6 @@ public class GT_Utility { return (int)Math.floor(aValue / aScale); } - public static boolean getUndergroundOilGenerating(int aDimensionId) { - - //Use settings - if (java.util.Arrays.binarySearch(GT_Mod.gregtechproxy.mUndergroundOilBlackList, aDimensionId) >= 0) return false; //Use BlackList Settings - if (java.util.Arrays.binarySearch(GT_Mod.gregtechproxy.mUndergroundOilWhiteList, aDimensionId) >= 0) return true; //Use WhiteList Settings - if (aDimensionId == 1) return false; //No bedrock, no oil. End. - if (aDimensionId==0) return GT_Mod.gregtechproxy.mUndergroundOilOverworld; //Overworld - if (aDimensionId == -1) return GT_Mod.gregtechproxy.mUndergroundOilNether; //Nether - - if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("Moon")) return GT_Mod.gregtechproxy.mUndergroundOilMoon; //Moon - if (DimensionManager.getProvider(aDimensionId).getClass().getName().contains("Mars")) return GT_Mod.gregtechproxy.mUndergroundOilMars; //Mars - - if (isRealDimension(aDimensionId)) return GT_Mod.gregtechproxy.mUndergroundOilInRealDimension; //Other real world - - return false; //If other planets or worlds... - - } - public static int getUndergroundOilType(int aType, int aOil) { switch (aType) { case 1: @@ -1560,64 +1543,56 @@ public class GT_Utility { public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) { - if (!getUndergroundOilGenerating(aWorld.provider.dimensionId)) + if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(aWorld.provider.dimensionId)) return null; Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); - int oil = tRandom.nextInt(3); - oil = tRandom.nextInt(4); - int maxAmount; - if (aWorld.provider.dimensionId == -1){ - maxAmount = GT_Mod.gregtechproxy.mUndergroundOilNetherMaxAmount; - oil=getUndergroundOilType(GT_Mod.gregtechproxy.mUndergroundOilNetherResType,oil); - } else if (DimensionManager.getProvider(aWorld.provider.dimensionId).getClass().getName().contains("Moon")){ - maxAmount = GT_Mod.gregtechproxy.mUndergroundOilMoonMaxAmount; - oil=getUndergroundOilType(GT_Mod.gregtechproxy.mUndergroundOilMoonResType,oil); - } - else maxAmount = GT_Mod.gregtechproxy.mUndergroundOilMaxAmount; - - maxAmount = (int)Math.round(Math.pow(maxAmount*500000.d, 0.2)); - double amount = tRandom.nextInt(maxAmount) + tRandom.nextDouble(); -// System.out.println("Oil: "+(getScaleСoordinates(aX,96))+" "+(getScaleСoordinates(aX,96))+" "+oil+" "+amount); + int tAmount = 0; + int tFluidId = 0; Fluid tFluid = null; - switch (oil) { - case 0: - tFluid = Materials.NatruralGas.mGas; - break; - case 1: - tFluid = Materials.OilLight.mFluid; - break; - case 2: - tFluid = Materials.OilMedium.mFluid; - break; - case 3: - tFluid = Materials.OilHeavy.mFluid; - break; - case 10: - tFluid = FluidRegistry.getFluid("ic2pahoehoelava"); - break; - case 11: - tFluid = Materials.Helium_3.mGas; - break; - default: - tFluid = Materials.Oil.mFluid; - } - int tAmount = (int) (Math.pow(amount, 5) / 100); +// System.out.println("Dimension: "+GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).Dimension); + try { + GT_UO_Fluid uoFluid = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).getRandomFluid(tRandom); + if (uoFluid != null) + { + tFluid = uoFluid.getFluid(); + tAmount = uoFluid.getRandomAmount(tRandom); + if (tFluid != null) + tFluidId = tFluid.getID(); + //System.out.println("Fluid: ("+tFluidId+")"+tFluid.getName()+" Amount:"+tAmount); + } + + } catch (Exception e) { + tAmount = 0; + tFluidId = 0; + } + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId+1, getScaleСoordinates(aZ,16)); - int[] tInts = new int[2]; + int[] tInts = new int[0]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); if(tInts.length>0){ if(tInts[0]>0){tAmount = tInts[0];} } + if(tInts.length>2){ + if(tInts[2]>0&&tInts[2]!=tFluidId) + { + tFluidId = tInts[2]; + tFluid = FluidRegistry.getFluid(tFluidId); + } + } GT_Proxy.chunkData.remove(tPos); } + if (needConsumeOil && tAmount >= 5000) tAmount = tAmount - 5; + tInts[0] = tAmount; + tInts[2] = tFluidId; GT_Proxy.chunkData.put(tPos, tInts); - - return new FluidStack(tFluid, tAmount); + if (tFluid!=null) + return new FluidStack(tFluid, tAmount); + return null; } public static int getCoordinateScan(ArrayList aList, EntityPlayer aPlayer, World aWorld, int aScanLevel, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ) { @@ -2081,7 +2056,6 @@ public class GT_Utility { setBookTitle(aStack, "Raw Prospection Data"); NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); - tNBT.setByte("prospection_tier", aTier); tNBT.setString("prospection_pos", "X: " + aX + " Y: " + aY + " Z: " + aZ + " Dim: " + aDim); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 7fcdd1ad6f..d3d9347aa8 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -24,6 +24,7 @@ import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.objects.GT_Fluid; import gregtech.api.objects.GT_FluidStack; +import gregtech.api.objects.GT_UO_DimensionList; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; import gregtech.api.util.*; @@ -165,11 +166,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mHideUnusedOres = true; public boolean mHideRecyclingRecipes = true; public boolean mPollution = true; - public boolean mUndergroundOilOverworld = true; //in DIM 0 - public boolean mUndergroundOilInRealDimension = true; //in other - public boolean mUndergroundOilNether = true; //in DIM -1 - public boolean mUndergroundOilMoon = true; //in Galacticraft Moon - public boolean mUndergroundOilMars = false; //in Galacticraft Mars public boolean mExplosionItemDrop = false; public int mSkeletonsShootGTArrows = 16; public int mMaxEqualEntitiesAtOneSpot = 3; @@ -184,14 +180,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public int mPollutionPoisonLimit = 750000; public int mPollutionVegetationLimit = 1000000; public int mPollutionSourRainLimit = 2000000; - public int mUndergroundOilMaxAmount = 625; //mb in step - public int mUndergroundOilNetherMaxAmount = 625; //mb in step - public int mUndergroundOilNetherResType = 1; //0 - Oil; 1 - basalt lava; 3 - He3 - public int mUndergroundOilMoonMaxAmount = 625; //mb in step - public int mUndergroundOilMoonResType = 2; //0 - Oil; 1 - basalt lava; 3 - He3 + public final GT_UO_DimensionList mUndergroundOil = new GT_UO_DimensionList(); public int mTicksUntilNextCraftSound = 0; - public int[] mUndergroundOilBlackList; - public int[] mUndergroundOilWhiteList; public double mMagneticraftBonusOutputPercent = 100.0d; private World mUniverse = null; private final String aTextThermalExpansion = "ThermalExpansion"; @@ -1710,52 +1700,44 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { @SubscribeEvent public void handleChunkSaveEvent(ChunkDataEvent.Save event) - { + { ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId+1,event.getChunk().zPosition); if(chunkData.containsKey(tPos)){ int[] tInts = chunkData.get(tPos); if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);} - if(tInts.length>1){event.getData().setInteger("GTPOLLUTION", tInts[1]);}} + if(tInts.length>1){event.getData().setInteger("GTPOLLUTION", tInts[1]);} + if(tInts.length>2){event.getData().setInteger("GTOILFLUID", tInts[2]);} + } } @SubscribeEvent public void handleChunkLoadEvent(ChunkDataEvent.Load event) { int tOil = 0; + int tOilFluid = 0; int tPollution = 0; ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId+1,event.getChunk().zPosition); - int[] tData = new int[2]; + int[] tData = new int[0]; if(chunkData.containsKey(tPos)){ tData = chunkData.get(tPos); chunkData.remove(tPos); - } - - if(event.getData().hasKey("GTOIL")){ - if(tData.length>2){ - tOil = tData[0]; - }else{ - tOil += event.getData().getInteger("GTOIL"); - } - }else{ - if(tData[0]!=0){ + if(tData.length>0) tOil = tData[0]; - } + if(tData.length>1) + tPollution = tData[1]; + if(tData.length>2) + tOilFluid = tData[2]; } - if(event.getData().hasKey("GTPOLLUTION")){ - if(tData.length>2){ - tPollution = tData[1]; - }else{ - tPollution += event.getData().getInteger("GTPOLLUTION"); - } - }else{ - if(tData[1]!=0){ - tPollution = tData[1]; - } - } + if(tOil==0&&event.getData().hasKey("GTOIL")) + tOil = event.getData().getInteger("GTOIL"); + if(tPollution==0&&event.getData().hasKey("GTPOLLUTION")) + tPollution = event.getData().getInteger("GTPOLLUTION"); + if(tOilFluid==0&&event.getData().hasKey("GTOILFLUID")) + tOilFluid = event.getData().getInteger("GTOILFLUID"); - chunkData.put(tPos, new int[]{ tOil,tPollution,-1}); + chunkData.put(tPos, new int[]{tOil,tPollution,tOilFluid}); } public static class OreDictEventContainer { -- cgit From 8e2280bc2c700a04ae5b829fe79eba4ba95a22d3 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Fri, 17 Feb 2017 01:55:54 +0300 Subject: Fix name config category to UndergroundFluid Fix comments configuration Fix Start config - add nether and end to BlackList. Default spawn fluids on overworld and Moon. Add Decrease Per Operation Amount (if 0 an endless source) --- src/main/java/gregtech/GT_Mod.java | 6 +-- .../java/gregtech/api/objects/GT_UO_Dimension.java | 8 +++- .../gregtech/api/objects/GT_UO_DimensionList.java | 45 +++++++---------- .../java/gregtech/api/objects/GT_UO_Fluid.java | 40 ++++++++++++---- src/main/java/gregtech/api/util/GT_Utility.java | 22 +++------ src/main/java/gregtech/common/GT_Pollution.java | 8 +--- src/main/java/gregtech/common/GT_Proxy.java | 4 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 56 ++++++++++++---------- 8 files changed, 96 insertions(+), 93 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 8e9502047b..ef0635bc2d 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -46,13 +46,13 @@ import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraftforge.common.ChestGenHooks; -import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.StringUtils; + import java.io.*; import java.util.*; import java.util.regex.Matcher; @@ -253,7 +253,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mPollutionSourRainLimit = tMainConfig.get("Pollution", "SourRainLimit", 2000000).getInt(2000000); gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); - gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundoil"); + gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); @@ -803,7 +803,6 @@ public class GT_Mod implements IGT_Mod { } } achievements = new GT_Achievements(); - GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables."); GregTech_API.sBeforeGTPreload = null; GregTech_API.sAfterGTPreload = null; @@ -956,7 +955,6 @@ public class GT_Mod implements IGT_Mod { GT_OreDictUnificator.setStack(tOutput); } } - GregTech_API.mServerStarted = true; GT_Log.out.println("GT_Mod: ServerStarting-Phase finished!"); GT_Log.ore.println("GT_Mod: ServerStarting-Phase finished!"); diff --git a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java index 9d10284f22..ffad72868c 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java @@ -16,11 +16,15 @@ public class GT_UO_Dimension { private BiMap fFluids; private int maxChance; - public String Dimension; + public String Dimension = "null"; public GT_UO_Dimension(ConfigCategory aConfigCategory) { fFluids = HashBiMap.create(); - Dimension = aConfigCategory.get("Dimension").getString(); + if (aConfigCategory.containsKey("Dimension")) + { + aConfigCategory.get("Dimension").comment = "Dimension ID or Class Name"; + Dimension = aConfigCategory.get("Dimension").getString(); + } maxChance = 0; //System.out.println("GT UO "+aConfigCategory.getName()+" Dimension:"+Dimension); for (int i = 0 ; i < aConfigCategory.getChildren().size(); i++) { diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java index b380392249..89340132be 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -39,37 +39,24 @@ public class GT_UO_DimensionList { } } - public void SetConfigValues(String aDimensionName, String aDimension, String aName, String aRegistry, int aMinAmount, int aMaxAmount, int aChance) { + public void SetConfigValues(String aDimensionName, String aDimension, String aName, String aRegistry, int aMinAmount, int aMaxAmount, int aChance, int aDecreasePerOperationAmount) { String Category = fCategory+"."+aDimensionName; - fConfig.get(Category, "Dimension", aDimension, "Dimension ID or Class Name").getString(); + fConfig.get(Category, "Dimension", aDimension).getString(); Category+="."+aName; - fConfig.get(Category, "Registry", aRegistry, "Fluid registry").getString(); - fConfig.get(Category, "MinAmount", aMinAmount, "Min amount (Amount in step)").getInt(aMinAmount); - fConfig.get(Category, "MaxAmount", aMaxAmount, "Max amount (Amount in step)").getInt(aMaxAmount); - fConfig.get(Category, "Chance", aChance, "Chance generating").getInt(aChance); + fConfig.get(Category, "Registry", aRegistry).getString(); + fConfig.get(Category, "MinAmount", aMinAmount).getInt(aMinAmount); + fConfig.get(Category, "MaxAmount", aMaxAmount).getInt(aMaxAmount); + fConfig.get(Category, "Chance", aChance).getInt(aChance); + fConfig.get(Category, "DecreasePerOperationAmount", aDecreasePerOperationAmount).getInt(aDecreasePerOperationAmount); } public void SetDafultValues() { - fConfig.setCategoryComment(fCategory+".Default", "Set Default Generating"); - SetConfigValues("Default", "Default", "gas_natural_gas", "gas_natural_gas", 0, 625, 20); - SetConfigValues("Default", "Default", "liquid_light_oil", "liquid_light_oil", 0, 625, 20); - SetConfigValues("Default", "Default", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20); - SetConfigValues("Default", "Default", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20); - SetConfigValues("Default", "Default", "oil", "oil", 0, 625, 20); - - fConfig.setCategoryComment(fCategory+".Overworld", "Set Overworld Generating"); - SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20); - SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 625, 20); - SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20); - SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20); - SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20); - - fConfig.setCategoryComment(fCategory+".Nether", "Set Nether Generating"); - SetConfigValues("Nether", "-1", "ic2pahoehoelava", "ic2pahoehoelava", 0, 250, 100); - - fConfig.setCategoryComment(fCategory+".Moon", "Set Moon Generating"); - SetConfigValues("Moon", "Moon", "molten-cheese", "molten.cheese", 0, 125, 5); - SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 0, 375, 95); + SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20, 5); + SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 625, 20, 5); + SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20, 5); + SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20, 5); + SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20, 5); + SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 0, 375, 100, 5); } public void getConfig(Configuration aConfig, String aCategory) { @@ -79,7 +66,11 @@ public class GT_UO_DimensionList { SetDafultValues(); fConfig.setCategoryComment(fCategory, "Config Undeground Fluids (Delete this Category for regenerate)"); - int[] BlackList = {1}; + fConfig.setCategoryComment(fCategory+".Default", "Set Default Generating (Use this Category for Default settings)"); + fConfig.setCategoryComment(fCategory+".Overworld", "Set Overworld Generating"); + fConfig.setCategoryComment(fCategory+".Moon", "Set Moon Generating"); + + int[] BlackList = {-1,1}; BlackList = aConfig.get(fCategory, "DimBlackList", BlackList, "Dimension IDs Black List").getIntList(); java.util.Arrays.sort(BlackList); diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java index e326fac46c..c2d9b70bd2 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -10,16 +10,38 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; public class GT_UO_Fluid { - public String Registry; - public int MaxAmount; - public int MinAmount; - public int Chance; + public String Registry = "null"; + public int MaxAmount = 0; + public int MinAmount = 0; + public int Chance = 0; + public int DecreasePerOperationAmount = 5; - public GT_UO_Fluid(ConfigCategory aConfigCategory) { - Registry = aConfigCategory.get("Registry").getString();; - MaxAmount = aConfigCategory.get("MaxAmount").getInt(); - MinAmount = aConfigCategory.get("MinAmount").getInt(); - Chance = aConfigCategory.get("Chance").getInt(); + public GT_UO_Fluid(ConfigCategory aConfigCategory) { + if (aConfigCategory.containsKey("Registry")) + { + aConfigCategory.get("Registry").comment = "Fluid registry"; + Registry = aConfigCategory.get("Registry").getString(); + } + if (aConfigCategory.containsKey("MaxAmount")) + { + aConfigCategory.get("MaxAmount").comment = "Max amount generation (per operation Amount)"; + MaxAmount = aConfigCategory.get("MaxAmount").getInt(0); + } + if (aConfigCategory.containsKey("MinAmount")) + { + aConfigCategory.get("MinAmount").comment = "Max amount generation (per operation Amount)"; + MinAmount = aConfigCategory.get("MinAmount").getInt(0); + } + if (aConfigCategory.containsKey("Chance")) + { + aConfigCategory.get("Chance").comment = "Chance generating"; + Chance = aConfigCategory.get("Chance").getInt(0); + } + if (aConfigCategory.containsKey("DecreasePerOperationAmount")) + { + aConfigCategory.get("DecreasePerOperationAmount").comment = "Decrease per operation Amount (X/5000L per operation)"; + DecreasePerOperationAmount = aConfigCategory.get("DecreasePerOperationAmount").getInt(5); + } //System.out.println("GT UO "+aConfigCategory.getName()+" Fluid:"+Registry+" Max:"+MaxAmount+" Min:"+MinAmount+" Chance:"+Chance); } diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 0d8100c332..cf70f21069 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1524,19 +1524,6 @@ public class GT_Utility { return (int)Math.floor(aValue / aScale); } - public static int getUndergroundOilType(int aType, int aOil) { - switch (aType) { - case 1: - aOil = 10; - break; - case 2: - aOil = 11; - break; - } - return aOil; - } - - public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { return getUndergroundOil(aWorld, aX, aZ, false); } @@ -1549,6 +1536,7 @@ public class GT_Utility { Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); int tAmount = 0; int tFluidId = 0; + int tDecreasePerOperationAmount = 5; Fluid tFluid = null; // System.out.println("Dimension: "+GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).Dimension); try { @@ -1557,6 +1545,7 @@ public class GT_Utility { { tFluid = uoFluid.getFluid(); tAmount = uoFluid.getRandomAmount(tRandom); + tDecreasePerOperationAmount = uoFluid.DecreasePerOperationAmount; if (tFluid != null) tFluidId = tFluid.getID(); //System.out.println("Fluid: ("+tFluidId+")"+tFluid.getName()+" Amount:"+tAmount); @@ -1567,7 +1556,7 @@ public class GT_Utility { tFluidId = 0; } - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId+1, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId, getScaleСoordinates(aZ,16)); int[] tInts = new int[0]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); @@ -1585,7 +1574,7 @@ public class GT_Utility { } if (needConsumeOil && tAmount >= 5000) - tAmount = tAmount - 5; + tAmount = tAmount - tDecreasePerOperationAmount; tInts[0] = tAmount; tInts[2] = tFluidId; @@ -1789,7 +1778,7 @@ public class GT_Utility { tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId+1, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId, getScaleСoordinates(aZ,16)); if(GT_Proxy.chunkData.containsKey(tPos)){ int[] tPollution = GT_Proxy.chunkData.get(tPos); if(tPollution.length>1){ @@ -2056,6 +2045,7 @@ public class GT_Utility { setBookTitle(aStack, "Raw Prospection Data"); NBTTagCompound tNBT = GT_Utility.ItemNBT.getNBT(aStack); + tNBT.setByte("prospection_tier", aTier); tNBT.setString("prospection_pos", "X: " + aX + " Y: " + aY + " Z: " + aZ + " Dim: " + aDim); diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 0c21e1ec6a..e57c44040f 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -9,7 +9,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; @@ -189,16 +188,11 @@ public class GT_Pollution { } } - //Backward compatibility (NOT USE) - public static void addPollution(ChunkPosition aPos, int aPollution){ - addPollution(MinecraftServer.getServer().worldServerForDimension(0), aPos, aPollution); - } - //Add aWorld to Save Pollution public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; try{ - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId + 1, GT_Utility.getScaleСoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleСoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 // System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); int[] tData = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index d3d9347aa8..1639007c29 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1701,7 +1701,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { @SubscribeEvent public void handleChunkSaveEvent(ChunkDataEvent.Save event) { - ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId+1,event.getChunk().zPosition); + ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); if(chunkData.containsKey(tPos)){ int[] tInts = chunkData.get(tPos); if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);} @@ -1717,7 +1717,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { int tOilFluid = 0; int tPollution = 0; - ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId+1,event.getChunk().zPosition); + ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); int[] tData = new int[0]; if(chunkData.containsKey(tPos)){ tData = chunkData.get(tPos); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index e975242cc3..06bd899eb8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -31,6 +31,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; import sun.text.resources.es.CollationData_es; @@ -104,7 +105,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba prospectOres(tNearOres, tMiddleOres, tFarOres); // prospecting oils - HashMap tOils = new HashMap(9); + HashMap tOils = new HashMap(); prospectOils(tOils); GT_Utility.ItemNBT.setAdvancedProspectionData(mTier, @@ -126,32 +127,35 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectOils(HashMap aOils) { - int tLeftXBound = this.getBaseMetaTileEntity().getXCoord() - radius; - int tRightXBound = tLeftXBound + 2*radius; - - int tLeftZBound = this.getBaseMetaTileEntity().getZCoord() - radius; - int tRightZBound = tLeftZBound + 2*radius; - - ArrayList filterList = new ArrayList(9); - String filter; - - for (int x = tLeftXBound; x <= tRightXBound; ++x) - for (int z = tLeftZBound; z <= tRightZBound; ++z) { - filter = x/96 + "," + z/96; - - if (!filterList.contains(filter)) { - filterList.add(filter); - - putOil((x/96)*96, (z/96)*96, aOils); + int tLeftXBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getXCoord() - radius, 16); + int tRightXBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getXCoord() + radius, 16); + + int tLeftZBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getZCoord() - radius, 16); + int tRightZBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getZCoord() + radius, 16); + + HashMap tFluids = new HashMap(); + + try { + for (int x = tLeftXBound; x <= tRightXBound; ++x) + for (int z = tLeftZBound; z <= tRightZBound; ++z) + { + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(x*16,96), 0, GT_Utility.getScaleСoordinates(z*16,96)); + FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x*16, z*16); + if (tFluid != null) + if (tFluids.containsKey(tPos)) + { + if (tFluids.get(tPos).amount 0) + tFluids.put(tPos, tFluid); } - } - } - - private void putOil(int x, int z, HashMap aOils) { - FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x, z); - if (tFluid != null) - if (tFluid.amount / 5000 > 0) - aOils.put(x + "," + z + "," + (tFluid.amount / 5000) + "," + tFluid.getLocalizedName(), tFluid.amount / 5000); + + for (HashMap.Entry fl : tFluids.entrySet()) { + aOils.put(fl.getKey().chunkPosX + "," + fl.getKey().chunkPosZ + "," + (fl.getValue().amount / 5000) + "," + fl.getValue().getLocalizedName(), fl.getValue().amount / 5000); + } + } catch (Exception e) { + // TODO: handle exception + } } private void prospectOres(Map aNearOres, Map aMiddleOres, Map aFarOres) { -- cgit From 4e043f617b729fec6e011b0840657da434cafd27 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 28 Feb 2017 02:04:47 +0100 Subject: Circuit changes --- build.properties | 2 +- src/main/java/gregtech/GT_Mod.java | 3 +- src/main/java/gregtech/api/enums/ItemList.java | 10 +- src/main/java/gregtech/api/enums/Materials.java | 10 +- src/main/java/gregtech/api/enums/OrePrefixes.java | 6 +- src/main/java/gregtech/api/enums/Tier.java | 14 +- .../api/interfaces/internal/IGT_RecipeAdder.java | 25 ++- .../GT_MetaTileEntity_BasicMachine.java | 8 + src/main/java/gregtech/api/util/GT_Recipe.java | 3 +- src/main/java/gregtech/api/util/GT_Utility.java | 8 +- src/main/java/gregtech/common/GT_Pollution.java | 2 +- src/main/java/gregtech/common/GT_Proxy.java | 3 +- src/main/java/gregtech/common/GT_RecipeAdder.java | 26 ++- .../common/items/GT_IntegratedCircuit_Item.java | 2 +- .../common/items/GT_MetaGenerated_Item_01.java | 37 +++-- .../common/items/GT_MetaGenerated_Item_03.java | 174 ++++++++++++++++++++ .../GT_MetaTileEntity_AdvSeismicProspector.java | 10 +- .../basic/GT_MetaTileEntity_Disassembler.java | 14 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 18 +- .../loaders/oreprocessing/ProcessingCircuit.java | 23 ++- .../loaders/oreprocessing/ProcessingCrafting.java | 29 +++- .../loaders/oreprocessing/ProcessingGem.java | 2 +- .../loaders/oreprocessing/ProcessingLens.java | 3 +- .../loaders/oreprocessing/ProcessingPlate.java | 2 + .../loaders/postload/GT_CraftingRecipeLoader.java | 2 +- .../loaders/postload/GT_MachineRecipeLoader.java | 182 ++++++++++++++++++--- .../preload/GT_Loader_MetaTileEntities.java | 11 ++ .../java/gregtech/nei/GT_NEI_DefaultHandler.java | 10 +- .../circuitassembler/OVERLAY_BOTTOM.png | Bin 0 -> 143 bytes .../circuitassembler/OVERLAY_BOTTOM_ACTIVE.png | Bin 0 -> 143 bytes .../circuitassembler/OVERLAY_FRONT.png | Bin 0 -> 319 bytes .../circuitassembler/OVERLAY_FRONT_ACTIVE.png | Bin 0 -> 329 bytes .../circuitassembler/OVERLAY_SIDE.png | Bin 0 -> 143 bytes .../circuitassembler/OVERLAY_SIDE_ACTIVE.png | Bin 0 -> 143 bytes .../basicmachines/circuitassembler/OVERLAY_TOP.png | Bin 0 -> 311 bytes .../circuitassembler/OVERLAY_TOP_ACTIVE.png | Bin 0 -> 311 bytes .../gui/basicmachines/CircuitAssembler.png | Bin 0 -> 2437 bytes .../gregtech/textures/items/gt.metaitem.01/700.png | Bin 231 -> 1378 bytes .../gregtech/textures/items/gt.metaitem.01/703.png | Bin 319 -> 356 bytes .../gregtech/textures/items/gt.metaitem.01/705.png | Bin 348 -> 4051 bytes .../gregtech/textures/items/gt.metaitem.01/706.png | Bin 364 -> 4039 bytes .../gregtech/textures/items/gt.metaitem.01/710.png | Bin 223 -> 773 bytes .../gregtech/textures/items/gt.metaitem.01/711.png | Bin 223 -> 736 bytes .../gregtech/textures/items/gt.metaitem.01/712.png | Bin 252 -> 750 bytes .../gregtech/textures/items/gt.metaitem.01/715.png | Bin 273 -> 555 bytes .../gregtech/textures/items/gt.metaitem.01/716.png | Bin 441 -> 663 bytes .../gregtech/textures/items/gt.metaitem.01/717.png | Bin 450 -> 997 bytes .../gregtech/textures/items/gt.metaitem.01/718.png | Bin 520 -> 1064 bytes .../gregtech/textures/items/gt.metaitem.01/719.png | Bin 277 -> 738 bytes .../gregtech/textures/items/gt.metaitem.01/720.png | Bin 331 -> 708 bytes .../gregtech/textures/items/gt.metaitem.03/1.png | Bin 0 -> 773 bytes .../gregtech/textures/items/gt.metaitem.03/10.png | Bin 0 -> 663 bytes .../gregtech/textures/items/gt.metaitem.03/11.png | Bin 0 -> 1155 bytes .../gregtech/textures/items/gt.metaitem.03/12.png | Bin 0 -> 1403 bytes .../gregtech/textures/items/gt.metaitem.03/13.png | Bin 0 -> 1378 bytes .../gregtech/textures/items/gt.metaitem.03/14.png | Bin 0 -> 1067 bytes .../gregtech/textures/items/gt.metaitem.03/15.png | Bin 0 -> 555 bytes .../gregtech/textures/items/gt.metaitem.03/16.png | Bin 0 -> 1127 bytes .../gregtech/textures/items/gt.metaitem.03/17.png | Bin 0 -> 997 bytes .../gregtech/textures/items/gt.metaitem.03/18.png | Bin 0 -> 1150 bytes .../gregtech/textures/items/gt.metaitem.03/19.png | Bin 0 -> 1064 bytes .../gregtech/textures/items/gt.metaitem.03/2.png | Bin 0 -> 736 bytes .../gregtech/textures/items/gt.metaitem.03/20.png | Bin 0 -> 1175 bytes .../gregtech/textures/items/gt.metaitem.03/3.png | Bin 0 -> 750 bytes .../gregtech/textures/items/gt.metaitem.03/30.png | Bin 0 -> 985 bytes .../gregtech/textures/items/gt.metaitem.03/31.png | Bin 0 -> 1098 bytes .../gregtech/textures/items/gt.metaitem.03/32.png | Bin 0 -> 1070 bytes .../gregtech/textures/items/gt.metaitem.03/33.png | Bin 0 -> 1182 bytes .../gregtech/textures/items/gt.metaitem.03/34.png | Bin 0 -> 1275 bytes .../gregtech/textures/items/gt.metaitem.03/35.png | Bin 0 -> 1269 bytes .../gregtech/textures/items/gt.metaitem.03/36.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/37.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/38.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/39.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/4.png | Bin 0 -> 738 bytes .../gregtech/textures/items/gt.metaitem.03/40.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/41.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/42.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/43.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/44.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/45.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/46.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/47.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/48.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/49.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/5.png | Bin 0 -> 708 bytes .../gregtech/textures/items/gt.metaitem.03/50.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/51.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/52.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/53.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/54.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/55.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/56.png | Bin 0 -> 1501 bytes .../gregtech/textures/items/gt.metaitem.03/57.png | Bin 0 -> 1178 bytes .../gregtech/textures/items/gt.metaitem.03/6.png | Bin 0 -> 764 bytes .../gregtech/textures/items/gt.metaitem.03/69.png | Bin 0 -> 435 bytes .../gregtech/textures/items/gt.metaitem.03/70.png | Bin 0 -> 435 bytes .../gregtech/textures/items/gt.metaitem.03/700.png | Bin 0 -> 231 bytes .../gregtech/textures/items/gt.metaitem.03/701.png | Bin 0 -> 292 bytes .../gregtech/textures/items/gt.metaitem.03/703.png | Bin 0 -> 319 bytes .../gregtech/textures/items/gt.metaitem.03/704.png | Bin 0 -> 315 bytes .../gregtech/textures/items/gt.metaitem.03/705.png | Bin 0 -> 348 bytes .../gregtech/textures/items/gt.metaitem.03/707.png | Bin 0 -> 375 bytes .../gregtech/textures/items/gt.metaitem.03/708.png | Bin 0 -> 338 bytes .../gregtech/textures/items/gt.metaitem.03/71.png | Bin 0 -> 461 bytes .../gregtech/textures/items/gt.metaitem.03/710.png | Bin 0 -> 223 bytes .../gregtech/textures/items/gt.metaitem.03/711.png | Bin 0 -> 223 bytes .../gregtech/textures/items/gt.metaitem.03/712.png | Bin 0 -> 252 bytes .../gregtech/textures/items/gt.metaitem.03/713.png | Bin 0 -> 435 bytes .../gregtech/textures/items/gt.metaitem.03/714.png | Bin 0 -> 461 bytes .../gregtech/textures/items/gt.metaitem.03/715.png | Bin 0 -> 273 bytes .../gregtech/textures/items/gt.metaitem.03/716.png | Bin 0 -> 441 bytes .../gregtech/textures/items/gt.metaitem.03/717.png | Bin 0 -> 450 bytes .../gregtech/textures/items/gt.metaitem.03/718.png | Bin 0 -> 520 bytes .../gregtech/textures/items/gt.metaitem.03/719.png | Bin 0 -> 277 bytes .../gregtech/textures/items/gt.metaitem.03/72.png | Bin 0 -> 252 bytes .../gregtech/textures/items/gt.metaitem.03/720.png | Bin 0 -> 331 bytes .../gregtech/textures/items/gt.metaitem.03/73.png | Bin 0 -> 9505 bytes .../gregtech/textures/items/gt.metaitem.03/79.png | Bin 0 -> 321 bytes .../gregtech/textures/items/gt.metaitem.03/80.png | Bin 0 -> 319 bytes .../gregtech/textures/items/gt.metaitem.03/82.png | Bin 0 -> 323 bytes .../gregtech/textures/items/gt.metaitem.03/83.png | Bin 0 -> 358 bytes .../gregtech/textures/items/gt.metaitem.03/85.png | Bin 0 -> 319 bytes .../gregtech/textures/items/gt.metaitem.03/86.png | Bin 0 -> 348 bytes .../gregtech/textures/items/gt.metaitem.03/88.png | Bin 0 -> 4043 bytes .../gregtech/textures/items/gt.metaitem.03/89.png | Bin 0 -> 325 bytes .../gregtech/textures/items/gt.metaitem.03/90.png | Bin 0 -> 364 bytes .../gregtech/textures/items/gt.metaitem.03/91.png | Bin 0 -> 4059 bytes .../gregtech/textures/items/gt.metaitem.03/92.png | Bin 0 -> 320 bytes .../gregtech/textures/items/gt.metaitem.03/93.png | Bin 0 -> 350 bytes .../gregtech/textures/items/gt.metaitem.03/95.png | Bin 0 -> 4062 bytes 131 files changed, 537 insertions(+), 102 deletions(-) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/build.properties b/build.properties index ea38d5b8a2..65af08acaa 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ minecraft.version=1.7.10 forge.version=10.13.4.1566-1.7.10 -gt.version=5.09.28pre3 +gt.version=5.09.28pre5 ae2.version=rv2-beta-33 applecore.version=1.7.10-1.2.1+107.59407 diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index ef0635bc2d..734c6b5c4f 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -254,7 +254,8 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mExplosionItemDrop = tMainConfig.get("general", "ExplosionItemDrops", false).getBoolean(false); gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); - + gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); + GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); GregTech_API.mEUtoRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "100EUtoRF", 360); diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 734e68f786..e093815b5b 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -640,7 +640,15 @@ public enum ItemList implements IItemContainer { ModularElectric1Helmet, ModularElectric1Chestplate, ModularElectric1Leggings, ModularElectric1Boots, ModularElectric2Helmet, ModularElectric2Chestplate, ModularElectric2Leggings, ModularElectric2Boots, Block_Powderbarrel, GelledToluene, FluidRegulator_LV, FluidRegulator_MV, FluidRegulator_HV, FluidRegulator_EV, FluidRegulator_IV, FluidRegulator_LuV, FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, QuantumEye, QuantumStar, Gravistar, Block_SSFUEL, Block_MSSFUEL, SFMixture, MSFMixture, Depleted_Naquadah_1, Depleted_Naquadah_2, Depleted_Naquadah_4, NaquadahCell_1, NaquadahCell_2, NaquadahCell_4, Hatch_AutoMaintenance, - Machine_Multi_Cleanroom; + Machine_Multi_Cleanroom, Circuit_Board_Coated, Circuit_Board_Phenolic, Circuit_Board_Epoxy, Circuit_Board_Fiberglass, Circuit_Board_Multifiberglass, Circuit_Board_Wetware, + Circuit_Parts_Resistor, Circuit_Parts_ResistorSMD, Circuit_Parts_Glass_Tube, Circuit_Parts_Vacuum_Tube, Circuit_Parts_Coil, Circuit_Parts_Diode, Circuit_Parts_DiodeSMD, Circuit_Parts_Transistor, Circuit_Parts_TransistorSMD, Circuit_Parts_Capacitor, Circuit_Parts_CapacitorSMD, + Circuit_Silicon_Ingot, Circuit_Silicon_Ingot2, Circuit_Silicon_Ingot3, Circuit_Silicon_Wafer, Circuit_Silicon_Wafer2, Circuit_Silicon_Wafer3, Circuit_Wafer_ILC, Circuit_Chip_ILC, Circuit_Wafer_Ram, Circuit_Chip_Ram, + Circuit_Wafer_NAND, Circuit_Chip_NAND, Circuit_Wafer_NOR, Circuit_Chip_NOR, Circuit_Wafer_CPU, Circuit_Chip_CPU, Circuit_Wafer_SoC, Circuit_Chip_SoC, Circuit_Wafer_SoC2, Circuit_Chip_SoC2, Circuit_Wafer_PIC, Circuit_Chip_PIC, + Circuit_Wafer_HPIC, Circuit_Chip_HPIC, Circuit_Wafer_NanoCPU, Circuit_Chip_NanoCPU, Circuit_Wafer_QuantumCPU, Circuit_Chip_QuantumCPU, + Circuit_Chip_CrystalCPU, Circuit_Chip_CrystalSoC, Circuit_Chip_NeuroCPU, Circuit_Chip_Stemcell, + Circuit_Processor, Circuit_Computer, Circuit_Nanoprocessor, Circuit_Nanocomputer, Circuit_Elitenanocomputer, Circuit_Quantumprocessor, Circuit_Quantumcomputer, Circuit_Masterquantumcomputer, + Circuit_Quantummainframe, Circuit_Crystalprocessor, Circuit_Crystalcomputer, Circuit_Crystalmainframe, Circuit_Neuroprocessor, Circuit_Wetwarecomputer, Circuit_Wetwaresupercomputer, Circuit_Wetwaremainframe, Circuit_Parts_RawCrystalChip, + Machine_LV_CircuitAssembler, Machine_MV_CircuitAssembler, Machine_HV_CircuitAssembler, Machine_EV_CircuitAssembler, Machine_IV_CircuitAssembler, Machine_LuV_CircuitAssembler, Machine_ZPM_CircuitAssembler, Machine_UV_CircuitAssembler, Circuit_Integrated_Good; public static final ItemList[] DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}, SPRAY_CAN_DYES = {Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15}, SPRAY_CAN_DYES_USED = {Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15}, TRANSFORMERS = {Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV}, MACHINE_HULLS = {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, HATCHES_DYNAMO = {Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX}, HATCHES_ENERGY = {Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX}, HATCHES_INPUT = {Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX}, HATCHES_INPUT_BUS = {Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX}, HATCHES_OUTPUT = {Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX}, HATCHES_OUTPUT_BUS = {Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX}, HATCHES_MUFFLER = {Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX}; diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 85b9130061..6c2135ee44 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -103,7 +103,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Rubidium = new Materials(43, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 240, 30, 30, 0, "Rubidium", "Rubidium", 0, 0, 312, 0, false, false, 4, 1, 1, Dyes.dyeRed, Element.Rb, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.VITREUS, 1))); public static Materials Samarium = new Materials(69, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 255, 255, 255, 0, "Samarium", "Samarium", 0, 0, 1345, 1345, true, false, 4, 1, 1, Dyes._NULL, Element.Sm, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); public static Materials Scandium = new Materials(27, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 255, 255, 255, 0, "Scandium", "Scandium", 0, 0, 1814, 1814, true, false, 2, 1, 1, Dyes.dyeYellow, Element.Sc, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.RADIO, 1))); - public static Materials Silicon = new Materials(20, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 60, 60, 80, 0, "Silicon", "Silicon", 0, 0, 1687, 1687, true, false, 1, 1, 1, Dyes.dyeBlack, Element.Si, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); + public static Materials Silicon = new Materials(20, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|2|32, 60, 60, 80, 0, "Silicon", "Silicon", 0, 0, 1687, 1687, false, false, 1, 1, 1, Dyes.dyeBlack, Element.Si, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.TENEBRAE, 1))); public static Materials Silver = new Materials(54, TextureSet.SET_SHINY, 10.0F, 64, 2, 1|2|8|32|64|128, 220, 220, 255, 0, "Silver", "Silver", 0, 0, 1234, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Ag, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.LUCRUM, 1))); public static Materials Sodium = new Materials(17, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1 |32, 0, 0, 150, 0, "Sodium", "Sodium", 0, 0, 370, 0, false, false, 1, 1, 1, Dyes.dyeBlue, Element.Na, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 2), new TC_AspectStack(TC_Aspects.LUX, 1))); public static Materials Strontium = new Materials(44, TextureSet.SET_METALLIC, 1.0F, 0, 2, 1|32, 200, 200, 200, 0, "Strontium", "Strontium", 0, 0, 1050, 0, false, false, 1, 1, 1, Dyes.dyeLightGray, Element.Sr, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.STRONTIO, 1))); @@ -946,14 +946,16 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Tungstate .addOreByProducts(Manganese , Silver , Lithium ); Bauxite .addOreByProducts(Grossular , Rutile , Gallium ); QuartzSand .addOreByProducts(CertusQuartz , Quartzite , Barite ); - Quartzite .addOreByProducts(CertusQuartz , Barite ); - CertusQuartz .addOreByProducts(Quartzite , Barite ); Redstone .addOreByProducts(Cinnabar , RareEarth , Glowstone ); Monazite .addOreByProducts(Thorium , Neodymium , RareEarth ); Forcicium .addOreByProducts(Thorium , Neodymium , RareEarth ); Forcillium .addOreByProducts(Thorium , Neodymium , RareEarth ); Malachite .addOreByProducts(Copper , BrownLimonite , Calcite ); YellowLimonite .addOreByProducts(Nickel , BrownLimonite , Cobalt ); + Lepidolite .addOreByProducts(Lithium , Caesium , Boron ); + Andradite .addOreByProducts(GarnetYellow , Iron , Boron ); + Quartzite .addOreByProducts(CertusQuartz , Barite ); + CertusQuartz .addOreByProducts(Quartzite , Barite ); BrownLimonite .addOreByProducts(Malachite , YellowLimonite ); Neodymium .addOreByProducts(Monazite , RareEarth ); Bastnasite .addOreByProducts(Neodymium , RareEarth ); @@ -962,7 +964,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Tungsten .addOreByProducts(Manganese , Molybdenum ); Diatomite .addOreByProducts(BandedIron , Sapphire ); Iron .addOreByProducts(Nickel , Tin ); - Lepidolite .addOreByProducts(Lithium , Caesium ); Gold .addOreByProducts(Copper , Nickel ); Tin .addOreByProducts(Iron , Zinc ); Antimony .addOreByProducts(Zinc , Iron ); @@ -999,7 +1000,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { Pyrope .addOreByProducts(GarnetRed , Magnesium ); Almandine .addOreByProducts(GarnetRed , Aluminium ); Spessartine .addOreByProducts(GarnetRed , Manganese ); - Andradite .addOreByProducts(GarnetYellow , Iron ); Grossular .addOreByProducts(GarnetYellow , Calcium ); Uvarovite .addOreByProducts(GarnetYellow , Chrome ); Calcite .addOreByProducts(Andradite , Malachite ); diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index e8cf57ffd2..0577754fcc 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -697,11 +697,13 @@ public enum OrePrefixes { if (!enableUnusedFoil && !(aMaterial == Materials.Zinc || aMaterial == Materials.Aluminium || aMaterial == Materials.Silicon || aMaterial == Materials.Gold || aMaterial == Materials.Electrum || aMaterial == Materials.Platinum || aMaterial == Materials.Osmiridium || aMaterial == Materials.Osmium || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Steel || aMaterial == Materials.Copper || aMaterial == Materials.YttriumBariumCuprate - || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.Naquadah)) + || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.Naquadah || aMaterial == Materials.Manganese || + aMaterial == Materials.Plastic || aMaterial == Materials.Silicone)) foil.mDisabledItems.add(aMaterial); //Fine Wire if (!enableUnusedFineWires && !(aMaterial == Materials.Steel || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Platinum || aMaterial == Materials.Osmium || - aMaterial == Materials.Tin || aMaterial == Materials.Lead || aMaterial == Materials.SolderingAlloy)) + aMaterial == Materials.Tin || aMaterial == Materials.Lead || aMaterial == Materials.SolderingAlloy || aMaterial == Materials.Copper || aMaterial == Materials.Electrum || + aMaterial == Materials.Gold || aMaterial == Materials.RedAlloy || aMaterial == Materials.Graphene || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.YttriumBariumCuprate )) wireFine.mDisabledItems.add(aMaterial); //Gears if (!enableUnusedGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Iron || aMaterial == Materials.Copper || diff --git a/src/main/java/gregtech/api/enums/Tier.java b/src/main/java/gregtech/api/enums/Tier.java index 265d2866ab..c40a4d8ed2 100644 --- a/src/main/java/gregtech/api/enums/Tier.java +++ b/src/main/java/gregtech/api/enums/Tier.java @@ -9,13 +9,13 @@ public class Tier { new Tier(SubTag.ENERGY_ELECTRICITY, 0, 8, 1, 1, 1, Materials.WroughtIron, ItemList.Hull_ULV, OrePrefixes.cableGt01.get(Materials.Lead), OrePrefixes.cableGt04.get(Materials.Lead), OrePrefixes.circuit.get(Materials.Primitive), OrePrefixes.circuit.get(Materials.Basic)), new Tier(SubTag.ENERGY_ELECTRICITY, 1, 32, 1, 1, 1, Materials.Steel, ItemList.Hull_LV, OrePrefixes.cableGt01.get(Materials.Tin), OrePrefixes.cableGt04.get(Materials.Tin), OrePrefixes.circuit.get(Materials.Basic), OrePrefixes.circuit.get(Materials.Good)), new Tier(SubTag.ENERGY_ELECTRICITY, 2, 128, 1, 1, 1, Materials.Aluminium, ItemList.Hull_MV, OrePrefixes.cableGt01.get(Materials.AnyCopper), OrePrefixes.cableGt04.get(Materials.AnyCopper), OrePrefixes.circuit.get(Materials.Good), OrePrefixes.circuit.get(Materials.Advanced)), - new Tier(SubTag.ENERGY_ELECTRICITY, 3, 512, 1, 1, 1, Materials.StainlessSteel, ItemList.Hull_HV, OrePrefixes.cableGt01.get(Materials.Gold), OrePrefixes.cableGt04.get(Materials.Gold), OrePrefixes.circuit.get(Materials.Advanced), OrePrefixes.circuit.get(Materials.Elite)), - new Tier(SubTag.ENERGY_ELECTRICITY, 4, 2048, 1, 1, 1, Materials.Titanium, ItemList.Hull_EV, OrePrefixes.cableGt01.get(Materials.Aluminium), OrePrefixes.cableGt04.get(Materials.Aluminium), OrePrefixes.circuit.get(Materials.Elite), OrePrefixes.circuit.get(Materials.Master)), - new Tier(SubTag.ENERGY_ELECTRICITY, 5, 8192, 1, 1, 1, Materials.TungstenSteel, ItemList.Hull_IV, OrePrefixes.cableGt01.get(Materials.Platinum), OrePrefixes.cableGt04.get(Materials.Platinum), OrePrefixes.circuit.get(Materials.Master), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 6, 32768, 1, 1, 1, Materials.Chrome, ItemList.Hull_LuV, OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 7, 131072, 1, 1, 1, Materials.Iridium, ItemList.Hull_ZPM, OrePrefixes.cableGt01.get(Materials.Naquadah), OrePrefixes.cableGt04.get(Materials.Naquadah), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 8, 524288, 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), OrePrefixes.cableGt01.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), - new Tier(SubTag.ENERGY_ELECTRICITY, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Ultimate)), + new Tier(SubTag.ENERGY_ELECTRICITY, 3, 512, 1, 1, 1, Materials.StainlessSteel, ItemList.Hull_HV, OrePrefixes.cableGt01.get(Materials.Gold), OrePrefixes.cableGt04.get(Materials.Gold), OrePrefixes.circuit.get(Materials.Advanced), OrePrefixes.circuit.get(Materials.Data)), + new Tier(SubTag.ENERGY_ELECTRICITY, 4, 2048, 1, 1, 1, Materials.Titanium, ItemList.Hull_EV, OrePrefixes.cableGt01.get(Materials.Aluminium), OrePrefixes.cableGt04.get(Materials.Aluminium), OrePrefixes.circuit.get(Materials.Data), OrePrefixes.circuit.get(Materials.Elite)), + new Tier(SubTag.ENERGY_ELECTRICITY, 5, 8192, 1, 1, 1, Materials.TungstenSteel, ItemList.Hull_IV, OrePrefixes.cableGt01.get(Materials.Platinum), OrePrefixes.cableGt04.get(Materials.Platinum), OrePrefixes.circuit.get(Materials.Elite), OrePrefixes.circuit.get(Materials.Master)), + new Tier(SubTag.ENERGY_ELECTRICITY, 6, 32768, 1, 1, 1, Materials.Chrome, ItemList.Hull_LuV, OrePrefixes.cableGt01.get(Materials.NiobiumTitanium), OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), OrePrefixes.circuit.get(Materials.Master), OrePrefixes.circuit.get(Materials.Ultimate)), + new Tier(SubTag.ENERGY_ELECTRICITY, 7, 131072, 1, 1, 1, Materials.Iridium, ItemList.Hull_ZPM, OrePrefixes.cableGt01.get(Materials.Naquadah), OrePrefixes.cableGt04.get(Materials.Naquadah), OrePrefixes.circuit.get(Materials.Ultimate), OrePrefixes.circuit.get(Materials.Superconductor)), + new Tier(SubTag.ENERGY_ELECTRICITY, 8, 524288, 1, 1, 1, Materials.Osmium, ItemList.Hull_UV, OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), OrePrefixes.cableGt01.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Infinite)), + new Tier(SubTag.ENERGY_ELECTRICITY, 9, Integer.MAX_VALUE, 1, 1, 1, Materials.Neutronium, ItemList.Hull_MAX, OrePrefixes.wireGt01.get(Materials.Superconductor), OrePrefixes.wireGt04.get(Materials.Superconductor), OrePrefixes.circuit.get(Materials.Infinite), OrePrefixes.circuit.get(Materials.Infinite)), }, ROTATIONAL = new Tier[]{ new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 1, 1, Materials.Wood, OrePrefixes.frameGt.get(Materials.Wood), OrePrefixes.stick.get(Materials.Wood), OrePrefixes.ingot.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Wood), OrePrefixes.gearGt.get(Materials.Stone)), new Tier(SubTag.ENERGY_ROTATIONAL, 1, 32, 1, 2, 2, Materials.WoodSealed, OrePrefixes.frameGt.get(Materials.WoodSealed), OrePrefixes.stick.get(Materials.WoodSealed), OrePrefixes.ingot.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.WoodSealed), OrePrefixes.gearGt.get(Materials.Stone)), diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 0d50ae77c5..480cde5411 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -182,7 +182,7 @@ public interface IGT_RecipeAdder { public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Circuit Assembler Recipe + * Adds a Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -192,7 +192,7 @@ public interface IGT_RecipeAdder { public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Circuit Assembler Recipe + * Adds a Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -201,6 +201,18 @@ public interface IGT_RecipeAdder { */ public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + + /** + * Adds a Assembler Recipe + * + * @param aInputs must be 1-6 ItemStacks + * @param aFluidInput 0-1 fluids + * @param aOutput must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt); + /** * Adds a Assemblyline Recipe * @@ -458,6 +470,11 @@ public interface IGT_RecipeAdder { */ public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt); + /** + * Adds a Recipe for the Autoclave + */ + public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom); + /** * Adds a Recipe for the Mixer */ @@ -467,6 +484,10 @@ public interface IGT_RecipeAdder { * Adds a Recipe for the Laser Engraver */ public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); + /** + * Adds a Recipe for the Laser Engraver + */ + public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom); /** * Adds a Recipe for the Forming Press diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 6da78e1871..d82d12149d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -1,5 +1,6 @@ package gregtech.api.metatileentity.implementations; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; @@ -47,6 +48,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0; public FluidStack mOutputFluid; public String mGUIName = "", mNEIName = ""; + public GT_MetaTileEntity_MultiBlockBase mCleanroom; /** * Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered */ @@ -730,6 +732,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId == -27)return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; @@ -741,6 +744,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B for (int i = 0; i < mOutputItems.length; i++) if (getBaseMetaTileEntity().getRandomNumber(10000) < tRecipe.getOutputChance(i)) mOutputItems[i] = tRecipe.getOutput(i); + if(tRecipe.mSpecialValue == -200){ + if(mCleanroom==null)return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (mOutputItems[0]==null || getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) + mOutputItems[0] = null; + } mOutputFluid = tRecipe.getFluidOutput(0); calculateOverclockedNess(tRecipe); return FOUND_AND_SUCCESSFULLY_USED_RECIPE; diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 755315e1e8..d509e6afe3 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -491,7 +491,8 @@ public class GT_Recipe { public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map(new HashSet(400), "gt.recipe.metalbender", "Metal Bender", null, RES_PATH_GUI + "basicmachines/Bender", 2, 1, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map(new HashSet(3000), "gt.recipe.alloysmelter", "Alloy Smelter", null, RES_PATH_GUI + "basicmachines/AlloySmelter", 2, 1, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet(300), "gt.recipe.assembler", "Assembler", null, RES_PATH_GUI + "basicmachines/Assembler", 2, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map(new HashSet(300), "gt.recipe.canner", "Canning Machine", null, RES_PATH_GUI + "basicmachines/Canner", 2, 2, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sCircuitAssemblerRecipes = new GT_Recipe_Map_Assembler(new HashSet(300), "gt.recipe.circuitassembler", "Circuit Assembler", null, RES_PATH_GUI + "basicmachines/CircuitAssembler", 6, 1, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map(new HashSet(300), "gt.recipe.canner", "Canning Machine", null, RES_PATH_GUI + "basicmachines/Canner", 2, 2, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.cncmachine", "CNC Machine", null, RES_PATH_GUI + "basicmachines/Default", 2, 1, 2, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map(new HashSet(400), "gt.recipe.lathe", "Lathe", null, RES_PATH_GUI + "basicmachines/Lathe", 1, 2, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map(new HashSet(200), "gt.recipe.cuttingsaw", "Cutting Saw", null, RES_PATH_GUI + "basicmachines/Cutter", 1, 2, 1, 1, 1, E, 1, E, true, true); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index cf70f21069..3d151175a2 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1520,7 +1520,7 @@ public class GT_Utility { return false; } - public static int getScaleСoordinates(double aValue, int aScale) { + public static int getScaleCoordinates(double aValue, int aScale) { return (int)Math.floor(aValue / aScale); } @@ -1533,7 +1533,7 @@ public class GT_Utility { if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(aWorld.provider.dimensionId)) return null; - Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleСoordinates(aX,96)) + (7 * (getScaleСoordinates(aZ,96))))); + Random tRandom = new Random((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleCoordinates(aX,96)) + (7 * (getScaleCoordinates(aZ,96))))); int tAmount = 0; int tFluidId = 0; int tDecreasePerOperationAmount = 5; @@ -1556,7 +1556,7 @@ public class GT_Utility { tFluidId = 0; } - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); int[] tInts = new int[0]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); @@ -1778,7 +1778,7 @@ public class GT_Utility { tList.add("Oil in Chunk: " + tFluid.amount + " " + tFluid.getLocalizedName()); } // if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(getScaleСoordinates(aX,16), aWorld.provider.dimensionId, getScaleСoordinates(aZ,16)); + ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); if(GT_Proxy.chunkData.containsKey(tPos)){ int[] tPollution = GT_Proxy.chunkData.get(tPos); if(tPollution.length>1){ diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index e57c44040f..1fae98a25c 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -192,7 +192,7 @@ public class GT_Pollution { public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; try{ - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleСoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleCoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 // System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); int[] tData = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 1639007c29..3d873bbb27 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -193,7 +193,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mEnableAllMaterials = false; public boolean mEnableAllComponents = false; public boolean mAddGTRecipesToIC2Machines = true; - + public boolean mLowGravProcessing = true; + public GT_Proxy() { GameRegistry.registerFuelHandler(this); MinecraftForge.EVENT_BUS.register(this); diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 470cc665a6..bbcaf07ff9 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -610,15 +610,18 @@ public class GT_RecipeAdder GT_Recipe.GT_Recipe_Map.sPrinterRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, aSpecialSlot, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); return true; } - public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt) { + return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt, false); + } + + public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -100 : 0); return true; } @@ -635,15 +638,18 @@ public class GT_RecipeAdder GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, aInput3, aInput4}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); return true; } - public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { + return addLaserEngraverRecipe( aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); + } + + public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom) { if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) { return false; } if ((aDuration = GregTech_API.sRecipeFile.get("laserengraving", aEngravedItem, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(true, new ItemStack[]{aItemToEngrave, aLens}, new ItemStack[]{aEngravedItem}, null, null, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(true, new ItemStack[]{aItemToEngrave, aLens}, new ItemStack[]{aEngravedItem}, null, null, null, aDuration, aEUt, aCleanroom ? -200 : 0); return true; } @@ -835,6 +841,18 @@ public class GT_RecipeAdder return true; } + @Override + public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt) { + if ((aInputs == null) || (aOutput == null) || aInputs.length>6 || aInputs.length<1) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("circuitassembler", aOutput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0); + return true; + } + diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index 73d3ec8c24..bb11224f13 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -21,7 +21,7 @@ import java.util.List; public class GT_IntegratedCircuit_Item extends GT_Generic_Item { private final static String aTextEmptyRow = " "; public GT_IntegratedCircuit_Item() { - super("integrated_circuit", "Integrated Circuit", ""); + super("integrated_circuit", "Programmed Circuit", ""); setHasSubtypes(true); setMaxDamage(0); diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 44c875f099..143fa32baf 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -616,31 +616,32 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { GT_ModHandler.addCraftingRecipe(ItemList.Sensor_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderPearl), 'S', OrePrefixes.stick.get(Materials.Platinum), 'P', OrePrefixes.plate.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Elite)}); GT_ModHandler.addCraftingRecipe(ItemList.Sensor_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"P Q", "PS ", "CPP", 'Q', OrePrefixes.gem.get(Materials.EnderEye), 'S', OrePrefixes.stick.get(Materials.Osmium), 'P', OrePrefixes.plate.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Master)}); - ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "NAND Chip", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive)})); - ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Basic Electronic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic)})); - ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good)})); - ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Advanced Circuit", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced)})); - ItemList.Circuit_Data.set(addItem(tLastID = 704, "Data Storage Circuit", "A Data Storage Chip", new Object[]{OrePrefixes.circuit.get(Materials.Data)})); - ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Data Control Circuit", "A Processor", new Object[]{OrePrefixes.circuit.get(Materials.Elite)})); - ItemList.Circuit_Master.set(addItem(tLastID = 706, "Energy Flow Circuit", "A High Voltage Processor", new Object[]{OrePrefixes.circuit.get(Materials.Master)})); + ItemList.Circuit_Primitive.set(addItem(tLastID = 700, "Vacuum Tube", "A very simple Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Primitive), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Parts_Vacuum_Tube.set(ItemList.Circuit_Primitive.get(1,new Object[0])); + ItemList.Circuit_Basic.set(addItem(tLastID = 701, "Integrated Logic Circuit", "A basic Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Basic), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Good.set(addItem(tLastID = 702, "Good Electronic Circuit", "A good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Advanced.set(addItem(tLastID = 703, "Processor Assembly", "An advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Computer.set(ItemList.Circuit_Advanced.get(1,new Object[0])); + ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "A extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "A elite Processor", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A master Processor", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()})); ItemList.Circuit_Ultimate.set(ItemList.Tool_DataOrb.get(1L, new Object[0])); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L, new Object[0])}); ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()})); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L, new Object[0])}); - - - ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Basic Circuit Board", "A basic Board", new Object[0])); - ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Advanced Circuit Board", "An advanced Board", new Object[0])); - ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Processor Board", "A Processor Board", new Object[0])); + + ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "A basic Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0])); + ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1,new Object[0])); + ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiberglass Circuit Board", "A elite Board", new Object[0])); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1,new Object[0])); ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits", new Object[0])); ItemList.Circuit_Parts_Crystal_Chip_Master.set(addItem(tLastID = 714, "Engraved Lapotron Chip", "Needed for Circuits", new Object[0])); - ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Advanced Circuit Parts", "Advanced Circuit Parts", new Object[0])); - ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Etched Medium Voltage Wiring", "Part of Circuit Boards", new Object[0])); - ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Etched High Voltage Wiring", "Part of Circuit Boards", new Object[0])); - ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Etched Extreme Voltage Wiring", "Part of Circuit Boards", new Object[0])); - ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Empty Circuit Board", "A Board Part", new Object[0])); - ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Empty Processor Board", "A Processor Board Part", new Object[0])); + ItemList.Circuit_Parts_Advanced.set(addItem(tLastID = 715, "Diode", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Diode.set(ItemList.Circuit_Parts_Advanced.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Resistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Resistor.set(ItemList.Circuit_Parts_Wiring_Basic.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Transistor", "Basic Electronic Component", new Object[0])); ItemList.Circuit_Parts_Transistor.set(ItemList.Circuit_Parts_Wiring_Advanced.get(1,new Object[0])); + ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Capacitor", "Electronic Component", new Object[0])); ItemList.Circuit_Parts_Capacitor.set(ItemList.Circuit_Parts_Wiring_Elite.get(1,new Object[0])); + ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Phenolic Circuit Board", "A good Board", new Object[0])); ItemList.Circuit_Board_Phenolic.set(ItemList.Empty_Board_Basic.get(1,new Object[0])); + ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Fiberglass Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Fiberglass.set(ItemList.Empty_Board_Elite.get(1,new Object[0])); ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade})); diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java index c1da435e52..27c7f2b834 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java @@ -1,8 +1,20 @@ package gregtech.common.items; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.SubTag; import gregtech.api.items.GT_MetaGenerated_Item_X32; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import ic2.core.IC2; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { @@ -11,6 +23,168 @@ public class GT_MetaGenerated_Item_03 public GT_MetaGenerated_Item_03() { super("metaitem.03", new OrePrefixes[]{OrePrefixes.crateGtDust, OrePrefixes.crateGtIngot, OrePrefixes.crateGtGem, OrePrefixes.crateGtPlate}); INSTANCE = this; + int tLastID = 0; + Object[] o = new Object[0]; + + /** + * circuit boards tier 1-7: + * coated circuit board / wood plate + resin + * phenolic circuit board /carton+glue+chemical bath + * epoxy circuit board /epoxy plate + copper foil + sulfuric acid + * fiberglass circuit board (simple + multilayer) / glass + plastic + electrum foil + sulfurci acid + * wetware lifesupport board / fiberglass CB + teflon + + */ +// ItemList.Circuit_Board_Coated.set(addItem(tLastID = 1, "Coated Circuit Board", "A basic Board", o)); +// ItemList.Circuit_Board_Phenolic.set(addItem(tLastID = 2, "Phenolic Circuit Board", "A good Board", o)); +// ItemList.Circuit_Board_Epoxy.set(addItem(tLastID = 3, "Epoxy Circuit Board", "An advanced Board", o)); +// ItemList.Circuit_Board_Fiberglass.set(addItem(tLastID = 4, "Fiberglass Circuit Board", "An advanced Board", o)); +// ItemList.Circuit_Board_Multifiberglass.set(addItem(tLastID = 5, "Multilayer Fiberglass Circuit Board", "A elite Board", o)); + ItemList.Circuit_Board_Wetware.set(addItem(tLastID = 6, "Wetware Lifesupport Circuit Board", "The Board that keeps life", o)); + + /** + * electronic components: + * vacuum tube (glass tube + red alloy cables) + * basic electronic circuits normal+smd + * coils + * diodes normal+smd + * transistors normal+smd + * capacitors normal+smd + */ +// ItemList.Circuit_Parts_Resistor.set(addItem(tLastID = 10, "Resistor", "Basic Electronic Component", o)); //wiring mv + ItemList.Circuit_Parts_ResistorSMD.set(addItem(tLastID = 11, "SMD Resistor", "Electronic Component", o)); + ItemList.Circuit_Parts_Glass_Tube.set(addItem(tLastID = 12, "Glass Tube", "", o)); +// ItemList.Circuit_Parts_Vacuum_Tube.set(addItem(tLastID = 13, "Vacuum Tube", "Basic Electronic Component", o)); //Circuit_Primitive + ItemList.Circuit_Parts_Coil.set(addItem(tLastID = 14, "Small Coil", "Basic Electronic Component", o)); +// ItemList.Circuit_Parts_Diode.set(addItem(tLastID = 15, "Diode", "Basic Electronic Component", o)); + ItemList.Circuit_Parts_DiodeSMD.set(addItem(tLastID = 16, "SMD Diode", "Electronic Component", o)); +// ItemList.Circuit_Parts_Transistor.set(addItem(tLastID = 17, "Transistor", "Basic Electronic Component", o)); //wiring hv + ItemList.Circuit_Parts_TransistorSMD.set(addItem(tLastID = 18, "SMD Transistor", "Electronic Component", o)); +// ItemList.Circuit_Parts_Capacitor.set(addItem(tLastID = 19, "Capacitor", "Electronic Component", o)); //wiring ev + ItemList.Circuit_Parts_CapacitorSMD.set(addItem(tLastID = 20, "SMD Capacitor", "Electronic Component", o)); + + + /** + * ICs + * Lenses made from perfect crystals first instead of plates + * Monocrystalline silicon ingot (normal+glowstone+naquadah) EBF, normal silicon no EBF need anymore + * wafer(normal+glowstone+naquadah) cut mono silicon ingot in cutting machine + * + * Integrated Logic Circuit(8bit DIP) + * RAM + * NAND Memory + * NOR Memory + * CPU (4 sizes) + * SoCs(2 sizes, high tier cheap low tech component) + * Power IC/High Power IC + * + * nanotube interconnected circuit (H-IC + nanotubes) + * + * quantum chips + */ + ItemList.Circuit_Silicon_Ingot.set(addItem(tLastID = 30, "Monocrystalline Silicon Ingot", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot2.set(addItem(tLastID = 31, "Glowstone doted Monocrystalline Silicon Ingot", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Ingot3.set(addItem(tLastID = 32, "Naquadah doted Monocrystalline Silicon Ingot", "Raw Circuit", o)); + + ItemList.Circuit_Silicon_Wafer.set(addItem(tLastID = 33, "Wafer", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Wafer2.set(addItem(tLastID = 34, "Glowstone doted Wafer", "Raw Circuit", o)); + ItemList.Circuit_Silicon_Wafer3.set(addItem(tLastID = 35, "Naquadah doted Wafer", "Raw Circuit", o)); + + ItemList.Circuit_Wafer_ILC.set(addItem(tLastID = 36, "Integrated Logic Circuit (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_ILC.set(addItem(tLastID = 37, "Integrated Logic Circuit", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_Ram.set(addItem(tLastID = 38, "Random Access Memory Chip (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_Ram.set(addItem(tLastID = 39, "Random Access Memory Chip", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_NAND.set(addItem(tLastID = 40, "NAND Memory Chip (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_NAND.set(addItem(tLastID = 41, "NAND Memory Chip", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_NOR.set(addItem(tLastID = 42, "NOR Memory Chip (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_NOR.set(addItem(tLastID = 43, "NOR Memory Chip", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_CPU.set(addItem(tLastID = 44, "Central Processing Unit (Wafer)", "Raw Circuit", o)); + ItemList.Circuit_Chip_CPU.set(addItem(tLastID = 45, "Central Processing Unit", "Integrated Circuit", o)); + + ItemList.Circuit_Wafer_SoC.set(addItem(tLastID = 46, "SoC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_SoC.set(addItem(tLastID = 47, "SoC", "System on a Chip", o)); + + ItemList.Circuit_Wafer_SoC2.set(addItem(tLastID = 48, "ASoC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_SoC2.set(addItem(tLastID = 49, "ASoC", "Advanced System on a Chip", o)); + + ItemList.Circuit_Wafer_PIC.set(addItem(tLastID = 50, "PIC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_PIC.set(addItem(tLastID = 51, "Power IC", "Power Circuit", o)); + + ItemList.Circuit_Wafer_HPIC.set(addItem(tLastID = 52, "HPIC Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_HPIC.set(addItem(tLastID = 53, "High Power IC", "High Power Circuit", o)); + + ItemList.Circuit_Wafer_NanoCPU.set(addItem(tLastID = 54, "NanoCPU Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_NanoCPU.set(addItem(tLastID = 55, "Nanocomponent Central Processing Unit", "Power Circuit", o)); + + ItemList.Circuit_Wafer_QuantumCPU.set(addItem(tLastID = 56, "QBit Wafer", "Raw Circuit", o)); + ItemList.Circuit_Chip_QuantumCPU.set(addItem(tLastID = 57, "QBit Processing Unit", "Quantum CPU", o)); + + /** + * Engraved Crystal Chip + * Engraved Lapotron Chip + * Crystal CPU + * SoCrystal + * stem cells (disassemble eggs) + */ + ItemList.Circuit_Parts_RawCrystalChip.set(addItem(tLastID = 69, "Raw Crystal Chip", "Raw Crystal Processor", o)); + ItemList.Circuit_Chip_CrystalCPU.set(addItem(tLastID = 70, "Crystal Processing Unit", "Crystal CPU", o)); //Crystal chip elite part + ItemList.Circuit_Chip_CrystalSoC.set(addItem(tLastID = 71, "Crystal SoC", "Crystal System on a Chip", o)); + ItemList.Circuit_Chip_NeuroCPU.set(addItem(tLastID = 72, "Neuro Processing Unit", "Neuro CPU", o)); + ItemList.Circuit_Chip_Stemcell.set(addItem(tLastID = 73, "Stemcells", "Raw Intiligence (Disassembled Eggs)", o)); + + //Vacuum Tube Item01 + //Basic Circuit IC2 + //Good Circuit Item01 + + //Integrated Logic Circuit Item01 + ItemList.Circuit_Integrated_Good.set(addItem(tLastID = 79, "Good Integrated Circuit", "Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); + //Good Integrated Circuit Item01 + //Advanced Circuit IC2 + + ItemList.Circuit_Processor.set(addItem(tLastID = 80, "Integrated Processor", "Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION})); +// ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + //Workstation/DataStick Item01 Datacircuit + //Mainframe Item01 DataProcessor + + ItemList.Circuit_Nanoprocessor.set(addItem(tLastID = 82, "Nanoprocessor", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Nanocomputer.set(addItem(tLastID = 83, "Nanoprocessor Assembly", "Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Elitenanocomputer.set(addItem(tLastID = 84, "Elite Nanocomputer", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + //Nanoprocessor Mainframe Item01 Energy Flow Circuit + + ItemList.Circuit_Quantumprocessor.set(addItem(tLastID = 85, "Quantumprocessor", "Extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Quantumcomputer.set(addItem(tLastID = 86, "Quantumprocessor Assembly", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Masterquantumcomputer.set(addItem(tLastID = 87, "Master Quantumcomputer", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Quantummainframe.set(addItem(tLastID = 88, "Quantumprocessor Mainframe", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); + + ItemList.Circuit_Crystalprocessor.set(addItem(tLastID = 89, "Crystalprocessor", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION})); + //Dataorb Dataorb + ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 90, "Crystalprocessor Assembly", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); + + ItemList.Circuit_Neuroprocessor.set(addItem(tLastID = 92, "Wetwareprocessor", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Wetwarecomputer.set(addItem(tLastID = 93, "Wetwareprocessor Assembly", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Wetwaresupercomputer.set(addItem(tLastID = 94, "Wetware Supercomputer", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION})); + ItemList.Circuit_Wetwaremainframe.set(addItem(tLastID = 95, "Wetware Mainframe", "Infinite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION})); + +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Processor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Computer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Nanoprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Nanocomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Elitenanocomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Quantumprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Quantumcomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Masterquantumcomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Quantummainframe.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Crystalprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Crystalcomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Crystalmainframe.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Neuroprocessor.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Wetwarecomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Wetwaresupercomputer.get(1, o)); +// GT_OreDictUnificator.addToBlacklist(ItemList.Circuit_Wetwaremainframe.get(1, o)); } public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index de3dcbb432..1379654393 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -126,11 +126,11 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba private void prospectOils(HashMap aOils) { - int tLeftXBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getXCoord() - radius, 16); - int tRightXBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getXCoord() + radius, 16); + int tLeftXBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getXCoord() - radius, 16); + int tRightXBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getXCoord() + radius, 16); - int tLeftZBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getZCoord() - radius, 16); - int tRightZBound = GT_Utility.getScaleСoordinates(this.getBaseMetaTileEntity().getZCoord() + radius, 16); + int tLeftZBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getZCoord() - radius, 16); + int tRightZBound = GT_Utility.getScaleCoordinates(this.getBaseMetaTileEntity().getZCoord() + radius, 16); HashMap tFluids = new HashMap(); @@ -138,7 +138,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba for (int x = tLeftXBound; x <= tRightXBound; ++x) for (int z = tLeftZBound; z <= tRightZBound; ++z) { - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleСoordinates(x*16,96), 0, GT_Utility.getScaleСoordinates(z*16,96)); + ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(x*16,96), 0, GT_Utility.getScaleCoordinates(z*16,96)); FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x*16, z*16); if (tFluid != null) if (tFluids.containsKey(tPos)) diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index 9c35e87e7d..a63a2498bd 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,5 +1,6 @@ package gregtech.common.tileentities.machines.basic; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -7,6 +8,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -26,6 +28,16 @@ public class GT_MetaTileEntity_Disassembler public int checkRecipe() { if ((getInputAt(0) != null) && (isOutputEmpty())) { + if(GT_Utility.areStacksEqual(getInputAt(0), new ItemStack(Items.egg))){ + getInputAt(0).stackSize -= 1; + this.mEUt = (16 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = 2400; + this.mMaxProgresstime = this.mMaxProgresstime >> (mTier); + if (getBaseMetaTileEntity().getRandomNumber(100) < (this.mTier+1)) { + this.mOutputItems[0] = ItemList.Circuit_Chip_Stemcell.get(1, new Object[0]); + } + return 2; + } NBTTagCompound tNBT = getInputAt(0).getTagCompound(); if (tNBT != null) { tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); @@ -55,6 +67,6 @@ public class GT_MetaTileEntity_Disassembler } public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getTagCompound() != null) && (aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null); + return (aIndex == 4 && GT_Utility.areStacksEqual(aStack, new ItemStack(Items.egg))) || (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getTagCompound() != null) && (aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 35ea5cdbe0..0ba05cab5c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -11,6 +11,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; @@ -52,7 +53,7 @@ return new String[]{ } public boolean checkRecipe(ItemStack aStack) { - this.mEfficiencyIncrease = 1; + this.mEfficiencyIncrease = 100; this.mMaxProgresstime = 100; this.mEUt = 4; return true; @@ -122,7 +123,20 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a } } } - if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2&&mHullCount<=10){return false;} + if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2||mHullCount>10){return false;} + for(int dX=-x+1;dX=y+1;dY--){ + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if(tTileEntity!=null){ + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe){ + ((GT_MetaTileEntity_BasicMachine_GT_Recipe)aMetaTileEntity).mCleanroom = this; + } + } + } + } + } return true; } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index fa1ca07b27..5d55f759c8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -1,10 +1,12 @@ package gregtech.loaders.oreprocessing; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OreDictNames; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegistrator { @@ -13,27 +15,32 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { + if(gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&aModName.equals("gregtech"))return; switch (aMaterial.mName) { case "Good": - case "Advanced": case "Data": case "Elite": case "Master": case "Ultimate": - if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)) + if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack)&&!aModName.equals("gregtech")) GT_ModHandler.removeRecipeByOutput(aStack); break; case "Primitive": GT_ModHandler.removeRecipeByOutput(aStack); - GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Primitive.get(1L, new Object[0]), new Object[]{GT_ModHandler.getIC2Item("casingadviron", 1L), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.Tin)}); - break; + break; case "Basic": GT_ModHandler.removeRecipeByOutput(aStack); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WWW", "CPC", "WWW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OreDictNames.craftingWireCopper, 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WCW", "WPW", "WCW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OreDictNames.craftingWireCopper, 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WWW", "CPC", "WWW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.plate.get(Materials.Steel)}); - GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WCW", "WPW", "WCW", 'C', OrePrefixes.circuit.get(Materials.Primitive), 'W', OrePrefixes.cableGt01.get(Materials.RedAlloy), 'P', OrePrefixes.plate.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(aStack, new Object[]{"RIR","VBV","CCC",'R',ItemList.Circuit_Parts_Resistor.get(1,new Object[0]),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', ItemList.Circuit_Parts_Vacuum_Tube.get(1,new Object[0]),'B',ItemList.Circuit_Board_Coated.get(1,new Object[0]),'I',ItemList.IC2_Item_Casing_Steel.get(1,new Object[0])}); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{ItemList.Circuit_Integrated.getWildcard(1L, new Object[0])}); + break; + case "Advanced": + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.SolderingAlloy.getMolten(72), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.SolderingAlloy.getMolten(72), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Tin.getMolten(144), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Tin.getMolten(144), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_Transistor.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Lead.getMolten(288), aStack, 800, 28); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Integrated_Good.get(2,new Object[0]),ItemList.Circuit_Chip_ILC.get(3,new Object[0]),ItemList.Circuit_Chip_Ram.get(1,new Object[0]),ItemList.Circuit_Parts_TransistorSMD.get(4,new Object[0]),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 16)},Materials.Lead.getMolten(288), aStack, 800, 28); + break; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index 939d45d2ab..8487f1031b 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -26,28 +26,36 @@ public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeReg case "craftingLensBlue": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 13), 2000, 1920); - GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), 256, 480); + GT_Values.RA.addLaserEngraverRecipe(ItemList.IC2_LapotronCrystal.getWildcard(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), 256, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_PIC.get(1, new Object[0]), 500, 480,false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_PIC.get(4, new Object[0]), 200, 1920,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Chip_CrystalCPU.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalSoC.get(1, new Object[0]), 100, 40000,true); break; case "craftingLensYellow": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 14), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC.get(1, new Object[0]), 200, 1920,true); break; + case "craftingLensOrange": + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_SoC2.get(1, new Object[0]), 200, 1920,true); + + break; case "craftingLensCyan": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.WroughtIron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 15), 2000, 1920); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(1, new Object[0]), 900, 120,false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(4, new Object[0]), 500, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_Ram.get(8, new Object[0]), 200, 1920,true); + break; case "craftingLensRed": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Redstone, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), 50, 120); - - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Basic.get(1L, new Object[0]), 64, 30); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.AnnealedCopper, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Basic.get(1L, new Object[0]), 64, 30); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Gold, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Advanced.get(1L, new Object[0]), 64, 120); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Advanced.get(1L, new Object[0]), 64, 120); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Platinum, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Wiring_Elite.get(1L, new Object[0]), 64, 480); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(1, new Object[0]), 900, 120,false); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(4, new Object[0]), 500, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_ILC.get(8, new Object[0]), 200, 1920,true); break; case "craftingLensGreen": - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), 256, 480); - GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), 256, 480); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Chip_CrystalCPU.get(1, new Object[0]), 100, 10000,true); break; case "craftingLensWhite": GT_Values.RA.addLaserEngraverRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Iron, 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 19), 2000, 1920); @@ -57,6 +65,9 @@ public class ProcessingCrafting implements gregtech.api.interfaces.IOreRecipeReg GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.stone, 1, 0), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.stonebrick, 1, 3), 50, 16); GT_Values.RA.addLaserEngraverRecipe(new ItemStack(Blocks.quartz_block, 1, 0), GT_Utility.copyAmount(0L, new Object[]{aStack}), new ItemStack(Blocks.quartz_block, 1, 1), 50, 16); GT_Values.RA.addLaserEngraverRecipe(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartz", 1L), GT_Utility.copyAmount(0L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockQuartzChiseled", 1L), 50, 16); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(1, new Object[0]), 900, 120,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(4, new Object[0]), 500, 480,true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemList.Circuit_Wafer_CPU.get(8, new Object[0]), 200, 1920,true); break; } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java index 682d09bbfd..df2e6ccb01 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java @@ -88,7 +88,7 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra if (aFuelPower) GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, aMaterial.mFuelPower * 8, aMaterial.mFuelType); if (!aNoWorking) { - GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 3L), GT_OreDictUnificator.getDust(aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount * 3L), (int) Math.max(aMaterialMass * 10L, 1L), 16); +// GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stickLong, aMaterial, 3L), GT_OreDictUnificator.getDust(aMaterial, aPrefix.mMaterialAmount - OrePrefixes.stickLong.mMaterialAmount * 3L), (int) Math.max(aMaterialMass * 10L, 1L), 16); if (aMaterial.mUnificatable && (aMaterial.mMaterialInto == aMaterial)) if (aSpecialRecipeReq) GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 4L), GT_Proxy.tBits, new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemExquisite.get(aMaterial)}); } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java index f6dea49ee6..d6db04fed8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLens.java @@ -16,7 +16,8 @@ public class ProcessingLens implements gregtech.api.interfaces.IOreRecipeRegistr } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), (int) Math.max(aMaterial.getMass() / 2L, 1L), 16); + GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), (int) Math.max(aMaterial.getMass() / 2L, 1L), 480); + GT_Values.RA.addLatheRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2L), (int) Math.max(aMaterial.getMass() , 1L), 24); GregTech_API.registerCover(aStack, new GT_MultiTexture(new gregtech.api.interfaces.ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_LENS, aMaterial.mRGBa, false)}), new gregtech.common.covers.GT_Cover_Lens(aMaterial.mColor.mIndex)); } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java index 317c9ebfba..2e00133a69 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java @@ -86,6 +86,8 @@ public class ProcessingPlate implements gregtech.api.interfaces.IOreRecipeRegist GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, aMaterial.mFuelPower, aMaterial.mFuelType); GT_Utility.removeSimpleIC2MachineRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_ModHandler.getCompressorRecipeList(), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L)); GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), 2, GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L)); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, aMaterial, 2L), GT_Proxy.tBits, new Object[]{"hX", 'X', OrePrefixes.plate.get(aMaterial)}); + if (aMaterial == Materials.Paper) GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.harderrecipes, aStack, true) ? 2L : 3L, new Object[]{aStack}), new Object[]{"XXX", 'X', new ItemStack(net.minecraft.init.Items.reeds, 1, 32767)}); diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index 6fa9a34530..66d870ccad 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -403,7 +403,7 @@ public class GT_CraftingRecipeLoader implements Runnable { GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.NiobiumTitanium)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "HPT", 'H', OrePrefixes.cell.get(Materials.Helium), 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.VanadiumGallium)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "NPT", 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.YttriumBariumCuprate)}); - GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "NPT", 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.HSSG)}); + GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"NPT", "CCC", "NPT", 'N', OrePrefixes.cell.get(Materials.Nitrogen), 'T', OrePrefixes.pipeTiny.get(Materials.TungstenSteel), 'P', ItemList.Electric_Pump_LV, 'C', OrePrefixes.wireGt01.get(Materials.Naquadah)}); GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.IronMagnetic, 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.stick.get(Materials.AnyIron), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone), OrePrefixes.dust.get(Materials.Redstone)}); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 33f99d52d4..f80c4659d4 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -8,8 +8,10 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.*; import gregtech.common.GT_DummyWorld; import gregtech.common.items.GT_MetaGenerated_Item_03; +import ic2.api.item.IC2Items; import ic2.api.recipe.ILiquidHeatExchangerManager.HeatExchangeProperty; import ic2.api.recipe.Recipes; +import ic2.core.Ic2Items; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; @@ -411,10 +413,109 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bun.get(1L, new Object[0]), ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Bun.get(2L, new Object[0]), 128, 4); GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Bread.get(1L, new Object[0]), ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Bread.get(2L, new Object[0]), 128, 4); GT_Values.RA.addSlicerRecipe(ItemList.Food_Baked_Baguette.get(1L, new Object[0]), ItemList.Shape_Slicer_Flat.get(0L, new Object[0]), ItemList.Food_Sliced_Baguette.get(2L, new Object[0]), 128, 4); +//Circuit Recipes!!! + Object[] o = new Object[0]; + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Coated.get(3, o), new Object[]{" R ","PPP"," R ",'P',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Wood, 1),'R',ItemList.IC2_Resin.get(1, o)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Phenolic.get(8, o), new Object[]{"PRP","PPP","PPP",'P',GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1),'R',GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1)}); + GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Epoxid, 1), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, 1), Materials.SulfuricAcid.getFluid(125), null, ItemList.Circuit_Board_Epoxy.get(1, o), 500, 10); + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), Materials.Electrum.getMolten(16), null, ItemList.Circuit_Board_Fiberglass.get(16, o), null, 80, 48, 2600); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Fiberglass.get(1, o), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 16), Materials.SulfuricAcid.getFluid(250), null, ItemList.Circuit_Board_Multifiberglass.get(1, o), 100, 480); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Board_Wetware.get(1, o), new Object[]{"DLD","PBP","TPT",'T',GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1),'L',ItemList.Electric_Pump_LV.get(1,o),'P',GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Silicone, 1),'D',ItemList.Bottle_Dragon_Blood.get(1, o),'B',ItemList.Circuit_Board_Multifiberglass.get(1, o)}); + + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireGt01.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Coal)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Resistor.get(3, o), new Object[]{" P ","FCF"," P ",'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper),'C',OrePrefixes.dust.get(Materials.Coal)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4), ItemList.Circuit_Parts_Resistor.get(12, o), 160, 6); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4),Materials.Plastic.getMolten(144), ItemList.Circuit_Parts_ResistorSMD.get(24, o), 80, 96); + GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 1), ItemList.Shape_Mold_Ball.get(0, o), ItemList.Circuit_Parts_Glass_Tube.get(1,o), 240, 8); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1, o), new Object[]{"PGP","FFF",'G',ItemList.Circuit_Parts_Glass_Tube,'P',new ItemStack(Items.paper),'F',OrePrefixes.wireFine.get(Materials.Copper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Vacuum_Tube.get(1, o), new Object[]{"PGP","FFF",'G',ItemList.Circuit_Parts_Glass_Tube,'P',new ItemStack(Items.paper),'F',OrePrefixes.wireGt01.get(Materials.Copper)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(1,o), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',OrePrefixes.dust.get(Materials.Gallium),'W',OrePrefixes.wireGt01.get(Materials.Tin)}); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Diode.get(1,o), new Object[]{"BG ","WDW","BG ",'B',OrePrefixes.dye.get(Materials.Black),'G',new ItemStack(Blocks.glass_pane),'D',OrePrefixes.dust.get(Materials.Gallium),'W',OrePrefixes.wireFine.get(Materials.Tin)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 4), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_Diode.get(16, o), 400, 48); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 4), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 1), Materials.Glass.getMolten(288), ItemList.Circuit_Parts_DiodeSMD.get(32, o), 400, 192); + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Parts_Coil.get(1,o), new Object[]{"WWW","WDW","WWW",'G',new ItemStack(Blocks.glass_pane),'D',ItemList.IC2_Item_Casing_Steel.get(1,o),'W',OrePrefixes.wireFine.get(Materials.Copper)}); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Tin, 6),Materials.Plastic.getMolten(144), ItemList.Circuit_Parts_Transistor.get(8, o), 80, 24); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gallium, 1), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 6),Materials.Plastic.getMolten(288), ItemList.Circuit_Parts_TransistorSMD.get(32, o), 80, 96); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Plastic, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1), ItemList.Circuit_Parts_Capacitor.get(2, o), 80, 96); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 2), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 1),Materials.Plastic.getMolten(72), ItemList.Circuit_Parts_CapacitorSMD.get(4, o), 100, 480); + + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(1, new Object[0]), 500, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(4, new Object[0]), 200, 1920, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderEye, 1)), ItemList.Circuit_Wafer_NOR.get(1, new Object[0]), 500, 480, true); + GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderEye, 1)), ItemList.Circuit_Wafer_NOR.get(4, new Object[0]), 200, 1920, true); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_ILC.get(1, o), ItemList.Circuit_Chip_ILC.get(8,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_Ram.get(1, o), ItemList.Circuit_Chip_Ram.get(32,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NAND.get(1, o), ItemList.Circuit_Chip_NAND.get(32,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NOR.get(1, o), ItemList.Circuit_Chip_NOR.get(16,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_CPU.get(1, o), ItemList.Circuit_Chip_CPU.get(8,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_SoC.get(1, o), ItemList.Circuit_Chip_SoC.get(6,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_SoC2.get(1, o), ItemList.Circuit_Chip_SoC2.get(6,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_PIC.get(1, o), ItemList.Circuit_Chip_PIC.get(4,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_HPIC.get(1, o), ItemList.Circuit_Chip_HPIC.get(2,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1, o), ItemList.Circuit_Chip_NanoCPU.get(7,o), null, 600, 48); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Wafer_QuantumCPU.get(1, o), ItemList.Circuit_Chip_QuantumCPU.get(5,o), null, 600, 48); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_PIC.get(1, o), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gallium, 2), Materials.RedstoneAlloy.getMolten(288), null, ItemList.Circuit_Wafer_HPIC.get(1, o), 1200, 1920); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_CPU.get(1, o), GT_Utility.copyAmount(16, ic2.core.Ic2Items.carbonFiber), Materials.Glowstone.getMolten(576), null, ItemList.Circuit_Wafer_NanoCPU.get(1, o), 400, 1920); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1, o), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherStar, 1), Materials.NaquadahAlloy.getMolten(288), null, ItemList.Circuit_Wafer_QuantumCPU.get(1, o), 600, 1920); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Wafer_NanoCPU.get(1, o), ItemList.QuantumEye.get(1, o), Materials.Europium.getMolten(288), null, ItemList.Circuit_Wafer_QuantumCPU.get(1, o), 400, 1920); + + GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Emerald, 1), Materials.Europium.getMolten(16), ItemList.Circuit_Parts_RawCrystalChip.get(1,o), 1000, 12000, 320, true); + GT_Values.RA.addAutoclaveRecipe(GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Olivine, 1), Materials.Europium.getMolten(16), ItemList.Circuit_Parts_RawCrystalChip.get(1,o), 1000, 12000, 320, true); + GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(9,o), new Object[]{ItemList.Circuit_Chip_CrystalCPU.get(1,o)}); + GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1,o), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Emerald, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1,o), null, 900, 480, 5000); + GT_Values.RA.addBlastRecipe(ItemList.Circuit_Parts_RawCrystalChip.get(1,o), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Olivine, 1), Materials.Helium.getGas(1000), null, ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1,o), null, 900, 480, 5000); + + GT_Values.RA.addAssemblylineRecipe(ItemList.Circuit_Crystalmainframe.get(1,o), 72000, new ItemStack[]{ + ItemList.Circuit_Board_Wetware.get(1,o), + ItemList.Circuit_Chip_Stemcell.get(8,o), + ItemList.Circuit_Parts_Glass_Tube.get(8,o), + GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.Plastic, 4), + ItemList.IC2_Item_Casing_Gold.get(8,o), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64), + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 4), + }, new FluidStack[]{ + new FluidStack(FluidRegistry.getFluid("ic2biomass"), 250), + Materials.UUMatter.getFluid(100), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 1000), + }, ItemList.Circuit_Chip_NeuroCPU.get(1,o), 200, 80000); + + GT_Values.RA.addAssemblylineRecipe(ItemList.Circuit_Wetwaresupercomputer.get(1,o), 288000, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 4), + ItemList.Circuit_Wetwaresupercomputer.get(8,o), + ItemList.Circuit_Parts_Coil.get(4,o), + ItemList.Circuit_Parts_CapacitorSMD.get(24,o), + ItemList.Circuit_Parts_ResistorSMD.get(64,o), + ItemList.Circuit_Parts_TransistorSMD.get(32,o), + ItemList.Circuit_Parts_DiodeSMD.get(16,o), + ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 32), + GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(2880), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 10000), + }, ItemList.Circuit_Wetwaremainframe.get(1,o), 2000, 300000); + + GT_Values.RA.addAssemblylineRecipe(ItemList.Energy_LapotronicOrb2.get(1,o), 288000, new ItemStack[]{ + GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Circuit_Wetwaremainframe.get(1,o), + ItemList.Energy_LapotronicOrb2.get(8L, new Object[0]), + ItemList.Field_Generator_UV.get(2,o), + ItemList.Circuit_Wafer_HPIC.get(64,o), + ItemList.Circuit_Wafer_HPIC.get(64,o), + ItemList.Circuit_Parts_DiodeSMD.get(16,o), + GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 32), + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(2880), + new FluidStack(FluidRegistry.getFluid("ic2coolant"), 16000), + }, ItemList.ZPM2.get(1,o), 2000, 300000); + + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), ItemList.Energy_LapotronicOrb2.get(8L, new Object[0]), GT_Values.NF, ItemList.ZPM2.get(1L, new Object[0]), 32768, 4096); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1L), ItemList.Empty_Board_Basic.get(1, new Object[0]), 32, 16); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Polytetrafluoroethylene, 1L), ItemList.Empty_Board_Elite.get(1, new Object[0]), 32, 256); - + + GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Good.get(1,o), new Object[]{"IVC","VDV","CVI",'D',ItemList.Circuit_Parts_Diode.get(1,o),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', Ic2Items.electronicCircuit ,'I',ItemList.IC2_Item_Casing_Steel.get(1,o)}); + GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 1), 100, 120); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 0), GT_ModHandler.getModItem("BuildCraft|Silicon", "redstoneChipset", 1L, 2), 200, 120); @@ -427,26 +528,56 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1L), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 0L, 14), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 1L, 17), 200, 16); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Gold, 1L), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 0L, 15), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 1L, 18), 200, 16); GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Silicon, 1L), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 0L, 19), GT_ModHandler.getModItem(aTextAE, aTextAEMM, 1L, 20), 200, 16); - GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1, new Object[0]), ItemList.Circuit_Parts_Wiring_Basic.get(4L, new Object[0]), ItemList.Circuit_Board_Basic.get(1L, new Object[0]), 32, 16); - GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Basic.get(1, new Object[0]), ItemList.Circuit_Parts_Wiring_Advanced.get(4L, new Object[0]), ItemList.Circuit_Board_Advanced.get(1L, new Object[0]), 32, 64); - GT_Values.RA.addFormingPressRecipe(ItemList.Empty_Board_Elite.get(1, new Object[0]), ItemList.Circuit_Parts_Wiring_Elite.get(4L, new Object[0]), ItemList.Circuit_Board_Elite.get(1L, new Object[0]), 32, 256); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lapis, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), ItemList.Circuit_Parts_Advanced.get(2L, new Object[0]), 32, 64); - GT_Values.RA.addFormingPressRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Lazurite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), ItemList.Circuit_Parts_Advanced.get(2L, new Object[0]), 32, 64); + GT_Values.RA.addFormingPressRecipe(ItemList.Food_Dough_Sugar.get(4L, new Object[0]), ItemList.Shape_Mold_Cylinder.get(0L, new Object[0]), ItemList.Food_Raw_Cake.get(1L, new Object[0]), 384, 4); GT_Values.RA.addFormingPressRecipe(new ItemStack(Blocks.glass, 1, 32767), ItemList.Shape_Mold_Arrow.get(0L, new Object[0]), ItemList.Arrow_Head_Glass_Emtpy.get(1L, new Object[0]), 64, 4); for (Materials tMat : Materials.values()) { if ((tMat.mStandardMoltenFluid != null) && (tMat.contains(SubTag.SOLDERING_MATERIAL))) { int tMultiplier = tMat.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1 : tMat.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2; - - GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Item_Casing_Steel.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 2L), tMat.getMolten(144L * tMultiplier / 8L), ItemList.Circuit_Primitive.get(1L, new Object[0]), 16, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1L), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.RedAlloy, 1L), tMat.getMolten(144L * tMultiplier / 8L), ItemList.Circuit_Primitive.get(1L, new Object[0]), 16, 8); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Basic.get(1L, new Object[0]), ItemList.Circuit_Primitive.get(2L, new Object[0]), tMat.getMolten(144L * tMultiplier / 4L), ItemList.Circuit_Basic.get(1L, new Object[0]), 32, 16); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), ItemList.Circuit_Primitive.get(2L, new Object[0]), tMat.getMolten(144L * tMultiplier / 4L), ItemList.Circuit_Good.get(1L, new Object[0]), 32, 16); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Advanced.get(1L, new Object[0]), ItemList.Circuit_Parts_Advanced.get(2L, new Object[0]), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Advanced.get(1L, new Object[0]), 32, 64); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Advanced.get(1L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1L, new Object[0]), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Data.get(1L, new Object[0]), 32, 64); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Elite.get(1L, new Object[0]), ItemList.Circuit_Data.get(3L, new Object[0]), tMat.getMolten(144L * tMultiplier / 1L), ItemList.Circuit_Elite.get(1L, new Object[0]), 32, 256); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Board_Elite.get(1L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Master.get(3L, new Object[0]), tMat.getMolten(144L * tMultiplier / 1L), ItemList.Circuit_Master.get(1L, new Object[0]), 32, 256); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Data.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 2L), tMat.getMolten(144L * tMultiplier / 2L), ItemList.Tool_DataStick.get(1L, new Object[0]), 128, 64); + //Circuit soldering + //Integraded Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(1,o),ItemList.Circuit_Parts_Resistor.get(2,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1,o), 200, 8); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(1,o),ItemList.Circuit_Parts_ResistorSMD.get(2,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1,o), 200, 8); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(3,o),ItemList.Circuit_Parts_Resistor.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 8)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Integrated_Good.get(1,o), 400, 16); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Phenolic.get(1,o),ItemList.Circuit_Chip_ILC.get(3,o),ItemList.Circuit_Parts_ResistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Gold, 8)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Integrated_Good.get(1,o), 400, 16); + //Highly Integrated Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_CPU.get(1,o),ItemList.Circuit_Parts_Resistor.get(4,o),ItemList.Circuit_Parts_Capacitor.get(4,o),ItemList.Circuit_Parts_Transistor.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1,o), 200, 140); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Processor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_Capacitor.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 12)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Computer.get(1,o), 400, 160); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_CPU.get(1,o),ItemList.Circuit_Chip_NAND.get(32,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 8),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 4)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataStick.get(1,o), 400, 160); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Computer.get(8,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_Capacitor.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Elite.get(1,o), 1600, 480); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_CPU.get(1,o),ItemList.Circuit_Parts_ResistorSMD.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1,o), 200, 140); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Processor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 12)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Computer.get(1,o), 400, 160); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Computer.get(8,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Elite.get(1,o), 1600, 480); + //Nanotech Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Chip_NanoCPU.get(1,o),ItemList.Circuit_Parts_ResistorSMD.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Nanoprocessor.get(1,o), 200, 600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Nanoprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Nanocomputer.get(1,o), 400, 600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(2,o),ItemList.Circuit_Nanocomputer.get(2,o),ItemList.Circuit_Parts_DiodeSMD.get(4,o),ItemList.Circuit_Chip_NOR.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Elitenanocomputer.get(1,o), 400, 600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Elitenanocomputer.get(8,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Master.get(1,o), 1600, 1920); + //Quantum Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_QuantumCPU.get(1,o),ItemList.Circuit_Chip_NanoCPU.get(1,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Quantumprocessor.get(1,o), 200, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Quantumprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Quantumcomputer.get(1,o), 400, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(2,o),ItemList.Circuit_Quantumcomputer.get(2,o),ItemList.Circuit_Parts_DiodeSMD.get(4,o),ItemList.Circuit_Chip_NOR.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Masterquantumcomputer.get(1,o), 400, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Masterquantumcomputer.get(8,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.AnnealedCopper, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Quantummainframe.get(1,o), 1600, 7680); + //Crystallized Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_CrystalCPU.get(1,o),ItemList.Circuit_Chip_NanoCPU.get(1,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Crystalprocessor.get(1,o), 200, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Crystalprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Crystalcomputer.get(1,o), 400, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Crystalprocessor.get(1,o),ItemList.Circuit_Chip_Ram.get(4,o),ItemList.Circuit_Chip_NOR.get(32,o),ItemList.Circuit_Chip_NAND.get(64,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 32)},tMat.getMolten(144L * tMultiplier), ItemList.Tool_DataOrb.get(1,o), 400, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1),ItemList.Circuit_Crystalcomputer.get(16,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(24,o),ItemList.Circuit_Chip_Ram.get(16,o),GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 12)},tMat.getMolten(144L * tMultiplier*2), ItemList.Circuit_Crystalmainframe.get(1,o), 1600, 30720); + //Wetware Circuits + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(1,o),ItemList.Circuit_Chip_NeuroCPU.get(1,o),ItemList.Circuit_Chip_CrystalCPU.get(1,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Parts_TransistorSMD.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 2)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Neuroprocessor.get(1,o), 200, 38400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(1,o),ItemList.Circuit_Neuroprocessor.get(3,o),ItemList.Circuit_Parts_Coil.get(4,o),ItemList.Circuit_Parts_CapacitorSMD.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Wetwarecomputer.get(1,o), 400, 38400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Wetware.get(2,o),ItemList.Circuit_Wetwarecomputer.get(2,o),ItemList.Circuit_Parts_DiodeSMD.get(4,o),ItemList.Circuit_Chip_NOR.get(4,o),ItemList.Circuit_Chip_Ram.get(4,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 6)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Wetwaresupercomputer.get(1,o), 400, 38400); + + //SoC + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_SoC.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.RedAlloy, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Basic.get(1,o), 50, 600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Epoxy.get(1,o),ItemList.Circuit_Chip_SoC.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Electrum, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Processor.get(1,o), 50, 2400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Chip_SoC2.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Nanoprocessor.get(1,o), 50, 9600); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Fiberglass.get(1,o),ItemList.Circuit_Chip_SoC2.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Quantumprocessor.get(1,o), 50, 38400); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_CrystalSoC.get(1,o),GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.YttriumBariumCuprate, 4)},tMat.getMolten(144L * tMultiplier / 2L), ItemList.Circuit_Crystalprocessor.get(1,o), 50, 153600); + + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_PIC.get(4,o), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L,o),ItemList.Circuit_Chip_NanoCPU.get(1,o), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 16)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Basic.get(1,o), 512, 1024); + GT_Values.RA.addCircuitAssemblerRecipe(new ItemStack[]{ItemList.Circuit_Board_Multifiberglass.get(1,o),ItemList.Circuit_Chip_HPIC.get(4,o), ItemList.Energy_LapotronicOrb.get(8L,o),ItemList.Circuit_Chip_QuantumCPU.get(1,o), GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.Platinum, 16),GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 4L)},tMat.getMolten(144L * tMultiplier), ItemList.Circuit_Basic.get(1,o), 512, 1024); + for (ItemStack tPlate : new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L)}) { GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.lever, 1, 32767), tPlate, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_Controller.get(1L, new Object[0]), 800, 16); GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 1, 32767), tPlate, tMat.getMolten(144L * tMultiplier / 2L), ItemList.Cover_ActivityDetector.get(1L, new Object[0]), 800, 16); @@ -456,14 +587,19 @@ if(Loader.isModLoaded("Railcraft")){ } } } + + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 32), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Gallium, 1), null, null, ItemList.Circuit_Silicon_Ingot.get(1, new Object[0]), null, 9000, 120, 1784); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer.get(16, new Object[0]),null, 200, 8); + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silicon, 64), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 8), Materials.Nitrogen.getGas(8000), null, ItemList.Circuit_Silicon_Ingot2.get(1, new Object[0]), null, 12000, 480, 2484); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot2.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer2.get(32, new Object[0]),null, 400, 64); + GT_Values.RA.addBlastRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Silicon, 16), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Naquadah, 1), Materials.Argon.getGas(8000), null, ItemList.Circuit_Silicon_Ingot3.get(1, new Object[0]), null, 1500, 1920, 4484); + GT_Values.RA.addCutterRecipe(ItemList.Circuit_Silicon_Ingot3.get(1, new Object[0]), ItemList.Circuit_Silicon_Wafer3.get(64, new Object[0]),null, 800, 384); + + GT_Values.RA.addAssemblerRecipe(new ItemStack(Blocks.redstone_torch, 2, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), Materials.Concrete.getMolten(144L), new ItemStack(Items.repeater, 1, 0), 800, 1); GT_Values.RA.addAssemblerRecipe(new ItemStack(Items.leather, 1, 32767), new ItemStack(Items.lead, 1, 32767), Materials.Glue.getFluid(50L), new ItemStack(Items.name_tag, 1, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Paper, 8L), new ItemStack(Items.compass, 1, 32767), GT_Values.NF, new ItemStack(Items.map, 1, 0), 100, 8); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(1L, new Object[0]), 100, 4); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Elite.get(2L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(18L, new Object[0]), GT_Values.NF, ItemList.Tool_DataOrb.get(1L, new Object[0]), 512, 256); - GT_Values.RA.addAssemblerRecipe(ItemList.Circuit_Master.get(2L, new Object[0]), ItemList.Circuit_Parts_Crystal_Chip_Master.get(18L, new Object[0]), GT_Values.NF, ItemList.Energy_LapotronicOrb.get(1L, new Object[0]), 512, 1024); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Europium, 4L), ItemList.Energy_LapotronicOrb.get(8L, new Object[0]), GT_Values.NF, ItemList.Energy_LapotronicOrb2.get(1L, new Object[0]), 2048, 4096); - GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 16L), ItemList.Energy_LapotronicOrb2.get(8L, new Object[0]), GT_Values.NF, ItemList.ZPM2.get(1L, new Object[0]), 32768, 4096); + GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Tantalum, 1L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Manganese, 1L), Materials.Plastic.getMolten(144L), ItemList.Battery_RE_ULV_Tantalum.get(8L, new Object[0]), 100, 4); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfLife2", 1L, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping1", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 1L, 0), 100, 8); GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping2", 4L, 0), ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), GT_Values.NF, GT_ModHandler.getModItem("TwilightForest", "item.charmOfKeeping3", 1L, 0), 100, 8); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 2c598a14fc..511865619c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -71,6 +71,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_Titanium.get(1L, new Object[0]), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Titanium), 'G', OrePrefixes.gearGt.get(Materials.Titanium)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Gearbox_TungstenSteel.get(1L, new Object[0]), bits, new Object[]{"PhP", "GFG", aTextPlateWrench, 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'G', ItemList.Robot_Arm_IV}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Grate.get(1L, new Object[0]), bits, new Object[]{"PVP", "PFP", aTextPlateMotor, 'P', new ItemStack(Blocks.iron_bars,1), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'M', ItemList.Electric_Motor_MV, 'V', OrePrefixes.rotor.get(Materials.Steel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_Vent.get(1L, new Object[0]), bits, new Object[]{"PPP", "SSS", "MFV", 'P', new ItemStack(Blocks.iron_bars,1), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'M', ItemList.Electric_Motor_MV, 'V', OrePrefixes.rotor.get(Materials.Steel),'S',ItemList.Component_Filter}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Assembler.get(1L, new Object[0]), bits, new Object[]{"PVP", "PFP", aTextPlateMotor, 'P', OrePrefixes.circuit.get(Materials.Data), 'F', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'M', ItemList.Electric_Motor_IV, 'V', OrePrefixes.circuit.get(Materials.Master)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Bronze.get(1L, new Object[0]), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Bronze), 'F', OrePrefixes.frameGt.get(Materials.Bronze), 'S', OrePrefixes.stick.get(Materials.Bronze)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_Firebox_Steel.get(1L, new Object[0]), bits, new Object[]{"PSP", "SFS", "PSP", 'P', OrePrefixes.plate.get(Materials.Steel), 'F', OrePrefixes.frameGt.get(Materials.Steel), 'S', OrePrefixes.stick.get(Materials.Steel)}); @@ -1241,6 +1242,16 @@ public class GT_Loader_MetaTileEntities implements Runnable { ItemList.Machine_Multi_Cleanroom.set(new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller").getStackForm(1)); GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Cleanroom.get(1L, new Object[0]), bitsd, new Object[]{"FFF", "RMR", "MCM", 'M', ItemList.Hull_HV, 'F', ItemList.Component_Filter, 'R', OrePrefixes.rotor.get(Materials.StainlessSteel), 'M', ItemList.Electric_Motor_HV, 'C', OrePrefixes.circuit.get(Materials.Advanced)}); + + ItemList.Machine_LV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1180, "basicmachine.circuitassembler.tier.01", "Basic Circuit Assembling Machine", 1, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_MV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1181, "basicmachine.circuitassembler.tier.02", "Advanced Circuit Assembling Machine", 2, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_HV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1182, "basicmachine.circuitassembler.tier.03", "Advanced Circuit Assembling Machine II", 3, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_EV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1183, "basicmachine.circuitassembler.tier.04", "Advanced Circuit Assembling Machine III", 4, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_IV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1184, "basicmachine.circuitassembler.tier.05", "Advanced Circuit Assembling Machine IV", 5, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_LuV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(1185, "basicmachine.circuitassembler.tier.06", "Advanced Circuit Assembling Machine V", 6, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_ZPM_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(1186, "basicmachine.circuitassembler.tier.07", "Advanced Circuit Assembling Machine VI", 7, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + ItemList.Machine_UV_CircuitAssembler.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe( 1187, "basicmachine.circuitassembler.tier.08", "Advanced Circuit Assembling Machine VII", 8, "Avengers, Assemble!", GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes, 6, 1, 16000, 0, 1, "CircuitAssembler.png", "", aBoolConst_0, aBoolConst_0, 0, "CIRCUITASSEMBLER", new Object[]{"ACE", "VMV", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'A', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.BETTER_CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.EMITTER}).getStackForm(1L)); + } private static void run4() { diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 35b71b24e9..247a7df4a6 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -10,6 +10,7 @@ import codechicken.nei.recipe.GuiRecipe; import codechicken.nei.recipe.GuiUsageRecipe; import codechicken.nei.recipe.TemplateRecipeHandler; import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.GT_Mod; import gregtech.api.enums.GT_Values; import gregtech.api.enums.OrePrefixes; import gregtech.api.gui.GT_GUIContainer_BasicMachine; @@ -209,8 +210,13 @@ public class GT_NEI_DefaultHandler if (tDuration > 0) { drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216); } - if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216); + int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; + if(tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing){ + drawText(10, 123, "Needs Low Gravity", -16777216); + }else if(tSpecial == -200){ + drawText(10, 123, "Needs Cleanroom", -16777216); + }else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216); } } diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_BOTTOM_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png new file mode 100644 index 0000000000..71b4efec65 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png new file mode 100644 index 0000000000..9e46f30b5b Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_FRONT_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png new file mode 100644 index 0000000000..6c7e63b924 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_SIDE_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png new file mode 100644 index 0000000000..7e0ba95ed0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png new file mode 100644 index 0000000000..9c0b2e3454 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/basicmachines/circuitassembler/OVERLAY_TOP_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png new file mode 100644 index 0000000000..ee6b08274e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/CircuitAssembler.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png index e10815677a..5af04ce86a 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/700.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png index ec3c0358a1..cb9ada097b 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/703.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png index f5d5a1bc39..7bdb5c7ac0 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/705.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png index d6ff394c66..f2ac923359 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/706.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png index 6f403c14f5..556ef01bec 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/710.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png index 6614c152a6..6c6d9c620d 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/711.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png index 98c4b4f2b7..c3fb13ee92 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/712.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png index cffad53f13..4e2edfeca7 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/715.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png index 6c9c006044..c62b237004 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/716.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png index ee1c87e1b1..0190547a58 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/717.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png index 6f8d8bdde5..1bcfb2d95e 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/718.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png index 881bdaa78a..7d45cae3c0 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/719.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png index 00900203dc..1f933fbbca 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/720.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png new file mode 100644 index 0000000000..556ef01bec Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/1.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png new file mode 100644 index 0000000000..c62b237004 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/10.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png new file mode 100644 index 0000000000..4b02911cfc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/11.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png new file mode 100644 index 0000000000..8a4fee39f5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/12.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png new file mode 100644 index 0000000000..5af04ce86a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/13.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png new file mode 100644 index 0000000000..71cfbbfac7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/14.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png new file mode 100644 index 0000000000..4e2edfeca7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/15.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png new file mode 100644 index 0000000000..2f900ccc47 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/16.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png new file mode 100644 index 0000000000..0190547a58 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/17.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png new file mode 100644 index 0000000000..d8cc8c5a56 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/18.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png new file mode 100644 index 0000000000..1bcfb2d95e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/19.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png new file mode 100644 index 0000000000..6c6d9c620d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/2.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png new file mode 100644 index 0000000000..9d9f338e5a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/20.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png new file mode 100644 index 0000000000..c3fb13ee92 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/3.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png new file mode 100644 index 0000000000..9dd914ea74 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/30.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png new file mode 100644 index 0000000000..acb258e066 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/31.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png new file mode 100644 index 0000000000..78ba24aad1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/32.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png new file mode 100644 index 0000000000..5e3fbb8a92 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/33.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png new file mode 100644 index 0000000000..4ce59d721c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/34.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png new file mode 100644 index 0000000000..5dcb72d92d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/35.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/36.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/37.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/38.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/39.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png new file mode 100644 index 0000000000..7d45cae3c0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/4.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/40.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/41.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/42.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/43.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/44.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/45.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/46.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/47.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/48.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/49.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png new file mode 100644 index 0000000000..1f933fbbca Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/5.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/50.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/51.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/52.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/53.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/54.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/55.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png new file mode 100644 index 0000000000..9ed583664d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/56.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png new file mode 100644 index 0000000000..e9314c6ec5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/57.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png new file mode 100644 index 0000000000..498da22fca Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/6.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/69.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/70.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png new file mode 100644 index 0000000000..e10815677a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/700.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png new file mode 100644 index 0000000000..661cd14817 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/701.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png new file mode 100644 index 0000000000..ec3c0358a1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/703.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png new file mode 100644 index 0000000000..daace0f92a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/704.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png new file mode 100644 index 0000000000..f5d5a1bc39 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/705.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png new file mode 100644 index 0000000000..9f03d572b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/707.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png new file mode 100644 index 0000000000..548784db2a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/708.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png new file mode 100644 index 0000000000..56da7e8d0d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/71.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png new file mode 100644 index 0000000000..6f403c14f5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/710.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png new file mode 100644 index 0000000000..6614c152a6 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/711.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png new file mode 100644 index 0000000000..98c4b4f2b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/712.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png new file mode 100644 index 0000000000..7da7ab1e69 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/713.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png new file mode 100644 index 0000000000..56da7e8d0d Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/714.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png new file mode 100644 index 0000000000..cffad53f13 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/715.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png new file mode 100644 index 0000000000..6c9c006044 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/716.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png new file mode 100644 index 0000000000..ee1c87e1b1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/717.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png new file mode 100644 index 0000000000..6f8d8bdde5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/718.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png new file mode 100644 index 0000000000..881bdaa78a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/719.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png new file mode 100644 index 0000000000..98c4b4f2b7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/72.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png new file mode 100644 index 0000000000..00900203dc Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/720.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png new file mode 100644 index 0000000000..c568b54d85 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/73.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png new file mode 100644 index 0000000000..6c64b90877 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/79.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png new file mode 100644 index 0000000000..ec3c0358a1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/80.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png new file mode 100644 index 0000000000..711716b238 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/82.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png new file mode 100644 index 0000000000..13274dc9fb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/83.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png new file mode 100644 index 0000000000..1491144be9 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/85.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png new file mode 100644 index 0000000000..f5d5a1bc39 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/86.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png new file mode 100644 index 0000000000..9627adc0d2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/88.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png new file mode 100644 index 0000000000..d2b7719d7e Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/89.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png new file mode 100644 index 0000000000..d6ff394c66 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/90.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png new file mode 100644 index 0000000000..ad726ffedd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/91.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png new file mode 100644 index 0000000000..b8db181cbe Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/92.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png new file mode 100644 index 0000000000..c04431f175 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/93.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png new file mode 100644 index 0000000000..9af72bb220 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.03/95.png differ -- cgit From 903661501e6c2a6752d18c8596efb55d225c2a15 Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Mon, 6 Mar 2017 22:09:55 +0300 Subject: Fixed #935 --- src/main/java/gregtech/api/util/GT_Utility.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 3d151175a2..9cbc269684 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1556,8 +1556,9 @@ public class GT_Utility { tFluidId = 0; } + try { ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); - int[] tInts = new int[0]; + int[] tInts = new int[2]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); if(tInts.length>0){ @@ -1579,6 +1580,9 @@ public class GT_Utility { tInts[0] = tAmount; tInts[2] = tFluidId; GT_Proxy.chunkData.put(tPos, tInts); + } catch (Exception e) { + System.out.println("[GT] getUndergroundOil() - Error put data"); + } if (tFluid!=null) return new FluidStack(tFluid, tAmount); return null; -- cgit From c3101d6f04c143c6a8381142eff5e33f4dbccfcf Mon Sep 17 00:00:00 2001 From: Maxime Legkiy Date: Mon, 6 Mar 2017 22:26:16 +0300 Subject: Fixed #935 --- src/main/java/gregtech/api/util/GT_Utility.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 9cbc269684..5c2547196c 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1558,7 +1558,7 @@ public class GT_Utility { try { ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); - int[] tInts = new int[2]; + int[] tInts = new int[3]; if(GT_Proxy.chunkData.containsKey(tPos)){ tInts = GT_Proxy.chunkData.get(tPos); if(tInts.length>0){ @@ -1581,7 +1581,7 @@ public class GT_Utility { tInts[2] = tFluidId; GT_Proxy.chunkData.put(tPos, tInts); } catch (Exception e) { - System.out.println("[GT] getUndergroundOil() - Error put data"); + System.out.println("getUndergroundOil() - Error put data"); } if (tFluid!=null) return new FluidStack(tFluid, tAmount); -- cgit From 445e548b4cd5ba1cf25e96d06ce0218c3b65f023 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 23 Mar 2017 21:16:32 +0100 Subject: Allow teleportation to galacticraft dimensions --- src/main/java/gregtech/api/util/GT_Utility.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 5c2547196c..6c3289af30 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1459,6 +1459,9 @@ public class GT_Utility { try { if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("TwilightForest")) return true; } catch (Throwable e) {/*Do nothing*/} + try { + if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("galacticraft")) return true; + } catch (Throwable e) {/*Do nothing*/} return GregTech_API.sDimensionalList.contains(aDimensionID); } -- cgit From dd8510792f19ace4bac0ec357e207abdf5fe6808 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 31 Mar 2017 19:01:32 +0200 Subject: Detect low grav dimensions by world provider --- src/main/java/gregtech/GT_Mod.java | 4 ++++ .../implementations/GT_MetaTileEntity_BasicMachine.java | 6 +++++- src/main/java/gregtech/api/util/GT_Utility.java | 1 + src/main/java/gregtech/common/GT_Proxy.java | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 4a068f752d..996a16bfe6 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -54,6 +54,8 @@ import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.StringUtils; import java.io.*; +import java.time.LocalDate; +import java.time.ZoneId; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -255,6 +257,8 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mAddGTRecipesToIC2Machines = tMainConfig.get("general", "AddGTRecipesToIC2Machines", true).getBoolean(true); gregtechproxy.mUndergroundOil.getConfig(tMainConfig, "undergroundfluid"); gregtechproxy.mLowGravProcessing = Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE) && tMainConfig.get("general", "LowGravProcessing", true).getBoolean(true); + LocalDate tDate = new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", tDate.getMonthValue()==4 && tDate.getDayOfMonth() == 1); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index a128f748db..ce17874867 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -10,6 +10,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.XSTR; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -19,6 +20,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; @@ -424,6 +426,8 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B endProcess(); } if (mProgresstime > 5) mStuttering = false; + XSTR aXSTR = new XSTR(); + if(GT_Mod.gregtechproxy.mAprilFool && aXSTR.nextInt(5000)==0)GT_Utility.sendSoundToPlayers(aBaseMetaTileEntity.getWorld(), GregTech_API.sSoundList.get(5), 10.0F, -1.0F, aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord()); } else { if (!mStuttering) { stutterProcess(); @@ -732,7 +736,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tMap == null) return DID_NOT_FIND_RECIPE; GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs()); if (tRecipe == null) return DID_NOT_FIND_RECIPE; - if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && getBaseMetaTileEntity().getWorld().provider.dimensionId != -27) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; + if (GT_Mod.gregtechproxy.mLowGravProcessing && tRecipe.mSpecialValue == -100 && !(DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Orbit")||DimensionManager.getProvider(getBaseMetaTileEntity().getWorld().provider.dimensionId).getClass().getName().endsWith("Space"))) return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe; if (!canOutput(tRecipe)) { mOutputBlocked++; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 6c3289af30..f4ae581fc7 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1602,6 +1602,7 @@ public class GT_Utility { Block tBlock = aWorld.getBlock(aX, aY, aZ); tList.add("----- X: " + aX + " Y: " + aY + " Z: " + aZ + " -----"); + tList.add("Dimension: "+DimensionManager.getProvider(aWorld.provider.dimensionId).getClass().getName()); try { if (tTileEntity instanceof IInventory) tList.add("Name: " + ((IInventory) tTileEntity).getInventoryName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ)); diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 8cd47b8c88..4153c779d0 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -194,6 +194,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mEnableAllComponents = false; public boolean mAddGTRecipesToIC2Machines = true; public boolean mLowGravProcessing = false; + public boolean mAprilFool = false; public GT_Proxy() { GameRegistry.registerFuelHandler(this); -- cgit From 32a21a0ac165d0e04f780d0d43914838de29b50b Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 31 Mar 2017 19:02:45 +0200 Subject: Remove testline --- src/main/java/gregtech/api/util/GT_Utility.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index f4ae581fc7..6c3289af30 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1602,7 +1602,6 @@ public class GT_Utility { Block tBlock = aWorld.getBlock(aX, aY, aZ); tList.add("----- X: " + aX + " Y: " + aY + " Z: " + aZ + " -----"); - tList.add("Dimension: "+DimensionManager.getProvider(aWorld.provider.dimensionId).getClass().getName()); try { if (tTileEntity instanceof IInventory) tList.add("Name: " + ((IInventory) tTileEntity).getInventoryName() + " MetaData: " + aWorld.getBlockMetadata(aX, aY, aZ)); -- cgit From 244ef3810efd241766601327a28ea3053d1b2744 Mon Sep 17 00:00:00 2001 From: Technus Date: Thu, 27 Apr 2017 19:03:07 +0200 Subject: Buildable --- src/main/java/gregtech/GT_Mod.java | 7 +- src/main/java/gregtech/api/enums/Materials.java | 113 ++-- src/main/java/gregtech/api/enums/Textures.java | 8 +- .../interfaces/tileentity/IEnergyConnected.java | 2 +- .../api/metatileentity/MetaPipeEntity.java | 2 +- .../api/metatileentity/MetaTileEntity.java | 2 +- .../GT_MetaTileEntity_Hatch_Muffler.java | 2 +- .../GT_MetaTileEntity_MultiBlockBase.java | 4 +- src/main/java/gregtech/api/util/GT_BaseCrop.java | 1 + src/main/java/gregtech/api/util/GT_Recipe.java | 4 +- src/main/java/gregtech/api/util/GT_Utility.java | 2 + src/main/java/gregtech/common/GT_Client.java | 2 +- src/main/java/gregtech/common/GT_Pollution.java | 11 +- src/main/java/gregtech/common/GT_Proxy.java | 14 +- src/main/java/gregtech/common/GT_RecipeAdder.java | 2 +- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 2 +- .../common/GT_Worldgen_GT_Ore_SmallPieces.java | 4 +- .../gregtech/common/items/armor/ArmorData.java | 676 ++++++++++++--------- .../common/items/armor/GuiElectricArmor1.java | 299 --------- .../java/gregtech/common/items/armor/Vector3.java | 11 +- .../items/armor/gui/ContainerModularArmor.java | 2 + .../gregtech/common/items/armor/gui/FluidSync.java | 9 + .../common/items/armor/gui/FluidSync2.java | 10 + .../gregtech/common/items/armor/gui/SlotFluid.java | 7 + .../basic/GT_MetaTileEntity_Disassembler.java | 2 + .../basic/GT_MetaTileEntity_Massfabricator.java | 5 +- .../basic/GT_MetaTileEntity_SeismicProspector.java | 2 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 2 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 310 +++++----- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 5 +- .../materialprocessing/ProcessingModSupport.java | 6 +- .../gregtech/loaders/misc/GT_Achievements.java | 53 +- .../loaders/postload/GT_MachineRecipeLoader.java | 1 + .../preload/GT_Loader_MetaTileEntities.java | 34 +- src/main/java/gregtech/nei/NEI_GT_Config.java | 2 +- 35 files changed, 736 insertions(+), 882 deletions(-) delete mode 100644 src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index cbca284574..e0db6c8b36 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -34,7 +34,6 @@ import gregtech.loaders.load.GT_SonictronLoader; import gregtech.loaders.misc.GT_Achievements; import gregtech.loaders.misc.GT_Bees; import gregtech.loaders.misc.GT_CoverLoader; -import gregtech.loaders.misc.OreProcessingConfiguration; import gregtech.loaders.postload.*; import gregtech.loaders.preload.*; import ic2.api.recipe.IRecipeInput; @@ -59,9 +58,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import org.apache.commons.lang3.StringUtils; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.PrintStream; +import java.io.*; import java.util.*; import java.util.Map.Entry; import java.util.regex.Matcher; @@ -434,8 +431,6 @@ public class GT_Mod implements IGT_Mod { new Enchantment_EnderDamage(); new Enchantment_Radioactivity(); - new OreProcessingConfiguration(aEvent.getModConfigurationDirectory()).run(); - new GT_Loader_OreProcessing().run(); new GT_Loader_OreDictionary().run(); new GT_Loader_ItemData().run(); diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 92559837bc..24a3c86f23 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -146,7 +146,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials TarPitch = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "TarPitch" , "Tar Pitch" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Serpentine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 |8 , 255, 255, 255, 0, "Serpentine" , "Serpentine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Flux = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Flux" , "Flux" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 500,21000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))); +//\/public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 500,21000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))); public static Materials OsmiumTetroxide = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "OsmiumTetroxide" , "Osmium Tetroxide" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials NitricAcid = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "NitricAcid" , "Nitric Acid" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials RubberTreeSap = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "RubberTreeSap" , "Rubber Tree Sap" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); @@ -157,17 +157,17 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Lumium = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Lumium" , "Lumium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials PhasedIron = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "PhasedIron" , "Phased Iron" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials PhasedGold = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "PhasedGold" , "Phased Gold" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800,21000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))); +//\/public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800,21000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))); public static Materials HeeEndium = new Materials( 770, TextureSet.SET_DULL , 16.0F, 1024, 4, 1|2 |8 |64|128 , 165, 220, 250, 0, "HeeEndium" , "Endium" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightBlue ); public static Materials Prismarine = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Prismarine" , "Prismarine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials GraveyardDirt = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "GraveyardDirt" , "Graveyard Dirt" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1,21800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))); +//\/public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1,21800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))); public static Materials Terrasteel = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Terrasteel" , "Terrasteel" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); - public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1,21200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))); - public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811,21000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))); - public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1,22200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))); - public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300,23300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))); - public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1,21800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))); +//\/public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1,21200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))); +//\/public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811,21000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))); +//\/public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1,22200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))); +//\/public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300,23300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))); +//\/public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1,21800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))); public static Materials Teslatite = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 60, 180, 200, 0, "Teslatite" , "Teslatite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Fluix = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Fluix" , "Fluix" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); public static Materials Manasteel = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Manasteel" , "Manasteel" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL ); @@ -242,7 +242,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Eclogite = new Materials( 860, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Eclogite" , "Eclogite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); public static Materials ElectrumFlux = new Materials( 320, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |64 , 255, 255, 120, 0, "ElectrumFlux" , "Fluxed Electrum" , 0, 0, 9000,29000, true, false, 1, 1, 1, Dyes.dyeYellow ); public static Materials Emery = new Materials( 861, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 255, 0, "Emery" , "Emery" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); - public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); +//\/public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); public static Materials EnderiumBase = new Materials( 380, TextureSet.SET_DULL , 16.0F, 768, 4, 1|2 |64|128 , 72, 119, 153, 0, "EnderiumBase" , "Enderium Base" , 0, 0, 3600,23600, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Tin, 2), new MaterialStack(Silver, 1), new MaterialStack(Platinum, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); public static Materials Energized = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 255, 255, 255, 0, "Energized" , "Energized" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL ); public static Materials Epidote = new Materials( 862, TextureSet.SET_DULL , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Epidote" , "Epidote" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes._NULL ); @@ -430,7 +430,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Almandine = new Materials( 820, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 255, 0, 0, 0, "Almandine" , "Almandine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Iron, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials Andradite = new Materials( 821, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 0, 0, "Andradite" , "Andradite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Iron, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials AnnealedCopper = new Materials( 345, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 |128 , 255, 120, 20, 0, "AnnealedCopper" , "Annealed Copper" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Copper, 1))); - public static Materials Asbestos = new Materials( 946, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Asbestos" , "Asbestos" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))), // Mg3Si2O5(OH)4 + public static Materials Asbestos = new Materials( 946, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 230, 0, "Asbestos" , "Asbestos" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))); // Mg3Si2O5(OH)4 public static Materials Ash = new Materials( 815, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 150, 150, 150, 0, "Ash" , "Ashes" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Carbon, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 1))); public static Materials BandedIron = new Materials( 917, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 145, 90, 90, 0, "BandedIron" , "Banded Iron" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(Iron, 2), new MaterialStack(Oxygen, 3))); public static Materials BatteryAlloy = new Materials( 315, TextureSet.SET_DULL , 1.0F, 0, 1, 1|2 , 156, 124, 160, 0, "BatteryAlloy" , "Battery Alloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Lead, 4), new MaterialStack(Antimony, 1))); @@ -438,7 +438,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Bone = new Materials( 806, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 250, 250, 250, 0, "Bone" , "Bone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Calcium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MORTUUS, 2), new TC_AspectStack(TC_Aspects.CORPUS, 1))); public static Materials Brass = new Materials( 301, TextureSet.SET_METALLIC , 7.0F, 96, 1, 1|2 |64|128 , 255, 180, 0, 0, "Brass" , "Brass" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Zinc, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); public static Materials Bronze = new Materials( 300, TextureSet.SET_METALLIC , 6.0F, 192, 2, 1|2 |64|128 , 255, 128, 0, 0, "Bronze" , "Bronze" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Copper, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); - public static Materials BrownLimonite = new Materials( 930, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "BrownLimonite" , "Brown Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))), // FeO(OH) + public static Materials BrownLimonite = new Materials( 930, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "BrownLimonite" , "Brown Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))); // FeO(OH) public static Materials Calcite = new Materials( 823, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 250, 230, 220, 0, "Calcite" , "Calcite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); public static Materials Cassiterite = new Materials( 824, TextureSet.SET_METALLIC , 1.0F, 0, 1, 8 , 220, 220, 220, 0, "Cassiterite" , "Cassiterite" , 0, 0, -1, 0, false, false, 4, 3, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); public static Materials CassiteriteSand = new Materials( 937, TextureSet.SET_SAND , 1.0F, 0, 1, 8 , 220, 220, 220, 0, "CassiteriteSand" , "Cassiterite Sand" , 0, 0, -1, 0, false, false, 4, 3, 1, Dyes.dyeWhite , 1, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Oxygen, 2))); @@ -479,9 +479,9 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Magnalium = new Materials( 313, TextureSet.SET_DULL , 6.0F, 256, 2, 1|2 |64|128 , 200, 190, 255, 0, "Magnalium" , "Magnalium" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Aluminium, 2))); public static Materials Magnesite = new Materials( 908, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 250, 250, 180, 0, "Magnesite" , "Magnesite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 3))); public static Materials Magnetite = new Materials( 870, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 30, 30, 30, 0, "Magnetite" , "Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Oxygen, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); - public static Materials Molybdenite = new Materials( 942, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 25, 25, 25, 0, "Molybdenite" , "Molybdenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))), // MoS2 (also source of Re) + public static Materials Molybdenite = new Materials( 942, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 25, 25, 25, 0, "Molybdenite" , "Molybdenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(Molybdenum, 1), new MaterialStack(Sulfur, 2))); // MoS2 (also source of Re) public static Materials Nichrome = new Materials( 311, TextureSet.SET_METALLIC , 6.0F, 64, 2, 1|2 |64 , 205, 206, 246, 0, "Nichrome" , "Nichrome" , 0, 0, 2700,22700, true, false, 1, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Nickel, 4), new MaterialStack(Chrome, 1))); - public static Materials NiobiumNitride = new Materials( 359, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 41, 29, 0, "NiobiumNitride" , "Niobium Nitride" , 0, 0, 2573, 2573, true, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))), // Anti-Reflective Material + public static Materials NiobiumNitride = new Materials( 359, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 41, 29, 0, "NiobiumNitride" , "Niobium Nitride" , 0, 0, 2573, 2573, true, false, 1, 1, 1, Dyes.dyeBlack , 1, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Nitrogen, 1))); // Anti-Reflective Material public static Materials NiobiumTitanium = new Materials( 360, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 , 29, 29, 41, 0, "NiobiumTitanium" , "Niobium-Titanium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Niobium, 1), new MaterialStack(Titanium, 1))); public static Materials NitroCarbon = new Materials( 716, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 0, 75, 100, 0, "NitroCarbon" , "Nitro-Carbon" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Carbon, 1))); public static Materials NitrogenDioxide = new Materials( 717, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 100, 175, 255, 0, "NitrogenDioxide" , "Nitrogen Dioxide" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 2))); @@ -541,18 +541,18 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Stibnite = new Materials( 945, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 70, 70, 70, 0, "Stibnite" , "Stibnite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Antimony, 2), new MaterialStack(Sulfur, 3))); public static Materials SulfuricAcid = new Materials( 720, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 255, 128, 0, 0, "SulfuricAcid" , "Sulfuric Acid" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Hydrogen, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); public static Materials Tanzanite = new Materials( 508, TextureSet.SET_GEM_VERTICAL , 7.0F, 256, 2, 1 |4|8 |64 , 64, 0, 200, 127, "Tanzanite" , "Tanzanite" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(Calcium, 2), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 13)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 5), new TC_AspectStack(TC_Aspects.VITREUS, 3))); - public static Materials Tetrahedrite = new Materials( 840, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 200, 32, 0, 0, "Tetrahedrite" , "Tetrahedrite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 3), new MaterialStack(Antimony, 1), new MaterialStack(Sulfur, 3), new MaterialStack(Iron, 1))), //Cu3SbS3 + x(Fe,Zn)6Sb2S9 + public static Materials Tetrahedrite = new Materials( 840, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 200, 32, 0, 0, "Tetrahedrite" , "Tetrahedrite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 3), new MaterialStack(Antimony, 1), new MaterialStack(Sulfur, 3), new MaterialStack(Iron, 1))); //Cu3SbS3 + x(Fe,Zn)6Sb2S9 public static Materials TinAlloy = new Materials( 363, TextureSet.SET_METALLIC , 6.5F, 96, 2, 1|2 |64|128 , 200, 200, 200, 0, "TinAlloy" , "Tin Alloy" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Tin, 1), new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.INSTRUMENTUM, 1))); public static Materials Topaz = new Materials( 507, TextureSet.SET_GEM_HORIZONTAL , 7.0F, 256, 3, 1 |4|8 |64 , 255, 128, 0, 127, "Topaz" , "Topaz" , 0, 0, -1, 0, false, true, 5, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Fluorine, 2), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 6)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 4))); public static Materials Tungstate = new Materials( 841, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 55, 50, 35, 0, "Tungstate" , "Tungstate" , 0, 0, 2500, 2500, true, false, 4, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Tungsten, 1), new MaterialStack(Lithium, 2), new MaterialStack(Oxygen, 4))); - public static Materials Ultimet = new Materials( 344, TextureSet.SET_SHINY , 9.0F, 2048, 4, 1|2 |64|128 , 180, 180, 230, 0, "Ultimet" , "Ultimet" , 0, 0, 2700, 2700, true, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 5), new MaterialStack(Chrome, 2), new MaterialStack(Nickel, 1), new MaterialStack(Molybdenum, 1))), // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon + public static Materials Ultimet = new Materials( 344, TextureSet.SET_SHINY , 9.0F, 2048, 4, 1|2 |64|128 , 180, 180, 230, 0, "Ultimet" , "Ultimet" , 0, 0, 2700, 2700, true, false, 1, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Cobalt, 5), new MaterialStack(Chrome, 2), new MaterialStack(Nickel, 1), new MaterialStack(Molybdenum, 1))); // 54% Cobalt, 26% Chromium, 9% Nickel, 5% Molybdenum, 3% Iron, 2% Tungsten, 0.8% Manganese, 0.3% Silicon, 0.08% Nitrogen and 0.06% Carbon public static Materials Uraninite = new Materials( 922, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 35, 35, 35, 0, "Uraninite" , "Uraninite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Uranium, 1), new MaterialStack(Oxygen, 2))); public static Materials Uvarovite = new Materials( 842, TextureSet.SET_DIAMOND , 1.0F, 0, 2, 1 |8 , 180, 255, 180, 0, "Uvarovite" , "Uvarovite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Chrome, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials VanadiumGallium = new Materials( 357, TextureSet.SET_SHINY , 1.0F, 0, 2, 1|2 , 128, 128, 140, 0, "VanadiumGallium" , "Vanadium-Gallium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGray , 2, Arrays.asList(new MaterialStack(Vanadium, 3), new MaterialStack(Gallium, 1))); public static Materials Wood = new Materials( 809, TextureSet.SET_WOOD , 2.0F, 16, 0, 1|2 |64|128 , 100, 50, 0, 0, "Wood" , "Wood" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBrown , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 1), new MaterialStack(Hydrogen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ARBOR, 2))); public static Materials WroughtIron = new Materials( 304, TextureSet.SET_METALLIC , 6.0F, 384, 2, 1|2 |64|128 , 200, 180, 180, 0, "WroughtIron" , "Wrought Iron" , 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray , 2, Arrays.asList(new MaterialStack(Iron, 1))); public static Materials Wulfenite = new Materials( 882, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 255, 128, 0, 0, "Wulfenite" , "Wulfenite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Lead, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); - public static Materials YellowLimonite = new Materials( 931, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 200, 0, 0, "YellowLimonite" , "Yellow Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))), // FeO(OH) + a bit Ni and Co + public static Materials YellowLimonite = new Materials( 931, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 200, 0, 0, "YellowLimonite" , "Yellow Limonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Hydrogen, 1), new MaterialStack(Oxygen, 2))); // FeO(OH) + a bit Ni and Co public static Materials YttriumBariumCuprate = new Materials( 358, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1|2 , 80, 64, 70, 0, "YttriumBariumCuprate" , "Yttrium Barium Cuprate" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Yttrium, 1), new MaterialStack(Barium, 2), new MaterialStack(Copper, 3), new MaterialStack(Oxygen, 7))); /** @@ -582,8 +582,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Apatite = new Materials( 530, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 200, 200, 255, 0, "Apatite" , "Apatite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeCyan , 1, Arrays.asList(new MaterialStack(Calcium, 5), new MaterialStack(Phosphate, 3), new MaterialStack(Chlorine, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.MESSIS, 2))); public static Materials Alumite = new Materials( -1, TextureSet.SET_METALLIC , 1.5F, 64, 0, 1|2 |64 , 255, 255, 255, 0, "Alumite" , "Alumite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , 2, Arrays.asList(new MaterialStack(Aluminium, 5), new MaterialStack(Iron, 2), new MaterialStack(Obsidian, 2)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); public static Materials Manyullyn = new Materials( 386, TextureSet.SET_SHINY , 25.0F, 2048, 5, 1|2 |8 |64|128 , 154, 76, 185, 0, "Manyullyn" , "Manyullyn" , 0, 0, 3600,23600, true, false, 1, 1, 1, Dyes.dyePurple , 2, Arrays.asList(new MaterialStack(Cobalt, 1), new MaterialStack(Ardite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.STRONTIO, 2))); - public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); - public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); +//\/public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); +//\/public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); public static Materials Steeleaf = new Materials( 339, TextureSet.SET_LEAF , 8.0F, 768, 3, 1|2 |64|128 , 50, 127, 50, 0, "Steeleaf" , "Steeleaf" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.HERBA, 2), new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.PRAECANTATIO, 1))); public static Materials Knightmetal = new Materials( 362, TextureSet.SET_METALLIC , 8.0F, 1024, 3, 1|2 |64|128 , 210, 240, 200, 0, "Knightmetal" , "Knightmetal" , 5, 24, -1, 0, false, false, 4, 1, 1, Dyes.dyeLime , 2, Arrays.asList(new MaterialStack(Steel, 2), new MaterialStack(Magic, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.LUCRUM, 1), new TC_AspectStack(TC_Aspects.METALLUM, 2))); public static Materials SterlingSilver = new Materials( 350, TextureSet.SET_SHINY , 13.0F, 128, 2, 1|2 |64|128 , 250, 220, 225, 0, "SterlingSilver" , "Sterling Silver" , 0, 0, -1, 1700, true, false, 4, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Silver, 4))); @@ -597,10 +597,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials TungstenSteel = new Materials( 316, TextureSet.SET_METALLIC , 8.0F, 2560, 4, 1|2 |64|128 , 100, 100, 160, 0, "TungstenSteel" , "Tungstensteel" , 0, 0, -1,23000, true, false, 4, 1, 1, Dyes.dyeBlue , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Tungsten, 1))); public static Materials NitroCoalFuel = new Materials( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 50, 70, 50, 0, "NitroCoalFuel" , "Nitro-Coalfuel" , 0, 48, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(CoalFuel, 4))); public static Materials NitroFuel = new Materials( 709, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 200, 255, 0, 0, "NitroFuel" , "Nitro-Diesel" , 0, 720, -1, 0, false, false, 1, 1, 1, Dyes.dyeLime , 0, Arrays.asList(new MaterialStack(Glyceryl, 1), new MaterialStack(Fuel, 4))); - public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); +//\/public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); ////public static Materials Midasium = new Materials( 332, TextureSet.SET_SHINY , 12.0F, 64, 2, 1|2 |8 |64 , 255, 200, 40, 0, "Midasium" , "Midasium" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Gold, 2), new MaterialStack(Thaumium, 1))); - public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); - public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); +//\/public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); +//\/public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); public static Materials RedAlloy = new Materials( 308, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 200, 0, 0, 0, "RedAlloy" , "Red Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(Copper, 1), new MaterialStack(Redstone, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.MACHINA, 3))); public static Materials CobaltBrass = new Materials( 343, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 180, 180, 160, 0, "CobaltBrass" , "Cobalt Brass" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Brass, 7), new MaterialStack(Aluminium, 1), new MaterialStack(Cobalt, 1))); public static Materials Phosphorus = new Materials( 534, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |4|8|16 , 255, 255, 0, 0, "Phosphorus" , "Phosphorus" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Phosphate, 2))); @@ -619,38 +619,38 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials GraniteRed = new Materials( 850, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 255, 0, 128, 0, "GraniteRed" , "Red Granite" , 0, 0, -1, 0, false, false, 0, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(PotassiumFeldspar, 1), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))); public static Materials Chrysotile = new Materials( 912, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 |64|128 , 110, 140, 110, 0, "Chrysotile" , "Chrysotile" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Asbestos, 1))); public static Materials Realgar = new Materials( 913, TextureSet.SET_DULL , 1.0F, 32, 1, 1|2 |8 |64|128 , 140, 100, 100, 0, "Realgar" , "Realgar" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Arsenic, 4), new MaterialStack(Sulfur,4))); - public static Materials VanadiumMagnetite = new Materials( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "VanadiumMagnetite" , "Vanadium Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))), // Mixture of Fe3O4 and V2O5 + public static Materials VanadiumMagnetite = new Materials( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "VanadiumMagnetite" , "Vanadium Magnetite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); // Mixture of Fe3O4 and V2O5 public static Materials BasalticMineralSand = new Materials( 935, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 50, 40, 0, "BasalticMineralSand" , "Basaltic Mineral Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Basalt, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); public static Materials GraniticMineralSand = new Materials( 936, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 60, 60, 0, "GraniticMineralSand" , "Granitic Mineral Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(GraniteBlack, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); public static Materials GarnetSand = new Materials( 938, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 100, 0, 0, "GarnetSand" , "Garnet Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(GarnetRed, 1), new MaterialStack(GarnetYellow, 1))); public static Materials QuartzSand = new Materials( 939, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 200, 200, 200, 0, "QuartzSand" , "Quartz Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(CertusQuartz, 1), new MaterialStack(Quartzite, 1))); - public static Materials Bastnasite = new Materials( 905, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 200, 110, 45, 0, "Bastnasite" , "Bastnasite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Cerium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Fluorine, 1), new MaterialStack(Oxygen, 3))), // (Ce, La, Y)CO3F - public static Materials Pentlandite = new Materials( 909, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 165, 150, 5, 0, "Pentlandite" , "Pentlandite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))), // (Fe,Ni)9S8 - public static Materials Spodumene = new Materials( 920, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 190, 170, 170, 0, "Spodumene" , "Spodumene" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6))), // LiAl(SiO3)2 - public static Materials Pollucite = new Materials( 919, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 210, 210, 0, "Pollucite" , "Pollucite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Caesium, 2), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 4), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 12))), // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb) - public static Materials Tantalite = new Materials( 921, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 145, 80, 40, 0, "Tantalite" , "Tantalite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Tantalum, 2), new MaterialStack(Oxygen, 6))), // (Fe, Mn)Ta2O6 (also source of Nb) - public static Materials Lepidolite = new Materials( 907, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 240, 50, 140, 0, "Lepidolite" , "Lepidolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Lithium, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))), // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2 - public static Materials Glauconite = new Materials( 933, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite" , "Glauconite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 - public static Materials GlauconiteSand = new Materials( 949, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "GlauconiteSand" , "Glauconite Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 - public static Materials Vermiculite = new Materials( 932, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 180, 15, 0, "Vermiculite" , "Vermiculite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 12))), // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O) - public static Materials Bentonite = new Materials( 927, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 245, 215, 210, 0, "Bentonite" , "Bentonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Magnesium, 6), new MaterialStack(Silicon, 12), new MaterialStack(Hydrogen, 6), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 36))), // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O - public static Materials FullersEarth = new Materials( 928, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 160, 160, 120, 0, "FullersEarth" , "Fullers Earth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 11))), // (Mg,Al)2Si4O10(OH) 4(H2O) + public static Materials Bastnasite = new Materials( 905, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 200, 110, 45, 0, "Bastnasite" , "Bastnasite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Cerium, 1), new MaterialStack(Carbon, 1), new MaterialStack(Fluorine, 1), new MaterialStack(Oxygen, 3))); // (Ce, La, Y)CO3F + public static Materials Pentlandite = new Materials( 909, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 165, 150, 5, 0, "Pentlandite" , "Pentlandite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Nickel, 9), new MaterialStack(Sulfur, 8))); // (Fe,Ni)9S8 + public static Materials Spodumene = new Materials( 920, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 190, 170, 170, 0, "Spodumene" , "Spodumene" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Lithium, 1), new MaterialStack(Aluminium, 1), new MaterialStack(Silicon, 2), new MaterialStack(Oxygen, 6))); // LiAl(SiO3)2 + public static Materials Pollucite = new Materials( 919, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 210, 210, 0, "Pollucite" , "Pollucite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Caesium, 2), new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 4), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 12))); // (Cs,Na)2Al2Si4O12 2H2O (also a source of Rb) + public static Materials Tantalite = new Materials( 921, TextureSet.SET_METALLIC , 1.0F, 0, 3, 1 |8 , 145, 80, 40, 0, "Tantalite" , "Tantalite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Manganese, 1), new MaterialStack(Tantalum, 2), new MaterialStack(Oxygen, 6))); // (Fe, Mn)Ta2O6 (also source of Nb) + public static Materials Lepidolite = new Materials( 907, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 240, 50, 140, 0, "Lepidolite" , "Lepidolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Lithium, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))); // K(Li,Al,Rb)3(Al,Si)4O10(F,OH)2 + public static Materials Glauconite = new Materials( 933, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "Glauconite" , "Glauconite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 + public static Materials GlauconiteSand = new Materials( 949, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 130, 180, 60, 0, "GlauconiteSand" , "Glauconite Sand" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Magnesium, 2), new MaterialStack(Aluminium, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // (K,Na)(Fe3+,Al,Mg)2(Si,Al)4O10(OH)2 + public static Materials Vermiculite = new Materials( 932, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 200, 180, 15, 0, "Vermiculite" , "Vermiculite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Iron, 3), new MaterialStack(Aluminium, 4), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 12))); // (Mg+2, Fe+2, Fe+3)3 [(AlSi)4O10] (OH)2 4H2O) + public static Materials Bentonite = new Materials( 927, TextureSet.SET_ROUGH , 1.0F, 0, 2, 1 |8 , 245, 215, 210, 0, "Bentonite" , "Bentonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Magnesium, 6), new MaterialStack(Silicon, 12), new MaterialStack(Hydrogen, 6), new MaterialStack(Water, 5), new MaterialStack(Oxygen, 36))); // (Na,Ca)0.33(Al,Mg)2(Si4O10)(OH)2 nH2O + public static Materials FullersEarth = new Materials( 928, TextureSet.SET_FINE , 1.0F, 0, 2, 1 |8 , 160, 160, 120, 0, "FullersEarth" , "Fullers Earth" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 1), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 4), new MaterialStack(Oxygen, 11))); // (Mg,Al)2Si4O10(OH) 4(H2O) public static Materials Pitchblende = new Materials( 873, TextureSet.SET_DULL , 1.0F, 0, 3, 1 |8 , 200, 210, 0, 0, "Pitchblende" , "Pitchblende" , 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Uraninite, 3), new MaterialStack(Thorium, 1), new MaterialStack(Lead, 1))); - public static Materials Monazite = new Materials( 520, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 50, 70, 50, 0, "Monazite" , "Monazite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(RareEarth, 1), new MaterialStack(Phosphate, 1))), // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is brown like the rare earth Item Monazite sand deposits are inevitably of the monazite-(Ce) composition. Typically, the lanthanides in such monazites contain about 45Ö´8% cerium, about 24% lanthanum, about 17% neodymium, about 5% praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium concentrations tend to be low, about 0.05% Thorium content of monazite is variable and sometimes can be up to 20Öł0% - public static Materials Malachite = new Materials( 871, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 5, 95, 5, 0, "Malachite" , "Malachite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Copper, 2), new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 5))), // Cu2CO3(OH)2 - public static Materials Mirabilite = new Materials( 900, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 250, 210, 0, "Mirabilite" , "Mirabilite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 4))), // Na2SO4 10H2O - public static Materials Mica = new Materials( 901, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 195, 195, 205, 0, "Mica" , "Mica" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))), // KAl2(AlSi3O10)(F,OH)2 - public static Materials Trona = new Materials( 903, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 135, 135, 95, 0, "Trona" , "Trona" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 3), new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 6))), // Na3(CO3)(HCO3) 2H2O + public static Materials Monazite = new Materials( 520, TextureSet.SET_DIAMOND , 1.0F, 0, 1, 1 |4|8 , 50, 70, 50, 0, "Monazite" , "Monazite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(RareEarth, 1), new MaterialStack(Phosphate, 1))); // Wikipedia: (Ce, La, Nd, Th, Sm, Gd)PO4 Monazite also smelt-extract to Helium, it is brown like the rare earth Item Monazite sand deposits are inevitably of the monazite-(Ce) composition. Typically, the lanthanides in such monazites contain about 45Ö´8% cerium, about 24% lanthanum, about 17% neodymium, about 5% praseodymium, and minor quantities of samarium, gadolinium, and yttrium. Europium concentrations tend to be low, about 0.05% Thorium content of monazite is variable and sometimes can be up to 20Öł0% + public static Materials Malachite = new Materials( 871, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 5, 95, 5, 0, "Malachite" , "Malachite" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(Copper, 2), new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 5))); // Cu2CO3(OH)2 + public static Materials Mirabilite = new Materials( 900, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 250, 210, 0, "Mirabilite" , "Mirabilite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 2), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 10), new MaterialStack(Oxygen, 4))); // Na2SO4 10H2O + public static Materials Mica = new Materials( 901, TextureSet.SET_FINE , 1.0F, 0, 1, 1 |8 , 195, 195, 205, 0, "Mica" , "Mica" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 3), new MaterialStack(Fluorine, 2), new MaterialStack(Oxygen, 10))); // KAl2(AlSi3O10)(F,OH)2 + public static Materials Trona = new Materials( 903, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1 |8 , 135, 135, 95, 0, "Trona" , "Trona" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 3), new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 6))); // Na3(CO3)(HCO3) 2H2O public static Materials Barite = new Materials( 904, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 235, 255, 0, "Barite" , "Barite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Barium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Oxygen, 4))); - public static Materials Gypsum = new Materials( 934, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 250, 0, "Gypsum" , "Gypsum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 4))), // CaSO4 2H2O - public static Materials Alunite = new Materials( 911, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 225, 180, 65, 0, "Alunite" , "Alunite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 14))), // KAl3(SO4)2(OH)6 - public static Materials Dolomite = new Materials( 914, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |8 , 225, 205, 205, 0, "Dolomite" , "Dolomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 2), new MaterialStack(Oxygen, 6))), // CaMg(CO3)2 - public static Materials Wollastonite = new Materials( 915, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 240, 240, 0, "Wollastonite" , "Wollastonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3))), // CaSiO3 - public static Materials Zeolite = new Materials( 916, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 230, 230, 0, "Zeolite" , "Zeolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Calcium, 4), new MaterialStack(Silicon, 27), new MaterialStack(Aluminium, 9), new MaterialStack(Water, 28), new MaterialStack(Oxygen, 72))), // NaCa4(Si27Al9)O72 28(H2O) - public static Materials Kyanite = new Materials( 924, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |8 , 110, 110, 250, 0, "Kyanite" , "Kyanite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 5))), // Al2SiO5 - public static Materials Kaolinite = new Materials( 929, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 245, 235, 235, 0, "Kaolinite" , "Kaolinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))), // Al2Si2O5(OH)4 - public static Materials Talc = new Materials( 902, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 90, 180, 90, 0, "Talc" , "Talc" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // H2Mg3(SiO3)4 - public static Materials Soapstone = new Materials( 877, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 95, 145, 95, 0, "Soapstone" , "Soapstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))), // H2Mg3(SiO3)4 + public static Materials Gypsum = new Materials( 934, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 230, 230, 250, 0, "Gypsum" , "Gypsum" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Sulfur, 1), new MaterialStack(Water, 2), new MaterialStack(Oxygen, 4))); // CaSO4 2H2O + public static Materials Alunite = new Materials( 911, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 225, 180, 65, 0, "Alunite" , "Alunite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Potassium, 1), new MaterialStack(Aluminium, 3), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 14))); // KAl3(SO4)2(OH)6 + public static Materials Dolomite = new Materials( 914, TextureSet.SET_FLINT , 1.0F, 0, 1, 1 |8 , 225, 205, 205, 0, "Dolomite" , "Dolomite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Magnesium, 1), new MaterialStack(Carbon, 2), new MaterialStack(Oxygen, 6))); // CaMg(CO3)2 + public static Materials Wollastonite = new Materials( 915, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 240, 240, 0, "Wollastonite" , "Wollastonite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 3))); // CaSiO3 + public static Materials Zeolite = new Materials( 916, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 240, 230, 230, 0, "Zeolite" , "Zeolite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Sodium, 1), new MaterialStack(Calcium, 4), new MaterialStack(Silicon, 27), new MaterialStack(Aluminium, 9), new MaterialStack(Water, 28), new MaterialStack(Oxygen, 72))); // NaCa4(Si27Al9)O72 28(H2O) + public static Materials Kyanite = new Materials( 924, TextureSet.SET_FLINT , 1.0F, 0, 2, 1 |8 , 110, 110, 250, 0, "Kyanite" , "Kyanite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 1), new MaterialStack(Oxygen, 5))); // Al2SiO5 + public static Materials Kaolinite = new Materials( 929, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 245, 235, 235, 0, "Kaolinite" , "Kaolinite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Silicon, 2), new MaterialStack(Hydrogen, 4), new MaterialStack(Oxygen, 9))); // Al2Si2O5(OH)4 + public static Materials Talc = new Materials( 902, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 90, 180, 90, 0, "Talc" , "Talc" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 + public static Materials Soapstone = new Materials( 877, TextureSet.SET_DULL , 1.0F, 0, 1, 1 |8 , 95, 145, 95, 0, "Soapstone" , "Soapstone" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL , 1, Arrays.asList(new MaterialStack(Magnesium, 3), new MaterialStack(Silicon, 4), new MaterialStack(Hydrogen, 2), new MaterialStack(Oxygen, 12))); // H2Mg3(SiO3)4 public static Materials Concrete = new Materials( 947, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 , 100, 100, 100, 0, "Concrete" , "Concrete" , 0, 0, 300, 0, false, false, 0, 1, 1, Dyes.dyeGray , 0, Arrays.asList(new MaterialStack(Stone, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TERRA, 1))); public static Materials IronMagnetic = new Materials( 354, TextureSet.SET_MAGNETIC , 6.0F, 256, 2, 1|2 |64|128 , 200, 200, 200, 0, "IronMagnetic" , "Magnetic Iron" , 0, 0, -1, 0, false, false, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Iron, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); public static Materials SteelMagnetic = new Materials( 355, TextureSet.SET_MAGNETIC , 6.0F, 512, 2, 1|2 |64|128 , 128, 128, 128, 0, "SteelMagnetic" , "Magnetic Steel" , 0, 0, 1000, 1000, true, false, 4, 51, 50, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 1), new TC_AspectStack(TC_Aspects.ORDO, 1), new TC_AspectStack(TC_Aspects.MAGNETO, 1))); @@ -661,6 +661,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials HSSE = new Materials( 373, TextureSet.SET_METALLIC , 10.0F, 5120, 4, 1|2 |64|128 , 51, 102, 0, 0, "HSSE" , "HSS-E" , 0, 0, 5400,25400, true, false, 4, 1, 1, Dyes.dyeGreen , 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Cobalt, 1),new MaterialStack(Manganese, 1), new MaterialStack(Silicon, 1))); public static Materials HSSS = new Materials( 374, TextureSet.SET_METALLIC , 14.0F, 3000, 4, 1|2 |64|128 , 102, 0, 51, 0, "HSSS" , "HSS-S" , 0, 0, 5400,25400, true, false, 4, 1, 1, Dyes.dyeRed , 2, Arrays.asList(new MaterialStack(HSSG, 6), new MaterialStack(Iridium, 2), new MaterialStack(Osmium, 1))); + //ADDED public static Materials Electrotine = new Materials( 812, TextureSet.SET_SHINY , 1.0F, 0, 1, 1 |8 , 60, 180, 200, 0, "Electrotine" , "Electrotine" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeCyan , 0, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Electrum, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 2))); public static Materials Galgadorian = new Materials( 384, TextureSet.SET_METALLIC , 16.0F, 3600, 3, 1|2 |64|128 , 154, 105, 119, 0, "Galgadorian" , "Galgadorian" , 0, 0, 3000,23000, true, false, 1, 1, 1, Dyes.dyePink ); public static Materials EnhancedGalgadorian = new Materials( 385, TextureSet.SET_METALLIC , 32.0F, 7200, 5, 1|2| 64|128 , 152, 93, 133, 0, "EnhancedGalgadorian" , "Enhanced Galgadorian" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyePink ); @@ -669,12 +670,28 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { ////public static Materials RefinedObsidian = new Materials(----, TextureSet.SET_METALLIC , 1.0F, 0, 1, 1|2 , 80, 50, 100, 0, "RefinedObsidian" , "Refined Obsidian" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePurple ); public static Materials Shadow = new Materials( 368, TextureSet.SET_METALLIC , 32.0F, 8192, 4, 1|2 |8 |64|128 , 16, 3, 66, 0, "Shadow" , "Shadow" , 0, 0, 1800, 1800, true, false, 3, 4, 3, Dyes.dyeBlue ); + //\/HAD TO MOVE DOWN SECTION + public static Materials RedstoneAlloy = new Materials( 381, TextureSet.SET_METALLIC , 3.0F, 128, 2, 1|2 |64|128 , 181, 51, 51, 0, "RedstoneAlloy" , "Redstone Alloy" , 0, 0, 500,21000, true, false, 1, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(Redstone, 1), new MaterialStack(Silicon, 1), new MaterialStack(Coal, 1))); + public static Materials Soularium = new Materials( 379, TextureSet.SET_METALLIC , 8.0F, 256, 2, 1|2 |64|128 , 65, 46, 29, 0, "Soularium" , "Soularium" , 0, 0, 800,21000, true, false, 3, 1, 1, Dyes.dyeBrown , 1, Arrays.asList(new MaterialStack(SoulSand, 1), new MaterialStack(Gold, 1), new MaterialStack(Ash, 1))); + public static Materials ConductiveIron = new Materials( 369, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 217, 178, 171, 0, "ConductiveIron" , "Conductive Iron" , 0, 0, -1,21200, true, false, 4, 1, 1, Dyes.dyeRed , 1, Arrays.asList(new MaterialStack(RedstoneAlloy, 1), new MaterialStack(Iron, 1), new MaterialStack(Silver, 1))); + public static Materials ElectricalSteel = new Materials( 365, TextureSet.SET_METALLIC , 6.0F, 512, 2, 1|2 |64|128 , 185, 185, 185, 0, "ElectricalSteel" , "Electrical Steel" , 0, 0, 1811,21000, true, false, 4, 1, 1, Dyes.dyeGray , 1, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Coal, 1), new MaterialStack(Silicon, 1))); + public static Materials EnergeticAlloy = new Materials( 366, TextureSet.SET_METALLIC , 12.0F, 1024, 3, 1|2 |64|128 , 255, 170, 81, 0, "EnergeticAlloy" , "Energetic Alloy" , 0, 0, -1,22200, true, false, 3, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(ConductiveIron, 1), new MaterialStack(Gold, 1), new MaterialStack(BlackSteel, 1))); + public static Materials VibrantAlloy = new Materials( 367, TextureSet.SET_METALLIC , 18.0F, 4048, 4, 1|2 |64|128 , 157, 188, 53, 0, "VibrantAlloy" , "Vibrant Alloy" , 0, 0, 3300,23300, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(EnergeticAlloy, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))); + public static Materials PulsatingIron = new Materials( 378, TextureSet.SET_METALLIC , 6.0F, 256, 3, 1|2 |64|128 , 128, 246, 155, 0, "PulsatingIron" , "Pulsating Iron" , 0, 0, -1,21800, true, false, 4, 1, 1, Dyes.dyeLime , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(EnderPearl, 1), new MaterialStack(RedstoneAlloy, 1))); + public static Materials Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500,24500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.ALIENIS, 1))); + public static Materials DarkSteel = new Materials( 364, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 80, 70, 80, 0, "DarkSteel" , "Dark Steel" , 0, 0, -1,21800, true, false, 3, 1, 1, Dyes.dyePurple , 1, Arrays.asList(new MaterialStack(ElectricalSteel, 1), new MaterialStack(Coal, 1), new MaterialStack(Obsidian, 1))); + public static Materials Mithril = new Materials( 331, TextureSet.SET_SHINY , 14.0F, 64, 3, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))); + public static Materials BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Arrays.asList(new TC_AspectStack(TC_Aspects.ELECTRUM, 3))); + public static Materials ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 6.0F, 384, 3, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadowiron" , 0, 0, -1, 0, false, false, 3, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))); + public static Materials ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadowsteel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 3, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); + public static Materials AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); + /** * Galaxy Space 1.10 compat from Version 2.6 */ public static Materials Ledox = new Materials( 390, TextureSet.SET_SHINY , 15.0F, 1024, 4, 1|2 |8 |64|128 , 0, 116, 255, 0, "Ledox" , "Ledox" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeBlue ); public static Materials Quantium = new Materials( 391, TextureSet.SET_SHINY , 18.0F, 2048, 4, 1|2 |8 |64|128 , 0, 209, 11, 0, "Quantium" , "Quantium" , 0, 0, 4000, 4000, true, false, 4, 1, 1, Dyes.dyeLime ); - public static Materials Mytryl = new Materials( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |64|128 , 242, 100, 4, 0, "Mytryl" , "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange) , + public static Materials Mytryl = new Materials( 387, TextureSet.SET_SHINY , 8.0F, 512, 4, 1|2 |8 |64|128 , 242, 100, 4, 0, "Mytryl" , "Mytryl" , 0, 0, 3600, 3600, true, false, 4, 1, 1, Dyes.dyeOrange ); public static Materials BlackPlutonium = new Materials( 388, TextureSet.SET_DULL , 36.0F, 8192, 6, 1|2 |8 |64|128 , 50, 50, 50, 0, "BlackPlutonium" , "Black Plutonium" , 0, 0, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeBlack ); public static Materials CallistoIce = new Materials( 389, TextureSet.SET_SHINY , 9.0F, 1024, 4, 1|2 |8 |64|128 , 30, 177, 255, 0, "CallistoIce" , "Callisto Ice" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeLightBlue ); public static Materials Duralumin = new Materials( 392, TextureSet.SET_SHINY , 16.0F, 512, 3, 1|2 |8 |64|128 , 235, 209, 160, 0, "Duralumin" , "Duralumin" , 0, 0, 1600, 1600, true, false, 4, 1, 1, Dyes.dyeOrange , 2, Arrays.asList(new MaterialStack(Aluminium, 6), new MaterialStack(Copper, 1), new MaterialStack(Manganese, 1), new MaterialStack(Magnesium, 1))); diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 32a001000d..5ee7de2b84 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -29,10 +29,12 @@ public class Textures { MACHINE_CASING_TANK_1, MACHINE_CASING_TANK_2, MACHINE_CASING_TANK_3, MACHINE_CASING_TANK_4, MACHINE_CASING_TANK_5, MACHINE_CASING_TANK_6, MACHINE_CASING_TANK_7, MACHINE_CASING_TANK_8, MACHINE_CASING_TANK_9, MACHINE_CASING_TANK_10,MACHINE_CASING_TANK_11,MACHINE_CASING_TANK_12, - MACHINE_CASING_TANK_13,MACHINE_CASING_TANK_14,MACHINE_CASING_TANK_15,MACHINE_CASING_TANK_0; + MACHINE_CASING_TANK_13,MACHINE_CASING_TANK_14,MACHINE_CASING_TANK_15,MACHINE_CASING_TANK_0, + BLOCK_STEELEAF, BLOCK_ICHORIUM, + OVERLAY_ENERGY_IN_POWER,OVERLAY_ENERGY_OUT_POWER,OVERLAY_AUTOMAINTENANCE,OVERLAY_AUTOMAINTENANCE_IDLE,OVERLAY_TELEPORTER_SIDES,INSULATION_MEDIUM_PLUS, // VOID // The Empty Texture - , RENDERING_ERROR, PIPE_RESTRICTOR, INSULATION_FULL, INSULATION_TINY, INSULATION_SMALL, INSULATION_MEDIUM, INSULATION_LARGE, INSULATION_HUGE, CFOAM_FRESH, + ,RENDERING_ERROR, PIPE_RESTRICTOR, INSULATION_FULL, INSULATION_TINY, INSULATION_SMALL, INSULATION_MEDIUM, INSULATION_LARGE, INSULATION_HUGE, CFOAM_FRESH, CFOAM_HARDENED, SOLARPANEL, SOLARPANEL_8V, SOLARPANEL_LV, SOLARPANEL_MV, SOLARPANEL_HV, SOLARPANEL_EV, SOLARPANEL_IV, SOLARPANEL_LuV, SOLARPANEL_ZPM, SOLARPANEL_UV, VENT_NORMAL, VENT_ADVANCED, COVER_WOOD_PLATE, ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, AUTOMATION_FILTER, AUTOMATION_TYPEFILTER, AUTOMATION_CHESTBUFFER, AUTOMATION_SUPERBUFFER, AUTOMATION_REGULATOR, CONCRETE_LIGHT_STONE, CONCRETE_LIGHT_COBBLE, CONCRETE_LIGHT_COBBLE_MOSSY, @@ -104,7 +106,7 @@ public class Textures { BLOCK_CUPRONICKEL, BLOCK_DAMASCUSSTEEL, BLOCK_DARKIRON, BLOCK_DEEPIRON, BLOCK_DESH, BLOCK_DURANIUM, BLOCK_DYSPROSIUM, BLOCK_ELECTRUM, BLOCK_ELECTRUMFLUX, BLOCK_ENDERIUM, BLOCK_ERBIUM, BLOCK_EUROPIUM, BLOCK_FIERYSTEEL, BLOCK_GADOLINIUM, BLOCK_GALLIUM, BLOCK_HOLMIUM, BLOCK_HSLA, BLOCK_INDIUM, BLOCK_INFUSEDGOLD, BLOCK_INVAR, BLOCK_IRIDIUM, BLOCK_IRONMAGNETIC, BLOCK_IRONWOOD, BLOCK_KANTHAL, BLOCK_KNIGHTMETAL, BLOCK_LANTHANUM, BLOCK_LEAD, BLOCK_LUTETIUM, BLOCK_MAGNALIUM, BLOCK_MAGNESIUM, BLOCK_MANGANESE, BLOCK_METEORICIRON, - BLOCK_METEORICSTEEL, BLOCK_MIDASIUM, BLOCK_MITHRIL, BLOCK_MOLYBDENUM, BLOCK_NAQUADAH, BLOCK_NAQUADAHALLOY, BLOCK_NAQUADAHENRICHED, BLOCK_NAQUADRIA, BLOCK_NEODYMIUM, BLOCK_NEODYMIUMMAGNETIC, + BLOCK_METEORICSTEEL, BLOCK_MIDASIUM, BLOCK_TRINIUM,BLOCK_MITHRIL, BLOCK_MOLYBDENUM, BLOCK_NAQUADAH, BLOCK_NAQUADAHALLOY, BLOCK_NAQUADAHENRICHED, BLOCK_NAQUADRIA, BLOCK_NEODYMIUM, BLOCK_NEODYMIUMMAGNETIC, BLOCK_NEUTRONIUM, BLOCK_NICHROME, BLOCK_NICKEL, BLOCK_NIOBIUM, BLOCK_NIOBIUMNITRIDE, BLOCK_NIOBIUMTITANIUM, BLOCK_OSMIRIDIUM, BLOCK_OSMIUM, BLOCK_PALLADIUM, BLOCK_PIGIRON, BLOCK_PLATINUM, BLOCK_PLUTONIUM, BLOCK_PLUTONIUM241, BLOCK_PRASEODYMIUM, BLOCK_PROMETHIUM, BLOCK_REDALLOY, BLOCK_REDSTEEL, BLOCK_ROSEGOLD, BLOCK_RUBIDIUM, BLOCK_SAMARIUM, BLOCK_SCANDIUM, BLOCK_SHADOWIRON, BLOCK_SHADOWSTEEL, BLOCK_SILICON, BLOCK_SILVER, BLOCK_SOLDERINGALLOY, BLOCK_STAINLESSSTEEL, BLOCK_STEEL, BLOCK_STEELMAGNETIC, BLOCK_STERLINGSILVER, BLOCK_SUNNARIUM, BLOCK_TANTALUM, diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index b35d797a9c..3762713fa3 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -108,7 +108,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } } diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 0182052f71..84e30620eb 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -668,7 +668,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(getBaseMetaTileEntity().getWorld(),new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index 3cc96b5058..ccefab6a3a 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -858,7 +858,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity { tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index a99a5bae75..cdf19839a2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -98,7 +98,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { boolean chk1,chk2,chk3; float ran1=floatGen.nextFloat(),ran2=0,ran3=0; chk1=ran1*100= GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollutionAtCoords(aWorld,this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>= GT_Mod.gregtechproxy.mPollutionSmogLimit){ ran2=floatGen.nextFloat(); ran3=floatGen.nextFloat(); chk2=ran2*100 { public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map(new HashSet(3), "gt.recipe.rockbreaker", "Rock Breaker", null, RES_PATH_GUI + "basicmachines/RockBreaker", 1, 1, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sReplicatorFakeRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.replicator", "Replicator", null, RES_PATH_GUI + "basicmachines/Replicator", 0, 1, 0, 1, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.fakeAssemblylineProcess", "Assemblyline Process", null, RES_PATH_GUI + "FakeAssemblyline", 1, 1, 1, 0, 1, E, 1, E, true, false); + //public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sAssemblylineVisualRecipes = new GT_Recipe_Map(new HashSet(30), "gt.recipe.fakeAssemblylineProcess", "Assemblyline Process", null, RES_PATH_GUI + "FakeAssemblyline", 1, 1, 1, 0, 1, E, 1, E, true, false); public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map(new HashSet(10000), "gt.recipe.plasmaarcfurnace", "Plasma Arc Furnace", null, RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", 1, 4, 1, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map(new HashSet(10000), "gt.recipe.arcfurnace", "Arc Furnace", null, RES_PATH_GUI + "basicmachines/ArcFurnace", 1, 4, 1, 1, 3, E, 1, E, true, true); public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet(100), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 7e38838728..7e28593abf 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -2,6 +2,7 @@ package gregtech.api.util; import cofh.api.transport.IItemDuct; import cpw.mods.fml.common.FMLCommonHandler; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; @@ -17,6 +18,7 @@ import gregtech.api.items.GT_EnergyArmor_Item; import gregtech.api.items.GT_Generic_Item; import gregtech.api.net.GT_Packet_Sound; import gregtech.api.objects.GT_ItemStack; +import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.ItemData; import gregtech.api.objects.XSTR; import gregtech.api.threads.GT_Runnable_Sound; diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index 1a3ed25e6c..fa14abf03d 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -292,7 +292,7 @@ public class GT_Client extends GT_Proxy afterSomeTime=0; StatFileWriter sfw= Minecraft.getMinecraft().thePlayer.getStatFileWriter(); try { - for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList){ + for(GT_Recipe recipe:GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){ recipe.mHidden=!sfw.hasAchievementUnlocked(GT_Mod.achievements.getAchievement(recipe.getOutput(0).getUnlocalizedName())); } }catch (Exception e){} diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 39dc0c3b8f..5c7678e857 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -16,6 +16,7 @@ import net.minecraftforge.common.DimensionManager; import java.util.ArrayList; import java.util.List; +import java.util.TreeMap; //import net.minecraft.entity.EntityLiving; @@ -52,7 +53,7 @@ public class GT_Pollution {//TODO REWORK * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) */ - static TreeMap> tList = null; + static List tList = null; static int loops = 1; static XSTR tRan = new XSTR(); @@ -60,8 +61,8 @@ public class GT_Pollution {//TODO REWORK if(!GT_Mod.gregtechproxy.mPollution) return; int aWorldID=aWorld.provider.dimensionId; if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){ - tList = new TreeMap<>(); - tList.put(aWorld,new ArrayList(GT_Proxy.chunkData.keySet())); + //---tList = new TreeMap<>(); + //---tList.put(aWorld,new ArrayList(GT_Proxy.chunkData.keySet())); loops = (tList.size()/1200) + 1; //System.out.println("new Pollution loop"+aTick); } @@ -83,8 +84,8 @@ public class GT_Pollution {//TODO REWORK tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ+1)); tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ-1)); for(ChunkPosition tNPos : tNeighbor){ - if(!GT_Proxy.chunkData.containsKey(tNPos)) - GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); + //---if(!GT_Proxy.chunkData.containsKey(tNPos)) + //--- GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); //if(GT_Proxy.chunkData.containsKey(tNPos)){ int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 2a71740231..07c1ea9fce 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -656,12 +656,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { 'R', OrePrefixes.ring.get(Materials.Steel)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), tBits, new Object[]{"XSX", "XSX", "ShS", 'X', OrePrefixes.plate.get(aMaterial), 'S', OrePrefixes.plate.get(Materials.Steel)}); - switch (aMaterial) { - case Wood: + switch (aMaterial.mName) { + case "Wood": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " s", 'P', OrePrefixes.plank.get(aMaterial)}); break; - case Stone: + case "Stone": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " f", 'P', OrePrefixes.stoneSmooth}); break; @@ -672,12 +672,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { //TODO CHECK } - switch (aMaterial) { - case Wood: + switch (aMaterial.mName) { + case "Wood": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PsP", "SPS", 'P', OrePrefixes.plank.get(aMaterial), 'S', OrePrefixes.stick.get(aMaterial)}); break; - case Stone: + case "Stone": GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PfP", "SPS", 'P', OrePrefixes.stoneSmooth, 'S', new ItemStack(Blocks.stone_button, 1, 32767)}); break; @@ -739,7 +739,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { new Object[]{"h", "X", 'X', OrePrefixes.gemFlawless.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), tBits, new Object[]{"h", "X", 'X', OrePrefixes.gemExquisite.get(aMaterial)}); - if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.name(), true))) { + if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) { GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), tBits, new Object[]{"X", "m", 'X', OrePrefixes.gemChipped.get(aMaterial)}); GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), tBits, diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 090f64c1c4..80b6be70c5 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -896,7 +896,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if(tItem==null)System.out.println("addAssemblinglineRecipe"+aResearchItem.getDisplayName()); } GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, 0); - GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); + GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true); GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt)); return true; } diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 6d2df102f8..8d762a0d02 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -42,7 +42,7 @@ public class GT_Worldgen_GT_Ore_Layer //public final boolean mAsteroid; public final String aTextWorldgen = "worldgen."; - public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { + public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { super(aName, sList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java index 5b0d4d61f5..6a8cd49b6f 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java @@ -25,8 +25,8 @@ public class GT_Worldgen_GT_Ore_SmallPieces public final String mBiome; public final String aTextWorldgen = "worldgen."; - - public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) { + //TODO CHECk IF INSTANTIATION IS CORRECT + public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary) { super(aName, GregTech_API.sWorldgenList, aDefault); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether); diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java index 9a2b161a0f..00ec76aeea 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ b/src/main/java/gregtech/common/items/armor/ArmorData.java @@ -1,344 +1,426 @@ -package gregtech.common.items.armor.gui; - -import gregtech.api.enums.GT_Values; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Network; -import gregtech.common.items.armor.ArmorData; -import gregtech.common.items.armor.components.StatType; +package gregtech.common.items.armor; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Locale; +import java.util.Map; +import java.util.Random; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.inventory.GuiContainer; +import gregtech.api.damagesources.GT_DamageSources; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.components.ArmorComponent; +import gregtech.common.items.armor.components.StatType; +import gregtech.common.items.armor.gui.ContainerBasicArmor; +import gregtech.common.items.armor.gui.ContainerModularArmor; +import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.util.DamageSource; import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; -@SideOnly(Side.CLIENT) -public class GuiElectricArmor1 extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - private int tab; - - public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { - super(containerModularArmor); - player = aPlayer; - cont = containerModularArmor; - tab = 0; - } - @Override - public void onGuiClosed() - { - cont.saveInventory(player); - super.onGuiClosed(); - }; - public String seperateNumber(long number){ - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - return formatter.format(number); - } +public class ArmorData { - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } + public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots; + public int armorTier; // 0 = Basic Modular Armor; 1 = Modular Exoskeleton; 2= Modular Nanosuit; 3 = Heavy Power Armor + public List info; // needs Localization + public boolean isTopItem; + public int tooltipUpdate; + public boolean openGui; - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - //Draw background - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - //Draw active arrows - drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); - //Draw active armor symbol - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); - break; - default: - break; + public ArmorData helmet; + public ArmorData chestplate; + public ArmorData leggings; + public ArmorData boots; + + public Map mStat = new HashMap(); + public Map mBStat = new HashMap(); + static ArrayList updateArmorStatTypeList; +// public boolean fullArmor; +// public boolean fullRadiationDef; +// public boolean fullElectricDef; +// +// public float fallDef; +// public float physicalDef; +// public float projectileDef; +// public float fireDef; +// public float magicDef; +// public float explosionDef; +// public float radiationDef; +// public float electricDef; +// public float witherDef; +// +// public float thorns; +// public float thornsSingle; +// public int magnet; +// public int magnetSingle; +// +// public int partsCharge; + public int maxCharge; + public int charge; +// public boolean thaumicGoggles; +// public boolean nightVision; +// public boolean potionInjector; +// public boolean autoFeeder; + + public FluidStack fluid; +// public int tankCap; +// +// public int weight; + public float maxWeight; +// public int processingPower; +// public int processingPowerUsed; +// public int partProcessing; +// public int partProcessingUsed; +// +// public int motorPower; +// public int motorEUusage; +// public int pistonJumpboost; +// public int pistonEUusage; +// public int electrolyzerProd; +// public int electrolyzerEUusage; +// public int fieldGenCap; +// public int fieldGenEUusage; +// +// public int jetpackMaxWeight; +// public int antiGravMaxWeight; + + public ArmorData(EntityPlayer player, ItemStack stack, int type, int tier) { + if(updateArmorStatTypeList == null) + { + updateArmorStatTypeList = new ArrayList(); + updateArmorStatTypeList.add(StatType.MAGNET); + updateArmorStatTypeList.add(StatType.THORNS); + updateArmorStatTypeList.add(StatType.PROCESSINGPOWER); + updateArmorStatTypeList.add(StatType.PROCESSINGPOWERUSED); } - //Draw active tab - switch(tab){ + this.type = type; + this.armorTier = tier; + ContainerModularArmor tmp = new ContainerBasicArmor((EntityPlayer) player, new InventoryArmor(ModularArmor_Item.class, stack)); + calculateArmor(tmp.mInvArmor.parts); + switch (tier) { case 0: + maxCharge = 0; break; case 1: - drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); + maxCharge = 250000; break; case 2: - drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); - break; - default: - break; + maxCharge = 1000000; } - float tankCap = cont.mInvArmor.data.mStat.containsKey(StatType.TANKCAP) ? cont.mInvArmor.data.mStat.get(StatType.TANKCAP) :0.0f; - if(tankCap>0){ - drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); + readNBT(stack.getTagCompound()); + } + + private void readNBT(NBTTagCompound nbt) { + if (nbt == null) { + return; } - float weight = cont.mInvArmor.data.mStat.containsKey(StatType.WEIGHT) ? cont.mInvArmor.data.mStat.get(StatType.WEIGHT) : 0.0f; - int bar = (int) Math.floor(18 * (weight)/(float)1000); - drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); - drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); - - if(tab==0){ - //processing power bar - bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)/(float)cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER))),52); - drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); - drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); - }else if(tab==1){ - - }else{ - //Def tab values - if(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); - drawBars(31, 20, cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); - drawBars(31, 29, cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); - drawBars(31, 38, cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); - drawBars(31, 47, cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); - drawBars(31, 56, cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); - drawBars(62, 20, cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); - drawBars(62, 29, cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); - drawBars(62, 38, cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE)); - if(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); - if(cont.mInvArmor.data.mStat.get(StatType.THORNS)>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); - if(cont.mInvArmor.data.mStat.get(StatType.MAGNET)>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); + if (nbt.hasKey("Charge")) { + this.charge = nbt.getInteger("Charge"); } - - } - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>68&&yStart<77){ - if(xStart>18&&xStart<26){ - tab++; - }else if(xStart>8&&xStart<17){ - tab--; - } - if(tab>2){tab=0;} - if(tab<0){tab=2;} - if(xStart>72&&xStart<112){ - if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;} - if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;} - if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;} - if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;} - -// if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} -// if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} -// if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} -// if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } + public void writeToNBT(NBTTagCompound nbt) { + if (nbt == null) { + return; } -// Slot slot = getSlotAtPosition(mouseX, mouseY); -// if (slot != null && slot instanceof SlotFluid && player != null && cont.mInvArmor.data.helmet!=null) { -// ItemStack tmp = player.inventory.getItemStack(); -// //GT_Network gtn = new GT_Network(); -// if (tmp == null) { -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); -// } -// //ArmorData armorData = new ArmorData(player,); -// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { -// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); -// if (!slot.getHasStack() && tmp2 != null) { -// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); -// -// if(cont.mInvArmor.data.helmet.fluid == null) -// { -// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); -// } -// else -// { -// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; -// } -// -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); -// ItemStack tmp4 = GT_Utility.getContainerForFilledItem(tmp, true); -// tmp4.stackSize = 1; -// if (tmp.stackSize > 1) { -// player.inventory.addItemStackToInventory(tmp4); -// tmp.stackSize--; -// player.inventory.setItemStack(tmp); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } else { -// player.inventory.setItemStack(null); -// player.inventory.addItemStackToInventory(tmp4); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } -// -// } else if (slot.getHasStack() && tmp2 != null) { -// Item fluidSlot = slot.getStack().getItem(); -// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { -// NBTTagCompound nbt = slot.getStack().getTagCompound(); -// if (nbt != null) { -// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); -// ItemStack tmp3 = player.inventory.getItemStack(); -// if (tmp3.stackSize <= 1) { -// tmp3 = null; -// } else { -// tmp3.stackSize--; -// } -// player.inventory.setItemStack(tmp3); -// //GT_Values.NW.sendToServer(new FluidSync2(player.getCommandSenderName())); -// slot.putStack(GT_Utility.getFluidDisplayStack(tmp2, true)); -// if(cont.mInvArmor.data.helmet.fluid == null) -// { -// cont.mInvArmor.data.helmet.fluid = new FluidStack(tmp2.getFluid(), tmp2.amount); -// } -// else -// { -// cont.mInvArmor.data.helmet.fluid.amount += tmp2.amount; -// } -// //GT_Values.NW.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, GT_Utility.getFluidName(tmp2, false))); -// } -// } -// } -// } -// } - super.mouseClicked(mouseX, mouseY, mouseBtn); + nbt.setInteger("Charge", this.charge); } - - protected void drawTooltip(int x, int y) { - List list = new ArrayList(); - //General tooltips - if(x>=7&&y>=11&&x<=33&&y<=17){ - list.add(GT_LanguageManager.getTranslation("Weight") + ": " + cont.mInvArmor.data.mStat.get(StatType.WEIGHT)); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.mStat.get(StatType.WEIGHT) > 1000) - list.add("Too Heavy!"); + + public ArmorData calculateArmor(ItemStack[] parts) { + mStat.clear(); + mBStat.clear(); + for(ItemStack tPart : parts){ + if(tPart!=null && ArmorComponent.mStacks.containsKey(tPart.getUnlocalizedName())) + ArmorComponent.mStacks.get(tPart.getUnlocalizedName()).calculateArmor(this); } - if(x>=56&&y>=11&&x<=112&&y<=17){ - list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); + for(StatType tType : StatType.values())if(!mStat.containsKey(tType))mStat.put(tType, .0f); + for(StatType tType : StatType.values())if(!mBStat.containsKey(tType))mBStat.put(tType, false); + updateTooltip(); + return this; + } + + public void updateTooltip() { + List tagList = new ArrayList(); + String tmp2 = ""; + if (maxWeight > 4000) { + tmp2 = " " + GT_LanguageManager.getTranslation("Too Heavy"); } - if(y>74&&y<83){ - if(x>8&&x<17){ - list.add("Previous Page"); - }else if(x>18&&x<27){ - list.add("Next Page"); - }else if(x>72&&x<80){ - list.add("Helmet"); - }else if(x>81&&x<90){ - list.add("Chestplate"); - }else if(x>91&&x<100){ - list.add("Leggings"); - }else if(x>101&&x<110){ - list.add("Boots"); + if (maxCharge != 0) { + DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); + DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); + symbols.setGroupingSeparator(' '); + if (type == 0) { + if (mBStat.get(StatType.THAUMICGOGGLES)) { + tagList.add(GT_LanguageManager.getTranslation("Thaumic Goggles installed")); + } + if (mBStat.get(StatType.NIGHTVISION)) { + tagList.add(GT_LanguageManager.getTranslation("Nightvision installed")); + } + } + tagList.add("EU: " + formatter.format(charge + mStat.get(StatType.PARTSCHARGE))); + if (type == 2) { + tagList.add(GT_LanguageManager.getTranslation("Jumpboost") + ": " + mStat.get(StatType.PISTONJUMPBOOST) / 3 + "m"); } + if (type == 2 && mStat.get(StatType.PISTONJUMPBOOST) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Uphill step assist active")); + } + if (type == 2 && mStat.get(StatType.MOTPRPOWER) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Speedup") + ": " + mStat.get(StatType.MOTPRPOWER)); + tagList.add(GT_LanguageManager.getTranslation("Motor energy usage") + ": " + mStat.get(StatType.MOTOREUUSAGE) + " EU"); + if (maxWeight > 4000) { + tagList.add(GT_LanguageManager.getTranslation("Too Heavy!!!")); + } + } + tagList.add(GT_LanguageManager.getTranslation("Processing power ") + " " + mStat.get(StatType.PARTPROCESSING) + " " + GT_LanguageManager.getTranslation("")); + tagList.add(GT_LanguageManager.getTranslation("Processing power used") + ": " + mStat.get(StatType.PARTPROCESSINGUSED) + " " + GT_LanguageManager.getTranslation("")); + if (type == 0 && mStat.get(StatType.ELECTROLYZERPROD) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Electrolyzer produces ") + " " + mStat.get(StatType.ELECTROLYZERPROD) / 2 + GT_LanguageManager.getTranslation("per second")); + } + if (mStat.get(StatType.TANKCAP) > 0) { + if (fluid != null) { + tagList.add(GT_LanguageManager.getTranslation("Tank Capacity") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + mStat.get(StatType.TANKCAP) + ")"); + } else { + tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + mStat.get(StatType.TANKCAP)); + } + } + } + tagList.add(GT_LanguageManager.getTranslation("Weight") + ": " + mStat.get(StatType.WEIGHT) + tmp2); + tagList.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); + tagList.add(GT_LanguageManager.getTranslation("Explosive Defence") + ": " + (Math.round(mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + if (mStat.get(StatType.FALLDEFENCE) > 0 && type == 3) { + tagList.add(GT_LanguageManager.getTranslation("Absorbs") + " " + mStat.get(StatType.FALLDEFENCE) + GT_LanguageManager.getTranslation(" m of Fall Defence")); + } + if (mStat.get(StatType.THORNS) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Thorns") + ": " + mStat.get(StatType.THORNS)); + } + if (mStat.get(StatType.MAGNET) > 0) { + tagList.add(GT_LanguageManager.getTranslation("Magnet") + ": " + mStat.get(StatType.MAGNET) + "m"); } - if(tab==0){ - if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.mStat.get(StatType.TANKCAP)+"L"); + if (mBStat.get(StatType.FULLRADIATIONARMOR)) { + tagList.add(GT_LanguageManager.getTranslation("Is Full Radiation Defence")); + } else { + if (mStat.get(StatType.RADIATIONDEFENCE) > 0.01d) { + tagList.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); } - if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWER)); - list.add("Processing Power Used: "+cont.mInvArmor.data.mStat.get(StatType.PROCESSINGPOWERUSED)); + } + info = tagList; + } + + public void armorPartsEquipped(EntityPlayer aPlayer) { + helmet = null; + chestplate = null; + leggings = null; + boots = null; + for (int i = 1; i < 5; i++) { + ItemStack stack = aPlayer.getEquipmentInSlot(i); + if (stack != null && stack.getItem() instanceof ModularArmor_Item) { + ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem(); + ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack)); + if ((this.type + i) == 4) { + fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, Math.round(mStat.get(StatType.TANKCAP))); + } + if (maxCharge > 0 && charge < maxCharge) { + int loaded = ArmorCalculation.deChargeBatterys(tmp2.mInvArmor.parts, maxCharge - charge); + charge = charge + loaded; + change(mStat, StatType.PARTSCHARGE, -loaded); + + } + switch (tmp.armorType) { + case 0: + helmet = tmp.data; + break; + case 1: + chestplate = tmp.data; + break; + case 2: + leggings = tmp.data; + break; + case 3: + boots = tmp.data; + break; + default: + break; + } + writeToNBT(stack.getTagCompound()); } - }else if(tab==1){ + } + if (helmet != null && chestplate != null && leggings != null && boots != null) { + set(mBStat, StatType.FULLARMOR, true); + boolean helmHasFullRadiationDefence=false; + boolean chestplateHasFullRadiationDefence=false; + boolean leggingsHasFullRadiationDefence=false; + boolean bootsHasFullRadiationDefence=false; - }else{ - if (x >= 28 && x <= 58) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - list.add(GT_LanguageManager.getTranslation("Magical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 60 && y <= 68) { - list.add(GT_LanguageManager.getTranslation("Explosion Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%"); + boolean helmHasFullElectricalDefenceDefence=false; + boolean chestplateHasFullElectricalDefenceDefence=false; + boolean leggingsHasFullElectricalDefenceDefence=false; + boolean bootsHasFullElectricalDefenceDefence=false; + //Check each armor pieces for valid mStat value and verify that the Hash contains the StatType key + if(helmet.mStat!= null) + { + if(helmet.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + helmHasFullRadiationDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(helmet.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + helmHasFullElectricalDefenceDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + } + if(chestplate.mStat!= null) + { + if(chestplate.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + chestplateHasFullRadiationDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(chestplate.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + chestplateHasFullElectricalDefenceDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } } - } else if (x >= 59 && x <= 90) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLRADIATIONARMOR)){ - list.add(GT_LanguageManager.getTranslation("Radiation Immunity"));} - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("Electrical Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.ELECTRICALDEFENCE) * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.mBStat.get(StatType.FULLELECTRICARMOR)){ - list.add(GT_LanguageManager.getTranslation("Electric Immunity"));} - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("Wither Defence") + ": " + (Math.round(cont.mInvArmor.data.mStat.get(StatType.WITHERDEFENCE) * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - if(cont.mInvArmor.data.type!=3){ - list.add(GT_LanguageManager.getTranslation("Fall Damage absorbtion")); - list.add(GT_LanguageManager.getTranslation("Only for Boots")); - }else{ - list.add(GT_LanguageManager.getTranslation("Absorbs") + " " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.FALLDEFENCE)) + GT_LanguageManager.getTranslation("m of Fall Damage"));} - } else if (y >= 60 && y <= 68) { - if(x<69){ - list.add(GT_LanguageManager.getTranslation("Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNSSINGLE)) + " Dmg"); - list.add(GT_LanguageManager.getTranslation("Total Thorns") + ": " + (int) Math.round(cont.mInvArmor.data.mStat.get(StatType.THORNS)) + " Dmg"); - }else{ - list.add(GT_LanguageManager.getTranslation("Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNETSINGLE) + " m"); - list.add(GT_LanguageManager.getTranslation("Total Magnet") + ": " + cont.mInvArmor.data.mStat.get(StatType.MAGNET) + " m");} + if(leggings.mStat!= null) + { + if(leggings.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + leggingsHasFullRadiationDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(leggings.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + leggingsHasFullElectricalDefenceDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } } + if(boots.mStat!= null) + { + if(boots.mStat.containsKey(StatType.RADIATIONDEFENCE)) + { + bootsHasFullRadiationDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + if(boots.mStat.containsKey(StatType.ELECTRICALDEFENCE)) + { + bootsHasFullElectricalDefenceDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f; + } + } + //Set Status of Full Armor types + set(mBStat, StatType.FULLRADIATIONARMOR, helmHasFullRadiationDefence&&chestplateHasFullRadiationDefence&&leggingsHasFullRadiationDefence &&bootsHasFullRadiationDefence); + set(mBStat, StatType.FULLELECTRICARMOR, helmHasFullElectricalDefenceDefence&&chestplateHasFullElectricalDefenceDefence&&leggingsHasFullElectricalDefenceDefence &&bootsHasFullElectricalDefenceDefence); + } else { + //Reset Full armor type status to false for all types if StatType.FULLARMOR is false + set(mBStat, StatType.FULLARMOR, false); + set(mBStat, StatType.FULLRADIATIONARMOR, false); + set(mBStat, StatType.FULLELECTRICARMOR, false); } + + + set(mBStat, StatType.MAGNET, 0); + set(mBStat, StatType.THORNS, 0); + set(mBStat, StatType.PROCESSINGPOWER, 0); + set(mBStat, StatType.PROCESSINGPOWERUSED, 0); + + if (helmet != null) { + updateArmorStats(helmet,updateArmorStatTypeList ); } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - public void drawBars(int x, int y, float value) { + if (chestplate != null) { + updateArmorStats(chestplate,updateArmorStatTypeList ); - int bar = (int) Math.floor(18 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); + } + if (leggings != null) { + updateArmorStats(leggings,updateArmorStatTypeList ); + + } + if (boots != null) { + updateArmorStats(boots,updateArmorStatTypeList ); + + } + isTopItem = false; + if (type == 0) { + isTopItem = true; + } else if (helmet == null && type == 1) { + isTopItem = true; + } else if (helmet == null && chestplate == null && type == 2) { + isTopItem = true; + } else if (helmet == null && chestplate == null && leggings == null && type == 3) { + isTopItem = true; + } + if (helmet != null) { + maxWeight = helmet.mStat.get(StatType.WEIGHT); + } + if (chestplate != null) { + maxWeight += chestplate.mStat.get(StatType.WEIGHT); + } + if (leggings != null) { + maxWeight += leggings.mStat.get(StatType.WEIGHT); + } + if (boots != null) { + maxWeight += boots.mStat.get(StatType.WEIGHT); + } } - protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { - for (int k = 0; k < cont.inventorySlots.size(); ++k) { - Slot slot = (Slot) cont.inventorySlots.get(k); - if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { - return slot; - } + private void updateArmorStats(ArmorData armorData, ArrayList statTypes) { + for (StatType statType : statTypes) { + if(armorData == null || armorData.mStat == null || !armorData.mStat.containsKey(statType)) + continue; +// if(armorData != null && armorData.mStat != null && armorData.mStat.containsKey(statType)) +// { + set(mStat, statType, armorData.mStat.get(statType)); +// } + /*change(mStat, StatType.MAGNET, armorData.mStat.get(StatType.MAGNET)); + change(mStat, StatType.THORNS, armorData.mStat.get(StatType.THORNS)); + change(mStat, StatType.PROCESSINGPOWER, armorData.mStat.get(StatType.PROCESSINGPOWER)); + change(mStat, StatType.PROCESSINGPOWERUSED, armorData.mStat.get(StatType.PROCESSINGPOWERUSED));*/ + } + + + } + + public void set(Map aMap, StatType aType, boolean aSet){ + if(aMap.containsKey(aType))aMap.remove(aType); + aMap.put(aType, aSet); + } + + public void set(Map aMap, StatType aType, float aSet){ + if(aMap.containsKey(aType))aMap.remove(aType); + aMap.put(aType, aSet); + } + + public void change(Map aMap, StatType aType, float aChange){ + float tChange = 0; + if(aMap==null)System.out.println("changeMapnull"); + if(aMap.containsKey(aType)){ + Object value = aMap.get(aType); + tChange = value != null ? (float) aMap.get(aType) : 0.0f; + aMap.remove(aType); } - return null; + aMap.put(aType, (tChange + aChange)); + } + + public void dechargeComponents(int aCharge){ + } - private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { - return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); + public double getBaseAbsorptionRatio() { + switch (this.type) { + case 0: + return 0.15; + case 1: + return 0.40; + case 2: + return 0.30; + case 3: + return 0.15; + default: + return 0.00; + } } -} \ No newline at end of file +} diff --git a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java deleted file mode 100644 index 6857535d65..0000000000 --- a/src/main/java/gregtech/common/items/armor/GuiElectricArmor1.java +++ /dev/null @@ -1,299 +0,0 @@ -package gregtech.common.items.armor; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.util.GT_LanguageManager; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Slot; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; - -@SideOnly(Side.CLIENT) -public class GuiElectricArmor1 extends GuiContainer { - ContainerModularArmor cont; - EntityPlayer player; - private int tab; - - public GuiElectricArmor1(ContainerModularArmor containerModularArmor, EntityPlayer aPlayer) { - super(containerModularArmor); - player = aPlayer; - cont = containerModularArmor; - tab = 0; - } - - public String seperateNumber(long number){ - DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US); - DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols(); - symbols.setGroupingSeparator(' '); - return formatter.format(number); - } - - @Override - protected void drawGuiContainerForegroundLayer(int x, int y) { - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - int x2 = x - xStart; - int y2 = y - yStart; - drawTooltip(x2, y2 + 5); - } - - @Override - protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { - GL11.glColor4f(1F, 1F, 1F, 1F); - this.mc.getTextureManager().bindTexture(new ResourceLocation("gregtech", "textures/gui/armorgui3x4.png")); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - //Draw background - drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); - //Draw active arrows - drawTexturedModalRect(xStart + 10, yStart + 70, 219, 11, 14, 5); - //Draw active armor symbol - switch (cont.mInvArmor.data.type) { - case 0: - drawTexturedModalRect(xStart + 73, yStart + 68, 177, 10, 10, 9); - break; - case 1: - drawTexturedModalRect(xStart + 83, yStart + 68, 187, 10, 10, 9); - break; - case 2: - drawTexturedModalRect(xStart + 93, yStart + 68, 197, 10, 10, 9); - break; - case 3: - drawTexturedModalRect(xStart + 103, yStart + 68, 207, 10, 10, 9); - break; - default: - break; - } - //Draw active tab - switch(tab){ - case 0: - break; - case 1: - drawTexturedModalRect(xStart + 7, yStart + 14, 2, 167, 104, 54); - break; - case 2: - drawTexturedModalRect(xStart + 7, yStart + 14, 107, 167, 104, 54); - break; - default: - break; - } - - if(cont.mInvArmor.data.tankCap>0){ - drawTexturedModalRect(xStart + 94, yStart + 32, 231, 69, 16, 34); - } - - int bar = (int) Math.floor(18 * (cont.mInvArmor.data.weight/(float)1000)); - drawTexturedModalRect(xStart + 15, yStart + 7, 217, 26, bar, 5); - drawTexturedModalRect(xStart + bar + 15, yStart + 7, 197+bar, 26, 18-bar, 5); - - if(tab==0){ - //processing power bar - bar = Math.min((int) Math.floor(52 * ((float)cont.mInvArmor.data.processingPowerUsed/(float)cont.mInvArmor.data.processingPower)),52); - drawTexturedModalRect(xStart + 17, yStart + 17, 177, 146, bar, 5); - drawTexturedModalRect(xStart + bar + 17, yStart + 17, 177+bar, 139, 52-bar, 5); - }else if(tab==1){ - - }else{ - //Def tab values - if(cont.mInvArmor.data.physicalDef>0)drawTexturedModalRect(xStart + 30, yStart + 20, 186, 33, 7, 7); - drawBars(31, 20, cont.mInvArmor.data.physicalDef); - if(cont.mInvArmor.data.projectileDef>0)drawTexturedModalRect(xStart + 30, yStart + 29, 186, 42, 7, 7); - drawBars(31, 29, cont.mInvArmor.data.projectileDef); - if(cont.mInvArmor.data.fireDef>0)drawTexturedModalRect(xStart + 30, yStart + 38, 186, 51, 7, 7); - drawBars(31, 38, cont.mInvArmor.data.fireDef); - if(cont.mInvArmor.data.magicDef>0)drawTexturedModalRect(xStart + 30, yStart + 47, 186, 60, 7, 7); - drawBars(31, 47, cont.mInvArmor.data.magicDef); - if(cont.mInvArmor.data.explosionDef>0)drawTexturedModalRect(xStart + 30, yStart + 56, 186, 69, 7, 7); - drawBars(31, 56, cont.mInvArmor.data.explosionDef); - if(cont.mInvArmor.data.radiationDef>0)drawTexturedModalRect(xStart + 61, yStart + 20, 186, 87, 7, 7); - drawBars(62, 20, cont.mInvArmor.data.radiationDef); - if(cont.mInvArmor.data.electricDef>0)drawTexturedModalRect(xStart + 61, yStart + 29, 186, 96, 7, 7); - drawBars(62, 29, cont.mInvArmor.data.electricDef); - if(cont.mInvArmor.data.witherDef>0)drawTexturedModalRect(xStart + 61, yStart + 38, 186, 105, 7, 7); - drawBars(62, 38, cont.mInvArmor.data.witherDef); - if(cont.mInvArmor.data.fallDef>0)drawTexturedModalRect(xStart + 61, yStart + 47, 186, 114, 7, 7); - if(cont.mInvArmor.data.thorns>0)drawTexturedModalRect(xStart + 61, yStart + 56, 186, 123, 7, 7); - if(cont.mInvArmor.data.magnet>0)drawTexturedModalRect(xStart + 70, yStart + 56, 186, 78, 7, 7); - } - - - } - - protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) { - int xStart = mouseX-((width - xSize) / 2); - int yStart = mouseY-((height - ySize) / 2); - if(yStart>68&&yStart<77){ - if(xStart>18&&xStart<26){ - tab++; - }else if(xStart>8&&xStart<17){ - tab--; - } - if(tab>2){tab=0;} - if(tab<0){tab=2;} - if(xStart>72&&xStart<112){ - if(xStart>72&&xStart<81&&cont.mInvArmor.data.helmet!=null){cont.mInvArmor.data.helmet.openGui=true;player.closeScreen();} - if(xStart>82&&xStart<91&&cont.mInvArmor.data.chestplate!=null){cont.mInvArmor.data.chestplate.openGui=true;player.closeScreen();} - if(xStart>92&&xStart<101&&cont.mInvArmor.data.leggings!=null){cont.mInvArmor.data.leggings.openGui=true;player.closeScreen();} - if(xStart>102&&xStart<112&&cont.mInvArmor.data.boots!=null){cont.mInvArmor.data.boots.openGui=true;player.closeScreen();} - } - } -// Slot slot = getSlotAtPosition(mouseX, mouseY); -// if (slot != null && slot instanceof SlotFluid && player != null) { -// ItemStack tmp = player.inventory.getItemStack(); -// if (tmp == null) { -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), 0, "null")); -// } -// if (tmp != null && tmp.getItem() instanceof IFluidContainerItem) { -// FluidStack tmp2 = ((IFluidContainerItem) tmp.getItem()).getFluid(tmp); -// if (!slot.getHasStack() && tmp2 != null) { -// slot.putStack(UT.Fluids.display(tmp2, true)); -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); -// ItemStack tmp4 = UT.Fluids.getContainerForFilledItem(tmp, true); -// tmp4.stackSize = 1; -// if (tmp.stackSize > 1) { -// player.inventory.addItemStackToInventory(tmp4); -// tmp.stackSize--; -// player.inventory.setItemStack(tmp); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } else { -// player.inventory.setItemStack(null); -// player.inventory.addItemStackToInventory(tmp4); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// } -// -// } else if (slot.getHasStack() && tmp2 != null) { -// Item fluidSlot = slot.getStack().getItem(); -// if (fluidSlot.getDamage(slot.getStack()) == tmp2.getFluidID()) { -// NBTTagCompound nbt = slot.getStack().getTagCompound(); -// if (nbt != null) { -// tmp2.amount += nbt.getLong("mFluidDisplayAmount"); -// ItemStack tmp3 = player.inventory.getItemStack(); -// if (tmp3.stackSize <= 1) { -// tmp3 = null; -// } else { -// tmp3.stackSize--; -// } -// player.inventory.setItemStack(tmp3); -// GTExtras.NET.sendToServer(new FluidSync2(player.getCommandSenderName())); -// slot.putStack(UT.Fluids.display(tmp2, true)); -// GTExtras.NET.sendToServer(new FluidSync(player.getCommandSenderName(), tmp2.amount, UT.Fluids.name(tmp2, false))); -// } -// } -// } -// } -// } - super.mouseClicked(mouseX, mouseY, mouseBtn); - } - - protected void drawTooltip(int x, int y) { - List list = new ArrayList(); - //General tooltips - if(x>=7&&y>=11&&x<=33&&y<=17){ - list.add(GT_LanguageManager.getTranslation("weight") + ": " + cont.mInvArmor.data.weight); - list.add("Total Weight: "+cont.mInvArmor.data.maxWeight); - if (cont.mInvArmor.data.weight > 1000) - list.add("Too Heavy!"); - } - if(x>=56&&y>=11&&x<=112&&y<=17){ - list.add("Stored Energy: "+seperateNumber(cont.mInvArmor.data.charge)+" EU"); - } - if(y>74&&y<83){ - if(x>8&&x<17){ - list.add("Previous Page"); - }else if(x>18&&x<27){ - list.add("Next Page"); - }else if(x>72&&x<80){ - list.add("Helmet"); - }else if(x>81&&x<90){ - list.add("Chestplate"); - }else if(x>91&&x<100){ - list.add("Leggings"); - }else if(x>101&&x<110){ - list.add("Boots"); - } - } - if(tab==0){ - if(x>=93&&y>=36&&x<=110&&y<=71){list.add("Tank Capacity: "+cont.mInvArmor.data.tankCap+"L"); - } - if(x>=7&&y>=22&&x<=70&&y<=28){list.add("Processing Power Provided: "+cont.mInvArmor.data.processingPower); - list.add("Processing Power Used: "+cont.mInvArmor.data.processingPowerUsed); - } - }else if(tab==1){ - - }else{ - if (x >= 28 && x <= 58) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("phydef") + ": " + (Math.round(cont.mInvArmor.data.physicalDef * 1000) / 10.0) + "%"); - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("prodef") + ": " + (Math.round(cont.mInvArmor.data.projectileDef * 1000) / 10.0) + "%"); - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("firedef") + ": " + (Math.round(cont.mInvArmor.data.fireDef * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - list.add(GT_LanguageManager.getTranslation("magdef") + ": " + (Math.round(cont.mInvArmor.data.magicDef * 1000) / 10.0) + "%"); - } else if (y >= 60 && y <= 68) { - list.add(GT_LanguageManager.getTranslation("expdef") + ": " + (Math.round(cont.mInvArmor.data.explosionDef * 1000) / 10.0) + "%"); - } - } else if (x >= 59 && x <= 90) { - if (y >= 25 && y <= 32) { - list.add(GT_LanguageManager.getTranslation("raddef") + ": " + (Math.round(cont.mInvArmor.data.radiationDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullRadiationDef){ - list.add("Radiation Immunity");} - } else if (y >= 33 && y <= 41) { - list.add(GT_LanguageManager.getTranslation("eledef") + ": " + (Math.round(cont.mInvArmor.data.electricDef * 1000) / 10.0) + "%"); - if(cont.mInvArmor.data.fullElectricDef){ - list.add("Electric Immunity");} - } else if (y >= 42 && y <= 50) { - list.add(GT_LanguageManager.getTranslation("whidef") + ": " + (Math.round(cont.mInvArmor.data.witherDef * 1000) / 10.0) + "%"); - } else if (y >= 51 && y <= 59) { - if(cont.mInvArmor.data.type!=3){ - list.add("Fall Damage absorbtion"); - list.add("Only for Boots"); - }else{ - list.add(GT_LanguageManager.getTranslation("abs1") + " " + (int) Math.round(cont.mInvArmor.data.fallDef) + GT_LanguageManager.getTranslation("abs2"));} - } else if (y >= 60 && y <= 68) { - if(x<69){ - list.add(GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thornsSingle) + " Dmg"); - list.add("Total "+GT_LanguageManager.getTranslation("thorns") + ": " + (int) Math.round(cont.mInvArmor.data.thorns) + " Dmg"); - }else{ - list.add(GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnetSingle + " m"); - list.add("Total "+GT_LanguageManager.getTranslation("magnet") + ": " + cont.mInvArmor.data.magnet + " m");} - } - } - } - if (!list.isEmpty()) - drawHoveringText(list, x, y, fontRendererObj); - } - - public void drawBars(int x, int y, float value) { - - int bar = (int) Math.floor(18 * value); - int xStart = (width - xSize) / 2; - int yStart = (height - ySize) / 2; - xStart += 8; - yStart += 1; - drawTexturedModalRect(xStart + x, yStart + y, 217, 26, bar, 5); - drawTexturedModalRect(xStart+ bar + x, yStart + y, 197+bar, 26, 18-bar, 5); - } - - protected Slot getSlotAtPosition(int p_146975_1_, int p_146975_2_) { - for (int k = 0; k < cont.inventorySlots.size(); ++k) { - Slot slot = (Slot) cont.inventorySlots.get(k); - if (this.isMouseOverSlot(slot, p_146975_1_, p_146975_2_)) { - return slot; - } - } - return null; - } - - private boolean isMouseOverSlot(Slot p_146981_1_, int p_146981_2_, int p_146981_3_) { - return this.func_146978_c(p_146981_1_.xDisplayPosition, p_146981_1_.yDisplayPosition, 16, 16, p_146981_2_, p_146981_3_); - } -} diff --git a/src/main/java/gregtech/common/items/armor/Vector3.java b/src/main/java/gregtech/common/items/armor/Vector3.java index 2f79ff4c69..590f544546 100644 --- a/src/main/java/gregtech/common/items/armor/Vector3.java +++ b/src/main/java/gregtech/common/items/armor/Vector3.java @@ -1,7 +1,8 @@ package gregtech.common.items.armor; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; @@ -9,10 +10,8 @@ import net.minecraft.util.Vec3; import org.lwjgl.opengl.GL11; import org.lwjgl.util.vector.Vector3f; import org.lwjgl.util.vector.Vector4f; - -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class Vector3 { public static Vector3 zero = new Vector3(); diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java index 1f63afac5e..0258a3eb3c 100644 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java @@ -4,7 +4,9 @@ import gregtech.common.items.armor.ArmorData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java index 0e17a82ee8..8f1aef56d1 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java @@ -1,5 +1,14 @@ package gregtech.common.items.armor.gui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import com.google.common.base.Charsets; +import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java index 6882e67268..75c3c6d363 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java @@ -1,5 +1,15 @@ package gregtech.common.items.armor.gui; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.WorldServer; +import net.minecraftforge.common.DimensionManager; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import com.google.common.base.Charsets; +import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java index 63e8873df9..a3d2bdaf09 100644 --- a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java +++ b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java @@ -1,9 +1,16 @@ package gregtech.common.items.armor.gui; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import scala.reflect.internal.Trees.This; +import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.FluidRegistry; public class SlotFluid extends Slot{ diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java index b26a86a943..a6cf271d30 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -1,6 +1,7 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -8,6 +9,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java index 19a4e97d4b..406a46a93b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -1,9 +1,6 @@ package gregtech.common.tileentities.machines.basic; -import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.Textures; +import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java index cfef1ba345..cf5540aed6 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java @@ -98,7 +98,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic } } if(tStringList.size()<1){tStringList.add("No Ores found.");} - FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0); + FluidStack tFluid = null;//<---GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0);//TODO FIX String[] tStringArray = new String[tStringList.size()]; { for (int i = 0; i < tStringArray.length; i++) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index cd769e31ec..8751da47f3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -237,7 +237,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace XSTR floatGen=new XSTR(); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.3D, 0.0D); //Pollution particles intensify - if(GT_Pollution.getPollutionAtCoords(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollutionAtCoords(aWorld,this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.45D, 0.0D); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.6D, 0.0D); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index d1a3adb3af..39da260e8e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -16,171 +16,197 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { -private int mHeatingCapacity = 0; - -public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { -super(aID, aName, aNameRegional); -} - -public GT_MetaTileEntity_Cleanroom(String aName) { -super(aName); -} - -public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { -return new GT_MetaTileEntity_Cleanroom(this.mName); -} - -public String[] getDescription() { -return new String[]{ - "Controller Block for the Cleanroom", - "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", - "Controller (Top center), Walls Plascrete", - "Top besides contoller and corners filter casings", - "1 Reinforced Door", - "1x Energy Hatch, 1x Maintainance Hatch", - "up to 10 Machine Hull to transfer Items&Energy inside", - ""}; -} - -public boolean checkRecipe(ItemStack aStack) { - this.mEfficiencyIncrease = 100; - this.mMaxProgresstime = 100; - this.mEUt = -4; -return true; -} - -public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int x=1; - int z=1; - int y=1; - int mDoorCount=0; - int mHullCount=0; - int mPlascreteCount=0; - boolean doorState=false; - mUpdate = 100; - for(int i = 1;i<8;i++){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); - if(tBlock != GregTech_API.sBlockCasings3 || tMeta != 11){ - if(tBlock ==GregTech_API.sBlockReinforced || tMeta == 2){ - x=i; - z=i; + private int mHeatingCapacity = 0; + + public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_Cleanroom(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Cleanroom(this.mName); + } + + @Override + public String[] getDescription() { + return new String[]{ + "Controller Block for the Cleanroom", + "Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", + "Controller (Top center), Walls Plascrete", + "Top besides contoller and corners filter casings", + "1 Reinforced Door", + "1x Energy Hatch, 1x Maintainance Hatch", + "up to 10 Machine Hull to transfer Items&Energy inside", + ""}; + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + this.mEfficiencyIncrease = 100; + this.mMaxProgresstime = 100; + this.mEUt = -4; + return true; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + int x = 1; + int z = 1; + int y = 1; + int mDoorCount = 0; + int mHullCount = 0; + int mPlascreteCount = 0; + boolean doorState = false; + mUpdate = 100; + for (int i = 1; i < 8; i++) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0); + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) { + x = i; + z = i; + break; + } else { + return false; + } + } + } + for (int i = -1; i > -16; i--) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + y = i + 1; break; - }else{return false;} + } } - } - for(int i = -1; i>-16;i--){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z); - if(tBlock != GregTech_API.sBlockReinforced || tMeta != 2){ - y = i+1; - break; + if (y > -2) { + return false; } - } - if(y>-2){return false;} - for(int dX=-x;dX<=x;dX++){ - for(int dZ=-z;dZ<=z;dZ++){ - for(int dY=0;dY>=y;dY--){ - if(dX==-x||dX==x||dY==-y||dY==y||dZ==-z||dZ==z){ - Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); - int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); - if(y==0){ - if(dX==-x||dX==x||dZ==-z||dZ==z){ - if(tBlock!=GregTech_API.sBlockReinforced||tMeta!=2){return false;} - }else if(dX==0&&dZ==0){ - }else { - if(tBlock!=GregTech_API.sBlockCasings3||tMeta!=11){return false;} - } - }else if(tBlock==GregTech_API.sBlockReinforced&&tMeta==2){ - mPlascreteCount++; - }else{ - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))){ - if(tBlock instanceof ic2.core.block.BlockIC2Door){ - if((tMeta&8)==0){ - doorState=(Math.abs(dX)>Math.abs(dZ)==((tMeta&1)!=0))!=((tMeta&4)!=0); + for (int dX = -x; dX <= x; dX++) { + for (int dZ = -z; dZ <= z; dZ++) { + for (int dY = 0; dY >= y; dY--) { + if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) { + Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ); + if (y == 0) { + if (dX == -x || dX == x || dZ == -z || dZ == z) { + if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) { + return false; + } + } else if (dX == 0 && dZ == 0) { + } else { + if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) { + return false; + } + } + } else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) { + mPlascreteCount++; + } else { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) { + if (tBlock instanceof ic2.core.block.BlockIC2Door) { + if ((tMeta & 8) == 0) { + doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0); + } + mDoorCount++; + } else { + if (tTileEntity == null) { + { + return false; + } + } + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) { + mHullCount++; + } else { + return false; + } + } } - mDoorCount++; - }else{ - if (tTileEntity == null) { - {return false;} - } - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) {return false;} - if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull){mHullCount++; - }else {return false;} } + } else { + } } - }else{ - - } } } - } - if(mMaintenanceHatches.size()!=1||mEnergyHatches.size()!=1||mDoorCount!=2||mHullCount>10){return false;} - for(int dX=-x+1;dX<=x-1;dX++){ - for(int dZ=-z+1;dZ<=z-1;dZ++){ - for(int dY=-1;dY>=y+1;dY--){ - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); - if(tTileEntity!=null){ - IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); - if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe){ - ((GT_MetaTileEntity_BasicMachine_GT_Recipe)aMetaTileEntity).mCleanroom = this; + if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) { + return false; + } + for (int dX = -x + 1; dX <= x - 1; dX++) { + for (int dZ = -z + 1; dZ <= z - 1; dZ++) { + for (int dY = -1; dY >= y + 1; dY--) { + IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ); + if (tTileEntity != null) { + IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) { + ((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this; + } } } } } - } - - if(doorState){ - mEfficiency=Math.max(0,mEfficiency-200); - } -return true; -} + if (doorState) { + mEfficiency = Math.max(0, mEfficiency - 200); + } -public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { -if (aSide == 0 || aSide == 1) { - return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; + return true; + } -} -return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; -} + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == 0 || aSide == 1) { + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)}; -public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { -return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); -} + } + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)}; + } -public GT_Recipe.GT_Recipe_Map getRecipeMap() { -return null; -} + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png"); + } -public boolean isCorrectMachinePart(ItemStack aStack) { -return true; -} + @Override + public GT_Recipe.GT_Recipe_Map getRecipeMap() { + return null; + } -public boolean isFacingValid(byte aFacing) { -return aFacing > 1; -} + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } -public int getMaxEfficiency(ItemStack aStack) { -return 10000; -} + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } -public int getPollutionPerTick(ItemStack aStack) { -return 0; -} + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } -public int getDamageToComponent(ItemStack aStack) { -return 0; -} + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } -public int getAmountOfOutputs() { -return 0; -} + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } -public boolean explodesOnComponentBreak(ItemStack aStack) { -return false; -} + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } } \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 9cb614478d..26885c89a2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -24,6 +24,7 @@ import java.util.ArrayList; public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {//TODO REWORK private boolean completedCycle = false; + private int extractionSpeed=0; public GT_MetaTileEntity_OilDrill(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -78,7 +79,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } } //Output fluid - FluidStack tFluid = GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0); + FluidStack tFluid = null;//GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0);//TODO FIX if (tFluid == null){ extractionSpeed=0; stopMachine(); @@ -100,7 +101,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase if(tFluid.amount>minExtraction) tFluid.amount= Math.max(minExtraction,Math.min(tFluid.amount/50000,500)); extractionSpeed=tFluid.amount; - GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed); + //GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed);//TODO FIX } this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java index 68ee13322c..b18b28dc73 100644 --- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java +++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java @@ -41,7 +41,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.Terbium.mHasParentMod = false; Materials.Thulium.mHasParentMod = false; Materials.Ytterbium.mHasParentMod = false; - Materials.Endium.mHasParentMod = false; + Materials.HeeEndium.mHasParentMod = false; Materials.DarkIron.mHasParentMod = false; Materials.ElectrumFlux.mHasParentMod = false; Materials.Force.mHasParentMod = false; @@ -78,7 +78,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.ShadowIron.mHasParentMod = false; Materials.ShadowSteel.mHasParentMod = false; Materials.AstralSilver.mHasParentMod = false; - Materials.Midasium.mHasParentMod = false; + Materials.Trinium.mHasParentMod = false; } if (!aEnableThaumcraftMats) { Materials.Amber.mHasParentMod = false; @@ -101,7 +101,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa Materials.Gabbro.mHasParentMod = false; Materials.Gneiss.mHasParentMod = false; Materials.Greenschist.mHasParentMod = false; - Materials.Greywacke.mHasParentMod = false; + //Materials.Greywacke.mHasParentMod = false; Materials.Komatiite.mHasParentMod = false; Materials.Rhyolite.mHasParentMod = false; } diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index 9143e5fd95..cf92dbcb46 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -47,41 +47,42 @@ public class GT_Achievements { public int adjY = 9; public GT_Achievements() { - this.achievementList = new ConcurrentHashMap(); - this.issuedAchievements = new ConcurrentHashMap(); + this.achievementList = new ConcurrentHashMap<>(); + this.issuedAchievements = new ConcurrentHashMap<>(); int oreList_sS=oreList.size(); for (int i = 0; i < oreList_sS; i++) { if (oreList.get(i) != null) { if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) { GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore"); - StringBuilder dimensions = new StringBuilder(); - boolean isFirst = true; - if(oreStats.get(i)[3] == 1) { - dimensions.append("Overworld"); - isFirst = false; - } - if(oreStats.get(i)[4] == 1) { - if(!isFirst) dimensions.append("/"); - dimensions.append("Nether"); - isFirst = false; - } - if(oreStats.get(i)[5] == 1) { - if(!isFirst) dimensions.append("/"); - dimensions.append("End"); - isFirst = false; + StringBuilder dimensions = new StringBuilder(); + boolean isFirst = true; + if (oreStats.get(i)[3] == 1) { + dimensions.append("Overworld"); + isFirst = false; + } + if (oreStats.get(i)[4] == 1) { + if (!isFirst) dimensions.append("/"); + dimensions.append("Nether"); + isFirst = false; + } + if (oreStats.get(i)[5] == 1) { + if (!isFirst) dimensions.append("/"); + dimensions.append("End"); + isFirst = false; + } + GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString()); } - GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString()); - } - //if(oreList.get(i)==null) - // GT_Log.out.println("GT Achievement - Ore with NULL pointer material tries to register achievement."); - //if(oreList.get(i).name()==null) - // GT_Log.out.println("GT Achievement - Ore with NULL named material tries to register achievement."); - //else + //if(oreList.get(i)==null) + // GT_Log.out.println("GT Achievement - Ore with NULL pointer material tries to register achievement."); + //if(oreList.get(i).name()==null) + // GT_Log.out.println("GT Achievement - Ore with NULL named material tries to register achievement."); + //else registerOreAchievement(oreList.get(i)); + } } - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList) + for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) registerAssAchievement(recipe); registerAchievement("flintpick", 0, 0, GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(2, 1, Materials.Flint, Materials.Wood, null), "", false); @@ -621,7 +622,7 @@ public class GT_Achievements { (stack.getItem() == Ic2Items.quantumHelmet.getItem()) || (stack.getItem() == Ic2Items.quantumLeggings.getItem())) { issueAchievement(player, "buildQArmor"); } - for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes.mRecipeList){ + for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList){ if(recipe.getOutput(0).getUnlocalizedName().equals(stack.getUnlocalizedName())) { issueAchievement(player, recipe.getOutput(0).getUnlocalizedName()); recipe.mHidden=false; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index d3f6f5a99d..330a4f62b5 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,5 +1,6 @@ package gregtech.loaders.postload; +import com.dreammaster.gthandler.CustomItemList; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index ae5e54ffa2..ce8603dd1c 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -23,9 +23,7 @@ import gregtech.common.tileentities.machines.GT_MetaTileEntity_BasicHull_SteelBr import gregtech.common.tileentities.machines.basic.*; import gregtech.common.tileentities.machines.multi.*; import gregtech.common.tileentities.machines.steam.*; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_Locker; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumChest; -import gregtech.common.tileentities.storage.GT_MetaTileEntity_QuantumTank; +import gregtech.common.tileentities.storage.*; import ic2.core.Ic2Items; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -299,7 +297,7 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_EV.get(1L, new Object[0]), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_EV, 'G', ItemList.Field_Generator_EV, 'D', OrePrefixes.circuit.get(Materials.Master), 'P', OrePrefixes.plate.get(Materials.Europium)}); //GT_ModHandler.addCraftingRecipe(ItemList.Quantum_Chest_IV.get(1L, new Object[0]), bitsd, new Object[]{"DPD", aTextPlateMotor, "DGD", 'M', ItemList.Hull_IV, 'G', ItemList.Field_Generator_IV, 'D', OrePrefixes.circuit.get(Materials.Ultimate), 'P', OrePrefixes.plate.get(Materials.Americium)}); - ItemList.Super_Tank_LV.set(new GT_MetaTileEntity_SuperTank(130, "super.tank.tier.01", "Super Tank I", 1).getStackForm(1L)); + ItemList.Super_Tank_LV.set(new GT_MetaTileEntity_SuperTank(130, "super.tank.tier.01", "Super Tank I", 1).getStackForm(1L)); ItemList.Super_Tank_MV.set(new GT_MetaTileEntity_SuperTank(131, "super.tank.tier.02", "Super Tank II", 2).getStackForm(1L)); ItemList.Super_Tank_HV.set(new GT_MetaTileEntity_SuperTank(132, "super.tank.tier.03", "Super Tank III", 3).getStackForm(1L)); ItemList.Super_Tank_EV.set(new GT_MetaTileEntity_SuperTank(133, "super.tank.tier.04", "Super Tank IV", 4).getStackForm(1L)); @@ -1104,10 +1102,10 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Generator_Naquadah_Mark_III.set(new GT_MetaTileEntity_FluidNaquadahReactor(1192, "basicgenerator.naquadah.tier.06", "Naquadah Reactor Mark III", 6).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_IV.set(new GT_MetaTileEntity_SolidNaquadahReactor3(1180, "basicgenerator.naquadah.tier.07", "Naquadah Reactor Mark IV", 7).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_V.set(new GT_MetaTileEntity_SolidNaquadahReactor4(1181, "basicgenerator.naquadah.tier.08", "Naquadah Reactor Mark V", 8).getStackForm(1L)); - + //TODO CHECH RECIPES GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_I.get(1L, new Object[0]), bitsd, new Object[]{"UCU", "FMF", aTextWireCoil, 'M', ItemList.Hull_EV, 'F', ItemList.Field_Generator_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt04.get(Materials.Aluminium), 'U', OrePrefixes.stick.get(Materials.Uranium235)}); GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_II.get(1L, new Object[0]), bitsd, new Object[]{"PCP", "FMF", aTextWireCoil, 'M', ItemList.Hull_IV, 'F', ItemList.Field_Generator_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten), 'P', OrePrefixes.stick.get(Materials.Plutonium241)}); - GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Fluid.get(1L, new Object[0]), bitsd, new Object[]{"NCN", "FMF", aTextWireCoil, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), 'N', OrePrefixes.stick.get(Materials.NaquadahEnriched)}); + GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_III.get(1L, new Object[0]), bitsd, new Object[]{"NCN", "FMF", aTextWireCoil, 'M', ItemList.Hull_LuV, 'F', ItemList.Field_Generator_LuV, 'C', OrePrefixes.circuit.get(Materials.Ultimate), 'W', OrePrefixes.cableGt04.get(Materials.NiobiumTitanium), 'N', OrePrefixes.stick.get(Materials.NaquadahEnriched)}); ItemList.MagicEnergyConverter_LV.set(new GT_MetaTileEntity_MagicEnergyConverter(1123, "basicgenerator.magicenergyconverter.tier.01", "Novice Magic Energy Converter", 1).getStackForm(1L)); ItemList.MagicEnergyConverter_MV.set(new GT_MetaTileEntity_MagicEnergyConverter(1124, "basicgenerator.magicenergyconverter.tier.02", "Adept Magic Energy Converter", 2).getStackForm(1L)); @@ -1525,19 +1523,19 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI } private static void makeWires(Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated) { - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, aTextWire1 + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextWire2, 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, aTextWire1 + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextWire2, 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, aTextWire1 + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextWire2, 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, aTextWire1 + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextWire2, 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, aTextWire1 + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextWire2, 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, aTextWire1 + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextWire2, 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, aTextWire1 + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextWire2, 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, aTextWire1 + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextWire2, 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, aTextWire1 + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextWire2, 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, aTextWire1 + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextWire2, 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, aTextWire1 + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextWire2, 0.625F, aMaterial, aLoss, 12L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, aTextWire1 + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextWire2, 0.75F, aMaterial, aLoss, 16L * aAmperage, aVoltage, aBoolConst_0, !aAutoInsulated).getStackForm(1L)); if (aInsulatable) { - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, aTextCable1 + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextCable2, 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, aTextCable1 + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextCable2, 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, aTextCable1 + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextCable2, 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, aTextCable1 + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextCable2, 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, aTextCable1 + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextCable2, 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, aTextCable1 + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextCable2, 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, aTextCable1 + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + aTextCable2, 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, aTextCable1 + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + aTextCable2, 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, aTextCable1 + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + aTextCable2, 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, aTextCable1 + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + aTextCable2, 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, aTextCable1 + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + aTextCable2, 0.75F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 11, aTextCable1 + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + aTextCable2, 0.875F, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, aBoolConst_0).getStackForm(1L)); } } diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index c33d5f4e22..36db6879db 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -17,7 +17,7 @@ public class NEI_GT_Config } } if(FMLCommonHandler.instance().getEffectiveSide().isClient()) - ALH=new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes); + ALH=new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes); sIsAdded = true; } -- cgit From 8ac41d3c3c42e1437fc2af1c6ec3c21c897d1674 Mon Sep 17 00:00:00 2001 From: Johannes Gäßler Date: Sun, 30 Apr 2017 01:36:10 +0200 Subject: Chem reactors can now output 2 items, implemented recipes for Nitric Acid,added utility methods to get Material cells or integrated circuits, it's now possible to declare a temperature for automatically created fluids / gases --- .../java/gregtech/api/enums/MaterialBuilder.java | 20 ++++++++++++ src/main/java/gregtech/api/enums/Materials.java | 35 +++++++++++++++++---- .../api/interfaces/internal/IGT_RecipeAdder.java | 22 +++++++++++++ src/main/java/gregtech/api/util/GT_Recipe.java | 2 +- src/main/java/gregtech/api/util/GT_Utility.java | 4 +++ src/main/java/gregtech/common/GT_RecipeAdder.java | 16 +++++++--- .../java/gregtech/loaders/load/GT_FuelLoader.java | 2 +- .../loaders/postload/GT_MachineRecipeLoader.java | 11 +++++-- .../preload/GT_Loader_MetaTileEntities.java | 16 +++++----- .../textures/gui/basicmachines/ChemicalReactor.png | Bin 3628 -> 3687 bytes 10 files changed, 106 insertions(+), 22 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/enums/MaterialBuilder.java b/src/main/java/gregtech/api/enums/MaterialBuilder.java index cecbe8a7d0..447e67e442 100644 --- a/src/main/java/gregtech/api/enums/MaterialBuilder.java +++ b/src/main/java/gregtech/api/enums/MaterialBuilder.java @@ -33,6 +33,8 @@ public class MaterialBuilder { private List aspects = new ArrayList(); private boolean hasCorrespondingFluid = false; private boolean hasCorrespondingGas = false; + private int liquidTemperature = 300; + private int gasTemperature = 300; public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String defaultLocalName) { this.metaItemSubID = metaItemSubID; @@ -220,4 +222,22 @@ public class MaterialBuilder { this.aspects = aspects; return this; } + + public int getLiquidTemperature() { + return liquidTemperature; + } + + public MaterialBuilder setLiquidTemperature(int liquidTemperature) { + this.liquidTemperature = liquidTemperature; + return this; + } + + public int getGasTemperature() { + return gasTemperature; + } + + public MaterialBuilder setGasTemperature(int gasTemperature) { + this.gasTemperature = gasTemperature; + return this; + } } diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index eb75390757..ffb2812f8b 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -10,6 +10,7 @@ import gregtech.api.interfaces.ISubTagContainer; import gregtech.api.objects.GT_FluidStack; import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Proxy; import gregtech.loaders.materialprocessing.ProcessingConfig; @@ -149,7 +150,6 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Flux = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 1, 255, 255, 255, 0, "Flux", "Flux", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); public static Materials RedstoneAlloy = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 1, 255, 255, 255, 0, "RedstoneAlloy", "Redstone Alloy", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); public static Materials OsmiumTetroxide = new Materials(-1, TextureSet.SET_NONE,1.0F, 0, 2, 1, 255, 255, 255, 0, "OsmiumTetroxide", "Osmium Tetroxide", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); - public static Materials NitricAcid = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 0, 255, 255, 255, 0, "NitricAcid", "Nitric Acid", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); public static Materials RubberTreeSap = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 0, 255, 255, 255, 0, "RubberTreeSap", "Rubber Tree Sap", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); public static Materials AquaRegia = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 0, 255, 255, 255, 0, "AquaRegia", "Aqua Regia", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); public static Materials SolutionBlueVitriol = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 0, 255, 255, 255, 0, "SolutionBlueVitriol", "Blue Vitriol Solution", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL); @@ -427,10 +427,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { * First Degree Compounds */ public static Materials Methane = new Materials(715, TextureSet.SET_FLUID, 1.0F, 0, 1, 16, 255, 255, 255, 0, "Methane", "Methane", 1, 45, -1, 0, false, false, 3, 1, 1, Dyes.dyeMagenta, 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4))); - public static Materials CarbonDioxide = new Materials(497, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32|512, 169, 208, 245, 240, "CarbonDioxide", "Carbon Dioxide", 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue, 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))); - public static Materials NobleGases = new Materials(496, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "NobleGases", "Noble Gases", 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(CarbonDioxide, 21), new MaterialStack(Helium, 9), new MaterialStack(Methane, 3), new MaterialStack(Deuterium, 1))); + public static Materials CarbonDioxide = new Materials(497, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "CarbonDioxide", "Carbon Dioxide", 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue, 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))).setHasCorrespondingGas(true); + public static Materials NobleGases = new Materials(496, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "NobleGases", "Noble Gases", 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(CarbonDioxide, 21), new MaterialStack(Helium, 9), new MaterialStack(Methane, 3), new MaterialStack(Deuterium, 1))).setHasCorrespondingFluid(true).setLiquidTemperature(79); public static Materials Air = new Materials(-1, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "Air", "Air", 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 0, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1), new MaterialStack(NobleGases, 1))); - public static Materials LiquidAir = new Materials(495, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "LiquidAir", "Liquid Air", 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1), new MaterialStack(NobleGases, 1))); + public static Materials LiquidAir = new Materials(495, TextureSet.SET_FLUID, 1.0F, 0, 2, 16|32, 169, 208, 245, 240, "LiquidAir", "Liquid Air", 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue, 2, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1), new MaterialStack(NobleGases, 1))).setHasCorrespondingFluid(true).setLiquidTemperature(79); public static Materials Almandine = new Materials(820, TextureSet.SET_ROUGH, 1.0F, 0, 1, 1 |8 , 255, 0, 0, 0, "Almandine", "Almandine", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeRed, 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(Iron, 3), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials Andradite = new Materials(821, TextureSet.SET_ROUGH, 1.0F, 0, 1, 1, 150, 120, 0, 0, "Andradite", "Andradite", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeYellow, 1, Arrays.asList(new MaterialStack(Calcium, 3), new MaterialStack(Iron, 2), new MaterialStack(Silicon, 3), new MaterialStack(Oxygen, 12))); public static Materials AnnealedCopper = new Materials(345, TextureSet.SET_SHINY, 1.0F, 0, 2, 1|2|128, 255, 120, 20, 0, "AnnealedCopper", "Annealed Copper", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeOrange, 2, Arrays.asList(new MaterialStack(Copper, 1))); @@ -536,12 +536,12 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials CrackedHeavyFuel = new Materials(744, TextureSet.SET_FLUID, 1.0F, 0, 0, 16, 255, 255, 0, 0, "CrackedHeavyFuel", "Cracked Heavy Fuel", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeBlack); - public static Materials NitricOxide = new MaterialBuilder(653, TextureSet.SET_FLUID, "Nitric Oxide").addCell().addGas().setRGB(125, 200, 240).setColor(Dyes.dyeCyan).constructMaterial(); + public static Materials NitricAcid = new MaterialBuilder(653, TextureSet.SET_FLUID, "Nitric Acid").addCell().setRGB(230, 226, 171).constructMaterial(); public static Materials Dimethylhydrazine = new MaterialBuilder(654, TextureSet.SET_FLUID, "1,1-Dimethylhydrazine").addCell().addFluid().setRGB(0, 0, 85).setColor(Dyes.dyeBlue).constructMaterial(); public static Materials Chloramine = new MaterialBuilder(655, TextureSet.SET_FLUID, "Chloramine").addCell().addFluid().setRGB(63, 159, 128).setColor(Dyes.dyeCyan).constructMaterial(); public static Materials Dimethylamine = new MaterialBuilder(656, TextureSet.SET_FLUID, "Dimethylamine").addCell().addGas().setRGB(85, 68, 105).setColor(Dyes.dyeGray).constructMaterial(); public static Materials DinitrogenTetroxide = new MaterialBuilder(657, TextureSet.SET_FLUID, "Dinitrogen Tetroxide").addCell().addGas().setRGB(0, 65, 132).setColor(Dyes.dyeBlue).constructMaterial(); - public static Materials NitrogenOxide = new MaterialBuilder(658, TextureSet.SET_FLUID, "Nitrogen Oxide").addCell().addGas().setRGB(0, 103, 209).setColor(Dyes.dyeCyan).constructMaterial(); + public static Materials NitricOxide = new MaterialBuilder(658, TextureSet.SET_FLUID, "Nitric Oxide").addCell().addGas().setRGB(125, 200, 240).setColor(Dyes.dyeCyan).constructMaterial(); public static Materials Ammonia = new MaterialBuilder(659, TextureSet.SET_FLUID, "Ammonia").addCell().addGas().setRGB(63, 52, 128).setColor(Dyes.dyeBlue).constructMaterial(); public static Materials WoodGas = new MaterialBuilder(660, TextureSet.SET_FLUID, "Wood Gas").addCell().addGas().setRGB(222, 205, 135).setColor(Dyes.dyeBrown).setFuelType(MaterialBuilder.GAS).setFuelPower(24).constructMaterial(); public static Materials WoodVinegar = new MaterialBuilder(661, TextureSet.SET_FLUID, "Wood Vinegar").addCell().addFluid().setRGB(212, 85, 0).setColor(Dyes.dyeBrown).constructMaterial(); @@ -787,6 +787,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public Fluid mSolid = null, mFluid = null, mGas = null, mPlasma = null; private boolean hasCorrespondingFluid = false, hasCorrespondingGas = false; + private int liquidTemperature = 295, gasTemperature = 295; /** * This Fluid is used as standard Unit for Molten Materials. 1296 is a Molten Block, that means 144 is one Material Unit worth of fluid. @@ -1957,4 +1958,26 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { this.hasCorrespondingGas = hasCorrespondingGas; return this; } + + public int getLiquidTemperature() { + return liquidTemperature; + } + + public Materials setLiquidTemperature(int liquidTemperature) { + this.liquidTemperature = liquidTemperature; + return this; + } + + public int getGasTemperature() { + return gasTemperature; + } + + public Materials setGasTemperature(int gasTemperature) { + this.gasTemperature = gasTemperature; + return this; + } + + public ItemStack getCells(int amount){ + return GT_OreDictUnificator.get(OrePrefixes.cell, this, amount); + } } \ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 38c268b183..dc7c0ce2f6 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -107,6 +107,16 @@ public interface IGT_RecipeAdder { */ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration); + /** + * Adds a Chemical Recipe + * + * @param aInput1 must be != null + * @param aInput2 must be != null + * @param aOutput1 must be != null + * @param aOutput2 must be != null + * @param aDuration must be > 0 + */ + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration); /** * Adds Recipes for creating a radically polymerized polymer from a base Material (for example Ethylene -> Polyethylene) @@ -126,6 +136,18 @@ public interface IGT_RecipeAdder { */ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUtick); + /** + * Adds a Chemical Recipe + * + * @param aInput1 must be != null + * @param aInput2 must be != null + * @param aOutput1 must be != null + * @param aOutput2 must be != null + * @param aDuration must be > 0 + * @param aEUtick must be > 0 + */ + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick); + /** * Adds a Blast Furnace Recipe diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 0a73044fbd..0993a18383 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -517,7 +517,7 @@ public class GT_Recipe implements Comparable { public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map(new HashSet(500), "gt.recipe.blastfurnace", "Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 2, 2, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true); public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map(new HashSet(50), "gt.recipe.implosioncompressor", "Implosion Compressor", null, RES_PATH_GUI + "basicmachines/Default", 2, 2, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.vacuumfreezer", "Vacuum Freezer", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.chemicalreactor", "Chemical Reactor", null, RES_PATH_GUI + "basicmachines/ChemicalReactor", 2, 1, 1, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map(new HashSet(100), "gt.recipe.chemicalreactor", "Chemical Reactor", null, RES_PATH_GUI + "basicmachines/ChemicalReactor", 2, 2, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sDistillationRecipes = new GT_Recipe_Map(new HashSet(50), "gt.recipe.distillationtower", "Distillation Tower", null, RES_PATH_GUI + "basicmachines/Default", 2, 4, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sCrakingRecipes = new GT_Recipe_Map(new HashSet(50), "gt.recipe.craker", "Oil Cracker", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sPyrolyseRecipes = new GT_Recipe_Map(new HashSet(50), "gt.recipe.pyro", "Pyrolyse Oven", null, RES_PATH_GUI + "basicmachines/Default", 2, 1, 1, 0, 1, E, 1, E, true, true); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 6c3289af30..2987448244 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1950,6 +1950,10 @@ public class GT_Utility { return result; } + public static ItemStack getIntegratedCircuit(int config){ + return ItemList.Circuit_Integrated.getWithDamage(0, config, new Object[0]); + } + public static class ItemNBT { public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) { if (aNBT == null) { diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 36eb4d6be8..160aa85f54 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -92,11 +92,19 @@ public class GT_RecipeAdder return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30); } - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUtick) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) { + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration) { + return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, 30); + } + + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) { + return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, GT_Values.NI, aDuration, aEUTick); + } + + public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { + if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } - if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + if ((aOutput != null || aOutput2 != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { return false; } if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { @@ -105,7 +113,7 @@ public class GT_RecipeAdder if (aEUtick <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0); + GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0); return true; } diff --git a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java index 4268252e8f..ae7a3ad88c 100644 --- a/src/main/java/gregtech/loaders/load/GT_FuelLoader.java +++ b/src/main/java/gregtech/loaders/load/GT_FuelLoader.java @@ -19,7 +19,7 @@ public class GT_FuelLoader implements Runnable { public void run() { GT_Log.out.println("GT_Mod: Initializing various Fuels."); - ItemList.sNitricAcid = GT_Mod.gregtechproxy.addFluid("nitricacid", "Nitric acid ", null, 1, 295); + ItemList.sNitricAcid = GT_Mod.gregtechproxy.addFluid("nitricacid", "Nitric acid ", Materials.NitricAcid, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitricAcid, 1), ItemList.Cell_Empty.get(1, new Object[0]), 1000); ItemList.sBlueVitriol = GT_Mod.gregtechproxy.addFluid("solution.bluevitriol", "Blue Vitriol water solution", null, 1, 295); ItemList.sNickelSulfate = GT_Mod.gregtechproxy.addFluid("solution.nickelsulfate", "Nickel sulfate water solution", null, 1, 295); ItemList.sIndiumConcentrate = GT_Mod.gregtechproxy.addFluid("indiumconcentrate", "Indium Concentrate", null, 1, 295); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 243299a154..addc0874e6 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -413,7 +413,6 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addAssemblerRecipe(ItemList.Cover_Shutter.get(1L, new Object[0]), OrePrefixes.circuit.get(Materials.Advanced), 2,GT_Values.NF, ItemList.FluidFilter.get(1L, new Object[0]), 800, 4); GT_Values.RA.addCentrifugeRecipe(ItemList.Cell_Empty.get(1, new Object[0]), null, Materials.Air.getGas(10000), Materials.Nitrogen.getGas(3900), GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Oxygen,1), null, null, null, null, null, null, 1600, 8); - GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell,Materials.NitrogenDioxide,4), GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Oxygen,1), Materials.Water.getFluid(2000), new FluidStack(ItemList.sNitricAcid,4000), ItemList.Cell_Empty.get(5, new Object[0]), 950, 30); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 3), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 1), Materials.SulfuricAcid.getFluid(4000), new FluidStack(ItemList.sIndiumConcentrate, 8000), null, 60, 150); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), null, new FluidStack(ItemList.sIndiumConcentrate, 8000), new FluidStack(ItemList.sLeadZincSolution, 8000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Indium, 1), 50, 600); GT_Values.RA.addElectrolyzerRecipe(null, null, new FluidStack(ItemList.sLeadZincSolution, 8000), Materials.Water.getFluid(2000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 3), null, null, null, 300, 192); @@ -2669,7 +2668,7 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Chloramine, 1), GT_Values.NI, Materials.Dimethylamine.getGas(1000), Materials.Dimethylhydrazine.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydrochloricAcid, 1), 200); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Dimethylamine, 1), GT_Values.NI, Materials.Chloramine.getFluid(1000), Materials.HydrochloricAcid.getFluid(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Dimethylhydrazine, 1), 200); - GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Integrated.getWithDamage(0, 2, new Object[0]), GT_Values.NI, Materials.NitrogenDioxide.getGas(2000), Materials.DinitrogenTetroxide.getGas(2000), GT_Values.NI, 640); + GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Integrated.getWithDamage(0, 2, new Object[0]), GT_Values.NI, Materials.NitrogenDioxide.getGas(2000), Materials.DinitrogenTetroxide.getGas(1000), GT_Values.NI, 640); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Dimethylhydrazine, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.DinitrogenTetroxide.getGas(1000), new FluidStack(ItemList.sRocketFuel, 8000), ItemList.Cell_Empty.get(1, new Object[0]), 60, 16); GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.DinitrogenTetroxide, 1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Dimethylhydrazine.getFluid(1000), new FluidStack(ItemList.sRocketFuel, 8000), ItemList.Cell_Empty.get(1, new Object[0]), 60, 16); @@ -2680,6 +2679,14 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NitricOxide, 1), GT_Values.NI, Materials.Oxygen.getGas(1000), Materials.NitrogenDioxide.getGas(1000), ItemList.Cell_Empty.get(1, new Object[0]), 160); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1), GT_Values.NI, Materials.NitricOxide.getGas(1000), Materials.NitrogenDioxide.getGas(1000), ItemList.Cell_Empty.get(1, new Object[0]), 160); + + GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(1), GT_Utility.getIntegratedCircuit(1), Materials.NitrogenDioxide.getGas(3000), Materials.NitricAcid.getFluid(2000), Materials.NitricOxide.getCells(1), 240); + GT_Values.RA.addChemicalRecipe(Materials.NitrogenDioxide.getCells(3), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(1000), Materials.NitricOxide.getGas(1000), Materials.NitricAcid.getCells(2), Materials.Empty.getCells(1), 240); + + GT_Values.RA.addChemicalRecipe(Materials.NitrogenDioxide.getCells(4), Materials.Oxygen.getCells(2), Materials.Water.getFluid(2000), Materials.NitricAcid.getFluid(4000), Materials.Empty.getCells(6), 480); + GT_Values.RA.addChemicalRecipe(Materials.Oxygen.getCells(2), Materials.Water.getCells(2), Materials.NitrogenDioxide.getGas(4000), Materials.NitricAcid.getFluid(4000), Materials.Empty.getCells(4), 480); + GT_Values.RA.addChemicalRecipe(Materials.Water.getCells(2), Materials.NitrogenDioxide.getCells(4), Materials.Oxygen.getGas(2000), Materials.NitricAcid.getFluid(4000), Materials.Empty.getCells(6), 480); + } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 2c51618ad0..2c21eac798 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -764,14 +764,14 @@ public class GT_Loader_MetaTileEntities implements Runnable { ItemList.Machine_ZPM_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(417, "basicmachine.unboxinator.tier.07", "Unboxinator", 7, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", "", aBoolConst_0, aBoolConst_0, 0, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); ItemList.Machine_UV_Unboxinator.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(418, "basicmachine.unboxinator.tier.08", "Unboxinator", 8, "Grabs things out of Boxes", GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes, 1, 2, 0, 0, 1, "Unpackager.png", "", aBoolConst_0, aBoolConst_0, 0, "UNBOXINATOR", new Object[]{"BCB", "VMR", aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROBOT_ARM, 'V', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CONVEYOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'B', OreDictNames.craftingChest}).getStackForm(1L)); - ItemList.Machine_LV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(421, "basicmachine.chemicalreactor.tier.01", "Basic Chemical Reactor", 1, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); - ItemList.Machine_MV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(422, "basicmachine.chemicalreactor.tier.02", "Advanced Chemical Reactor", 2, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeMedium.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_HV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(423, "basicmachine.chemicalreactor.tier.03", "Advanced Chemical Reactor II", 3, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeMedium.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_EV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(424, "basicmachine.chemicalreactor.tier.04", "Advanced Chemical Reactor III", 4, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeLarge.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_IV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(425, "basicmachine.chemicalreactor.tier.05", "Advanced Chemical Reactor IV", 5, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_LuV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(426, "basicmachine.chemicalreactor.tier.06", "Advanced Chemical Reactor V", 6, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_ZPM_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(427, "basicmachine.chemicalreactor.tier.07", "Advanced Chemical Reactor VI", 7, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); - ItemList.Machine_UV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(428, "basicmachine.chemicalreactor.tier.08", "Advanced Chemical Reactor VII", 8, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 1, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_LV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(421, "basicmachine.chemicalreactor.tier.01", "Basic Chemical Reactor", 1, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); + ItemList.Machine_MV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(422, "basicmachine.chemicalreactor.tier.02", "Advanced Chemical Reactor", 2, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeMedium.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_HV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(423, "basicmachine.chemicalreactor.tier.03", "Advanced Chemical Reactor II", 3, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeMedium.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_EV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(424, "basicmachine.chemicalreactor.tier.04", "Advanced Chemical Reactor III", 4, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeLarge.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_IV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(425, "basicmachine.chemicalreactor.tier.05", "Advanced Chemical Reactor IV", 5, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_LuV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(426, "basicmachine.chemicalreactor.tier.06", "Advanced Chemical Reactor V", 6, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_ZPM_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(427, "basicmachine.chemicalreactor.tier.07", "Advanced Chemical Reactor VI", 7, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); + ItemList.Machine_UV_ChemicalReactor.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(428, "basicmachine.chemicalreactor.tier.08", "Advanced Chemical Reactor VII", 8, "Letting Chemicals react with each other", GT_Recipe.GT_Recipe_Map.sChemicalRecipes, 2, 2, 16000, 0, 1, "ChemicalReactor.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(200)), aBoolConst_0, aBoolConst_0, 0, "CHEMICAL_REACTOR", new Object[]{"GRG", "WEW", aTextCableHull, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'R', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.ROTOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.MOTOR, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', OrePrefixes.pipeHuge.get(Materials.Plastic)}).getStackForm(1L)); ItemList.Machine_LV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(431, "basicmachine.fluidcanner.tier.01", "Basic Fluid Canner", 1, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 16000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); ItemList.Machine_MV_FluidCanner.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(432, "basicmachine.fluidcanner.tier.02", "Advanced Fluid Canner", 2, "Puts Fluids into and out of Containers", GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes, 1, 1, 32000, 0, 1, "FluidCanner.png", "", true, aBoolConst_0, 0, "FLUID_CANNER", new Object[]{"GCG", aTextPlateMotor, aTextWireCoil, 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.PUMP, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'G', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.GLASS}).getStackForm(1L)); diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/ChemicalReactor.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/ChemicalReactor.png index 675f623be0..6e3fbbea62 100644 Binary files a/src/main/resources/assets/gregtech/textures/gui/basicmachines/ChemicalReactor.png and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/ChemicalReactor.png differ -- cgit From c12e474c23ca02fb3479312850f6ae07e623d8b9 Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 08:18:30 +0200 Subject: Oil and pollution overhaul --- .../interfaces/tileentity/IEnergyConnected.java | 2 +- .../api/metatileentity/BaseMetaTileEntity.java | 3 +- .../api/metatileentity/MetaPipeEntity.java | 2 +- .../api/metatileentity/MetaTileEntity.java | 2 - .../GT_MetaTileEntity_BasicGenerator.java | 6 +- .../GT_MetaTileEntity_Hatch_Muffler.java | 4 +- .../GT_MetaTileEntity_MultiBlockBase.java | 2 +- .../java/gregtech/api/objects/GT_UO_Dimension.java | 8 +- .../gregtech/api/objects/GT_UO_DimensionList.java | 11 +- .../java/gregtech/api/objects/GT_UO_Fluid.java | 6 +- src/main/java/gregtech/api/util/GT_Utility.java | 139 ++-------------- src/main/java/gregtech/common/GT_Pollution.java | 185 ++++++++++++--------- src/main/java/gregtech/common/GT_Proxy.java | 125 +++++++++----- .../java/gregtech/common/GT_UndergroundOil.java | 96 +++++++++++ .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 2 +- .../GT_MetaTileEntity_AdvSeismicProspector.java | 3 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 4 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 2 +- .../machines/multi/GT_MetaTileEntity_OilDrill.java | 13 +- 21 files changed, 337 insertions(+), 282 deletions(-) create mode 100644 src/main/java/gregtech/common/GT_UndergroundOil.java (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index 3762713fa3..f3790eff8a 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -108,7 +108,7 @@ public interface IEnergyConnected extends IColoredTileEntity, IHasWorldObjectAnd tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(tWorld.getChunkFromBlockCoords(tX,tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } } diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index a16768850f..c724a83e68 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -1147,7 +1147,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } } } - GT_Pollution.addPollution(getWorld(), new ChunkPosition(getXCoord(), getYCoord(), getZCoord()), 100000); + + GT_Pollution.addPollution(this, 100000); mMetaTileEntity.doExplosion(aAmount); } } diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index 84e30620eb..9664845091 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -668,7 +668,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity { tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(getBaseMetaTileEntity().getWorld(),new ChunkPosition(tX, tY, tZ), 100000); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java index ccefab6a3a..f9da109599 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java @@ -857,8 +857,6 @@ public abstract class MetaTileEntity implements IMetaTileEntity { GT_Utility.sendSoundToPlayers(tWorld, GregTech_API.sSoundList.get(209), 1.0F, -1, tX, tY, tZ); tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) - if(GT_Mod.gregtechproxy.mPollution) - GT_Pollution.addPollution(tWorld,new ChunkPosition(tX, tY, tZ), 100000); tWorld.createExplosion(null, tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 509c6f0ec5..492570c8f9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -212,8 +212,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue); //long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - 10 * getPollution()); + GT_Pollution.addPollution(getBaseMetaTileEntity(),10 * getPollution()); mFluid.amount -= tFluidAmountToUse * tConsumed; } } @@ -225,8 +224,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) { aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true); aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1); - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), - 10 * getPollution()); + GT_Pollution.addPollution(getBaseMetaTileEntity(),10 * getPollution()); } } } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 617d17aadb..9b9e83296c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -73,7 +73,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { public boolean polluteEnvironment() { if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000)); + GT_Pollution.addPollution(getBaseMetaTileEntity(), calculatePollutionReduction(10000)); return true; } return false; @@ -106,7 +106,7 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { boolean chk1,chk2,chk3; float ran1=floatGen.nextFloat(),ran2=0,ran3=0; chk1=ran1*100= GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollution(getBaseMetaTileEntity())>= GT_Mod.gregtechproxy.mPollutionSmogLimit){ ran2=floatGen.nextFloat(); ran3=floatGen.nextFloat(); chk2=ran2*100 fl : fFluids.entrySet()) { int chance = fl.getValue().Chance*1000/maxChance; if (random<=chance) return fl.getValue(); //System.out.println("GT UO "+fl.getValue().Registry+" Chance:"+chance+" Random:"+random); random-=chance; } - return null; - } } diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java index 89340132be..c566affe41 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -48,15 +48,16 @@ public class GT_UO_DimensionList { fConfig.get(Category, "MaxAmount", aMaxAmount).getInt(aMaxAmount); fConfig.get(Category, "Chance", aChance).getInt(aChance); fConfig.get(Category, "DecreasePerOperationAmount", aDecreasePerOperationAmount).getInt(aDecreasePerOperationAmount); + //IT IS IN BUCKETS!!! } public void SetDafultValues() { - SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20, 5); + SetConfigValues("Overworld", "0", "gas_natural_gas", "gas_natural_gas", 0, 625, 20, 7); SetConfigValues("Overworld", "0", "liquid_light_oil", "liquid_light_oil", 0, 625, 20, 5); - SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20, 5); - SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20, 5); - SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20, 5); - SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 0, 375, 100, 5); + SetConfigValues("Overworld", "0", "liquid_medium_oil", "liquid_medium_oil", 0, 625, 20, 3); + SetConfigValues("Overworld", "0", "liquid_heavy_oil", "liquid_heavy_oil", 0, 625, 20, 1); + SetConfigValues("Overworld", "0", "oil", "oil", 0, 625, 20, 3); + SetConfigValues("Moon", "Moon", "helium-3", "helium-3", 1, 375, 100, 1); } public void getConfig(Configuration aConfig, String aCategory) { diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java index 84fefb5110..398717b5b6 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -14,7 +14,7 @@ public class GT_UO_Fluid { public int MaxAmount = 0; public int MinAmount = 0; public int Chance = 0; - public int DecreasePerOperationAmount = 5; + public int DecreasePerOperationAmountInBuckets = 5; public GT_UO_Fluid(ConfigCategory aConfigCategory) {//TODO CONFIGURE if (aConfigCategory.containsKey("Registry")) @@ -40,7 +40,7 @@ public class GT_UO_Fluid { if (aConfigCategory.containsKey("DecreasePerOperationAmount")) { aConfigCategory.get("DecreasePerOperationAmount").comment = "Decrease per operation Amount (X/5000L per operation)"; - DecreasePerOperationAmount = aConfigCategory.get("DecreasePerOperationAmount").getInt(5); + DecreasePerOperationAmountInBuckets = aConfigCategory.get("DecreasePerOperationAmount").getInt(5); } //System.out.println("GT UO "+aConfigCategory.getName()+" Fluid:"+Registry+" Max:"+MaxAmount+" Min:"+MinAmount+" Chance:"+Chance); } @@ -53,7 +53,7 @@ public class GT_UO_Fluid { } } - public int getRandomAmount(Random aRandom){ + public int getRandomAmount(Random aRandom){//generates milliBuckets int r1 = (int)Math.round(Math.pow((MaxAmount-MinAmount)*500000.d, 0.2)); int r2 = (int)Math.floor(Math.pow(MinAmount*500000.d, 0.2)); double amount = aRandom.nextInt(r1)+r2+aRandom.nextDouble(); diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 7e28593abf..af667eb4d5 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -56,9 +56,11 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.WorldServer; +import net.minecraft.world.chunk.Chunk; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; @@ -75,6 +77,9 @@ import java.util.*; import java.util.Map.Entry; import static gregtech.api.enums.GT_Values.*; +import static gregtech.common.GT_Proxy.GTPOLLUTION; +import static gregtech.common.GT_Proxy.dimensionWiseChunkData; +import static gregtech.common.GT_UndergroundOil.undergroundOil; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -1575,114 +1580,6 @@ public class GT_Utility { return (int)Math.floor(aValue / aScale); } - public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ) { - return getUndergroundOil(aWorld, aX, aZ, false); - } - - public static FluidStack getUndergroundOil(World aWorld, int aX, int aZ, boolean needConsumeOil) {//TODO RETROGEN!, CHECK FLUIDS AVAILABLE, REWORK - - if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(aWorld.provider.dimensionId)) - return null; - - XSTR tRandom = new XSTR((aWorld.getSeed() + aWorld.provider.dimensionId * 2 + (getScaleCoordinates(aX,96)) + (7 * (getScaleCoordinates(aZ,96))))); - int tAmount = 0; - int tFluidId = 0; - int tDecreasePerOperationAmount = 5; - Fluid tFluid = null; -// System.out.println("Dimension: "+GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).Dimension); - try { - GT_UO_Fluid uoFluid = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).getRandomFluid(tRandom); - if (uoFluid != null) - { - tFluid = uoFluid.getFluid(); - tAmount = uoFluid.getRandomAmount(tRandom); - tDecreasePerOperationAmount = uoFluid.DecreasePerOperationAmount; - if (tFluid != null) - tFluidId = tFluid.getID(); - //System.out.println("Fluid: ("+tFluidId+")"+tFluid.getName()+" Amount:"+tAmount); - } - - } catch (Exception e) { - tAmount = 0; - tFluidId = 0; - } - - try { - ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); - int[] tInts = new int[3]; - if(GT_Proxy.chunkData.containsKey(tPos)){ - tInts = GT_Proxy.chunkData.get(tPos); - if(tInts.length>0){ - if(tInts[0]>0){tAmount = tInts[0];} - } - if(tInts.length>2){ - if(tInts[2]>0&&tInts[2]!=tFluidId) - { - tFluidId = tInts[2]; - tFluid = FluidRegistry.getFluid(tFluidId); - } - } - GT_Proxy.chunkData.remove(tPos); - } - - if (needConsumeOil && tAmount >= 5000) - tAmount = tAmount - tDecreasePerOperationAmount; - - tInts[0] = tAmount; - tInts[2] = tFluidId; - GT_Proxy.chunkData.put(tPos, tInts); - } catch (Exception e) { - System.out.println("getUndergroundOil() - Error put data"); - } - if (tFluid!=null) - return new FluidStack(tFluid, tAmount); - return null; - } - - //private static FluidStack getUndergroundOilFromInfo(int type,int amnt){ - // switch (type) {//0 is old system - // case 1: - // return new FluidStack(Materials.OilLight .mFluid,amnt); - // case 2: - // return new FluidStack(Materials.OilMedium.mFluid,amnt); - // case 3: - // return new FluidStack(Materials.OilHeavy .mFluid,amnt); - // case 4: - // return new FluidStack(Materials.Oil .mFluid,amnt); - // } - // return new FluidStack(Materials.NatruralGas.mGas,amnt);//5 - //} - // - //private static FluidStack setUndergroundOil(World aWorld, int aX, int aZ,ChunkPosition tPos,int[] tInts) { - // XSTR tRandom = new XSTR(aWorld.getSeed() ^ ((long)(aX / 6) + (long)(7000 * (aZ / 6)))); - // int type=tRandom.nextInt(5);//type slowly changes - // int amnt = (int)(Math.ceil(Math.pow(2D+(double)(tRandom.nextInt(48))+(new XSTR()).nextDouble(),8D)/200000D)); - // //roughly uses 28 bits - // FluidStack tFluidStack; - // switch (type) {//0 is old system - // case 1: - // tFluidStack=new FluidStack(Materials.OilLight .mFluid,amnt); - // break; - // case 2: - // tFluidStack=new FluidStack(Materials.OilMedium.mFluid,amnt); - // break; - // case 3: - // tFluidStack=new FluidStack(Materials.OilHeavy .mFluid,amnt); - // break; - // case 4: - // tFluidStack=new FluidStack(Materials.Oil .mFluid,amnt); - // break; - // default://case 0; -> 5 - // type=5;//important, 0 is invalid ! - // tFluidStack=new FluidStack(Materials.NatruralGas.mGas,amnt);//5 - // } - // - // tInts[0]=(type<<28)+amnt;//here since the switch changes type - // //tInts[2]|=0x01; - // GT_Proxy.chunkData.put(tPos, tInts); - // return tFluidStack; - //} - public static int getCoordinateScan(ArrayList aList, EntityPlayer aPlayer, World aWorld, int aScanLevel, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ) { if (aList == null) return 0; @@ -1872,23 +1769,23 @@ public class GT_Utility { } } if (aPlayer.capabilities.isCreativeMode && GT_Values.D1) { - FluidStack tFluid = getUndergroundOil(aWorld, aX, aZ); + FluidStack tFluid = undergroundOil(aWorld.getChunkFromBlockCoords(aX,aZ),-1);//-# to only read if (tFluid!=null) tList.add(EnumChatFormatting.GOLD+tFluid.getLocalizedName()+EnumChatFormatting.RESET+": " +EnumChatFormatting.YELLOW+ tFluid.amount +EnumChatFormatting.RESET+" L"); - } -// if(aPlayer.capabilities.isCreativeMode){ - ChunkPosition tPos = new ChunkPosition(getScaleCoordinates(aX,16), aWorld.provider.dimensionId, getScaleCoordinates(aZ,16)); - if(GT_Proxy.chunkData.containsKey(tPos)){ - int[] tPollution = GT_Proxy.chunkData.get(tPos); - if(tPollution.length>1){ - tList.add("Pollution in Chunk: "+EnumChatFormatting.RED+tPollution[1]+EnumChatFormatting.RESET+" gibbl"); - }else{ - tList.add(EnumChatFormatting.GREEN+"No Pollution in Chunk! HAYO!"+EnumChatFormatting.RESET); - } - }else{ + else + tList.add(EnumChatFormatting.GOLD+"Nothing"+EnumChatFormatting.RESET+": " +EnumChatFormatting.YELLOW+ '0' +EnumChatFormatting.RESET+" L"); + } +// if(aPlayer.capabilities.isCreativeMode){ + int[] chunkData = GT_Proxy.dimensionWiseChunkData.get(aWorld.provider.dimensionId).get(aWorld.getChunkFromBlockCoords(aX,aZ).getChunkCoordIntPair()); + if(chunkData !=null){ + if(chunkData[GTPOLLUTION]>0){ + tList.add("Pollution in Chunk: "+EnumChatFormatting.RED+chunkData[GTPOLLUTION]+EnumChatFormatting.RESET+" gibbl"); + }else{ tList.add(EnumChatFormatting.GREEN+"No Pollution in Chunk! HAYO!"+EnumChatFormatting.RESET); } -// } + }else{ + tList.add(EnumChatFormatting.GREEN+"No Pollution in Chunk! HAYO!"+EnumChatFormatting.RESET); + } try { if (tBlock instanceof IDebugableBlock) { diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 5d3c7ee4b3..0120f2c353 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -1,6 +1,8 @@ package gregtech.common; +import cpw.mods.fml.common.gameevent.TickEvent; import gregtech.GT_Mod; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; @@ -10,17 +12,19 @@ import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.event.world.WorldEvent; -import java.util.ArrayList; -import java.util.List; -import java.util.TreeMap; +import java.util.*; + +import static gregtech.common.GT_Proxy.*; //import net.minecraft.entity.EntityLiving; -public class GT_Pollution {//TODO REWORK +public class GT_Pollution { /** * Pollution dispersion until effects start: * Calculation: ((Limit * 0.01) + 2000) * (4 <- spreading rate) @@ -52,62 +56,77 @@ public class GT_Pollution {//TODO REWORK * Muffler Hatch Pollution reduction: * LV (0%), MV (30%), HV (52%), EV (66%), IV (76%), LuV (84%), ZPM (89%), UV (92%), MAX (95%) */ + private static XSTR tRan = new XSTR(); + private List pollutionList = new ArrayList<>();//chunks left to process + private HashMap chunkData;//link to chunk data that is saved/loaded + private int operationsPerTick=0;//how much chunks should be processed in each cycle + private static final short cycleLen=1200; + private final World aWorld; - static List tList = null; - static int loops = 1; - static XSTR tRan = new XSTR(); + public GT_Pollution(World world){ + aWorld=world; + chunkData=dimensionWiseChunkData.get(aWorld.provider.dimensionId); + if(chunkData==null){ + chunkData=new HashMap<>(1024); + dimensionWiseChunkData.put(world.provider.dimensionId,chunkData); + } + dimensionWisePollution.put(aWorld.provider.dimensionId,this); + } - public static void onWorldTick(World aWorld, int aTick){ - if(true)return; //TODO FIX + public static void onWorldTick(TickEvent.WorldTickEvent aEvent){//called from proxy + //return if pollution disabled if(!GT_Mod.gregtechproxy.mPollution) return; - int aWorldID=aWorld.provider.dimensionId; - if(aTick == 0 || (tList==null && GT_Proxy.chunkData!=null)){ - //---tList = new TreeMap<>(); - //---tList.put(aWorld,new ArrayList(GT_Proxy.chunkData.keySet())); - loops = (tList.size()/1200) + 1; - //System.out.println("new Pollution loop"+aTick); + final GT_Pollution pollutionInstance = dimensionWisePollution.get(aEvent.world.provider.dimensionId); + if(pollutionInstance==null)return; + pollutionInstance.tickPollutionInWorld((int)(aEvent.world.getTotalWorldTime()%cycleLen)); + } + + private void tickPollutionInWorld(int aTickID){//called from method above + //gen data set + if(aTickID==0){ + pollutionList = new ArrayList<>(chunkData.keySet()); + //set operations per tick + if(pollutionList.size()>0) operationsPerTick =(pollutionList.size()/cycleLen); + else operationsPerTick=0;//SANity } - if(tList!=null && tList.size() > 0) for(int i = 0; i < loops ; i++) if(tList.size()>0){ - ChunkPosition tPos = tList.get(0); - tList.remove(0); - if(tPos!=null && GT_Proxy.chunkData.containsKey(tPos)){ - int tPollution = GT_Proxy.chunkData.get(tPos)[1]; - //System.out.println("process: "+tPos.chunkPosX+" "+tPos.chunkPosZ+" "+tPollution); - //Reduce pollution in chunk - tPollution = (int)(0.9945f*tPollution); - //tPollution -= 2000; - if(tPollution<=0) tPollution = 0; - //Spread Pollution - else if(tPollution>400000){ - List tNeighbor = new ArrayList(); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX+1, tPos.chunkPosY, tPos.chunkPosZ)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX-1, tPos.chunkPosY, tPos.chunkPosZ)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ+1)); - tNeighbor.add(new ChunkPosition(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ-1)); - for(ChunkPosition tNPos : tNeighbor){ - //---if(!GT_Proxy.chunkData.containsKey(tNPos)) - //--- GT_Utility.undergroundOil(aWorld,tNPos.chunkPosX,tNPos.chunkPosZ,false,0); - - //if(GT_Proxy.chunkData.containsKey(tNPos)){ - int tNPol = GT_Proxy.chunkData.get(tNPos)[1]; - if(tNPol*6 < tPollution*5){ - int tDiff = tPollution - tNPol; - tDiff = tDiff/20; - tNPol = GT_Utility.safeInt((long)tNPol+tDiff);//tNPol += tDiff; - tPollution -= tDiff; - GT_Proxy.chunkData.get(tNPos)[1] = tNPol; - } - //} + + for(int chunksProcessed=0;chunksProcessed<=operationsPerTick;chunksProcessed++){ + if(pollutionList.size()==0)break;//no more stuff to do + ChunkCoordIntPair actualPos=pollutionList.remove(pollutionList.size()-1);//faster + //add default data if missing + if(!chunkData.containsKey(actualPos)) chunkData.put(actualPos,getDefaultChunkDataOnCreation()); + //get pollution + int tPollution = chunkData.get(actualPos)[GTPOLLUTION]; + //remove some + tPollution = (int)(0.9945f*tPollution); + //tPollution -= 2000;//This does not really matter... + + if(tPollution<=0) tPollution = 0;//SANity check + else if(tPollution>400000){//Spread Pollution + + ChunkCoordIntPair[] tNeighbors = new ChunkCoordIntPair[4];//array is faster + tNeighbors[0]=(new ChunkCoordIntPair(actualPos.chunkXPos+1,actualPos.chunkZPos)); + tNeighbors[1]=(new ChunkCoordIntPair(actualPos.chunkXPos-1,actualPos.chunkZPos)); + tNeighbors[2]=(new ChunkCoordIntPair(actualPos.chunkXPos,actualPos.chunkZPos+1)); + tNeighbors[3]=(new ChunkCoordIntPair(actualPos.chunkXPos,actualPos.chunkZPos-1)); + for(ChunkCoordIntPair neighborPosition : tNeighbors){ + if(!chunkData.containsKey(neighborPosition)) chunkData.put(actualPos,getDefaultChunkDataOnCreation()); + + int neighborPollution = chunkData.get(neighborPosition)[GTPOLLUTION]; + if(neighborPollution*6 < tPollution*5){//METHEMATICS... + int tDiff = tPollution - neighborPollution; + tDiff = tDiff/20; + neighborPollution = GT_Utility.safeInt((long)neighborPollution+tDiff);//tNPol += tDiff; + tPollution -= tDiff; + chunkData.get(neighborPosition)[GTPOLLUTION] = neighborPollution; } } - int[] tArray = GT_Proxy.chunkData.get(tPos); - tArray[1] = tPollution; - GT_Proxy.chunkData.remove(tPos); - GT_Proxy.chunkData.put(tPos, tArray); + + //Create Pollution effects //Smog filter TODO if(tPollution > GT_Mod.gregtechproxy.mPollutionSmogLimit) { - AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX << 4, 0, tPos.chunkPosZ << 4, (tPos.chunkPosX << 4) + 16, 256, (tPos.chunkPosZ << 4) + 16); + AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(actualPos.chunkXPos << 4, 0, actualPos.chunkZPos << 4, (actualPos.chunkXPos << 4) + 16, 256, (actualPos.chunkZPos << 4) + 16); List tEntitys = aWorld.getEntitiesWithinAABB(EntityLivingBase.class, chunk); for (EntityLivingBase tEnt : tEntitys) { if (!GT_Utility.isWearingFullGasHazmat(tEnt)) { @@ -121,6 +140,8 @@ public class GT_Pollution {//TODO REWORK } } } + + // Poison effects if (tPollution > GT_Mod.gregtechproxy.mPollutionPoisonLimit) { //AxisAlignedBB chunk = AxisAlignedBB.getBoundingBox(tPos.chunkPosX*16, 0, tPos.chunkPosZ*16, tPos.chunkPosX*16+16, 256, tPos.chunkPosZ*16+16); @@ -139,23 +160,27 @@ public class GT_Pollution {//TODO REWORK } } } + + // killing plants if (tPollution > GT_Mod.gregtechproxy.mPollutionVegetationLimit) { int f = 20; for (; f < (tPollution / 25000); f++) { - int x = (tPos.chunkPosX << 4) + tRan.nextInt(16); + int x = (actualPos.chunkXPos << 4) + tRan.nextInt(16); int y = 60 + (-f + tRan.nextInt(f * 2 + 1)); - int z = (tPos.chunkPosZ << 4) + tRan.nextInt(16); + int z = (actualPos.chunkZPos << 4) + tRan.nextInt(16); damageBlock(aWorld, x, y, z, tPollution > GT_Mod.gregtechproxy.mPollutionSourRainLimit); } } } } } + //Write new pollution to Hashmap !!! + chunkData.get(actualPos)[GTPOLLUTION] = tPollution; } } - public static void damageBlock(World world, int x, int y, int z, boolean sourRain){ + private static void damageBlock(World world, int x, int y, int z, boolean sourRain){ if (world.isRemote) return; Block tBlock = world.getBlock(x, y, z); int tMeta = world.getBlockMetadata(x, y, z); @@ -205,37 +230,31 @@ public class GT_Pollution {//TODO REWORK } } - //Add aWorld to Save Pollution - public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){ + public static void addPollution(IGregTechTileEntity te, int aPollution){ + System.out.println(te.getWorld().provider.dimensionId+" "+te.getXCoord()+" "+te.getZCoord()); + addPollution(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()), aPollution); + } + + public static void addPollution(Chunk ch, int aPollution){ if(!GT_Mod.gregtechproxy.mPollution)return; - try{ - ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(aPos.chunkPosX,16), aWorld.provider.dimensionId, GT_Utility.getScaleCoordinates(aPos.chunkPosZ,16)); // OLD in coordinate -1 -1 chunk 0 0 -// System.out.println("add pollution dim: "+aWorld.provider.dimensionId+" x: "+ tPos.chunkPosX +" z: " + tPos.chunkPosZ +" poll: "+aPollution); - int[] tData = new int[3]; - if(GT_Proxy.chunkData.containsKey(tPos)){ - tData = GT_Proxy.chunkData.get(tPos); - if(tData.length>1){ - tData[1] += aPollution; - } - }else{ - tData[1] += aPollution; - GT_Proxy.chunkData.put(tPos, tData); - } - }catch(Exception e){ - + HashMap dataMap=dimensionWiseChunkData.get(ch.worldObj.provider.dimensionId); + if(dataMap==null){ + dataMap=new HashMap<>(1024); + dimensionWiseChunkData.put(ch.worldObj.provider.dimensionId,dataMap); } + if(dataMap.get(ch.getChunkCoordIntPair())==null) + dataMap.put(ch.getChunkCoordIntPair(),getDefaultChunkDataOnCreation()); + dataMap.get(ch.getChunkCoordIntPair())[GTPOLLUTION]+=aPollution; } - public static int getPollutionAtCoords(World aWorld, int aX, int aZ){//TODO FIX - ChunkPosition tPos = new ChunkPosition(aX>>4, aWorld.provider.dimensionId, aZ>>4); - if(GT_Proxy.chunkData.containsKey(tPos)){ - int[] tPollution = GT_Proxy.chunkData.get(tPos); - if(tPollution.length>1 && tPollution[1]>0){ - return tPollution[1]; - }else{ - return 0; - } - } - return 0; + public static int getPollution(IGregTechTileEntity te){ + return getPollution(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord())); + } + + public static int getPollution(Chunk ch){ + if(!GT_Mod.gregtechproxy.mPollution)return 0; + HashMap dataMap=dimensionWiseChunkData.get(ch.worldObj.provider.dimensionId); + if(dataMap==null || dataMap.get(ch.getChunkCoordIntPair())==null) return 0; + return dataMap.get(ch.getChunkCoordIntPair())[GTPOLLUTION]; } } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 07c1ea9fce..f66a77261f 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -6,6 +6,8 @@ import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ModContainer; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.common.eventhandler.Event.Result; +import cpw.mods.fml.common.eventhandler.EventBus; +import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.FMLNetworkEvent; @@ -55,10 +57,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; -import net.minecraft.world.ChunkPosition; +import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.EntityJoinWorldEvent; @@ -69,6 +72,7 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.ChunkDataEvent; +import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @@ -780,6 +784,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } } catch (Throwable e) {e.printStackTrace(GT_Log.err);} + + dimensionWiseChunkData.clear();//!!! IMPORTANT for map switching... + dimensionWisePollution.clear();//!!! IMPORTANT for map switching... } public void onServerStarted() { @@ -1445,8 +1452,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { } } } - if(aEvent.world.provider.dimensionId==0) - GT_Pollution.onWorldTick(aEvent.world, (int) (aEvent.world.getTotalWorldTime() % 1200)); + + GT_Pollution.onWorldTick(aEvent); } } @@ -1905,50 +1912,92 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { ProgressManager.pop(progressBar); } - public static final HashMap chunkData = new HashMap(5000); + public static final HashMap> dimensionWiseChunkData = new HashMap<>(16);//stores chunk data that is loaded/saved + public static final HashMap dimensionWisePollution = new HashMap<>(16);//stores GT_Polluttors objects + public static final byte GTOIL=3,GTOILFLUID=2,GTPOLLUTION=1,GTMETADATA=0,NOT_LOADED=0,LOADED=1;//consts + //@Deprecated + //public static final HashMap chunkData = new HashMap<>(0); + + private static final byte oilVer=(byte)20;//non zero plz + + //TO get default's fast + public static int[] getDefaultChunkDataOnCreation(){ + return new int[]{NOT_LOADED,0,-1,-1}; + } + public static int[] getDefaultChunkDataOnLoad(){ + return new int[]{LOADED,0,-1,-1}; + } - private static final byte oilVer=(byte)0x20; @SubscribeEvent - public void handleChunkSaveEvent(ChunkDataEvent.Save event)//TODO FIX +RETROGEN - { - ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); - if(chunkData.containsKey(tPos)){ - int[] tInts = chunkData.get(tPos); - if(tInts.length>0){event.getData().setInteger("GTOIL", tInts[0]);} - if(tInts.length>1){event.getData().setInteger("GTPOLLUTION", tInts[1]);} - if(tInts.length>2){event.getData().setInteger("GTOILFLUID", tInts[2]);} - } + public void handleChunkSaveEvent(ChunkDataEvent.Save event) {//ALWAYS SAVE FROM THE HASH MAP DATA + HashMap chunkData=dimensionWiseChunkData.get(event.world.provider.dimensionId); + if(chunkData==null) return;//no dim info stored + + int[] tInts = chunkData.get(event.getChunk().getChunkCoordIntPair()); + if(tInts==null) return;//no chunk data stored + //assuming len of this array 4 + if(tInts[3]>=0)event.getData().setInteger("GTOIL", tInts[GTOIL]); + else event.getData().removeTag("GTOIL"); + if(tInts[2]>=0)event.getData().setInteger("GTOILFLUID", tInts[GTOILFLUID]); + else event.getData().removeTag("GTOILFLUID"); + if(tInts[1]>0)event.getData().setInteger("GTPOLLUTION", tInts[GTPOLLUTION]); + else event.getData().removeTag("GTPOLLUTION"); + event.getData().setByte("GTOILVER", oilVer);//version mark } @SubscribeEvent - public void handleChunkLoadEvent(ChunkDataEvent.Load event)//TODO FIX +RETROGEN - { - int tOil = 0; - int tOilFluid = 0; - int tPollution = 0; - - ChunkPosition tPos = new ChunkPosition(event.getChunk().xPosition,event.getChunk().worldObj.provider.dimensionId,event.getChunk().zPosition); - int[] tData = new int[0]; - if(chunkData.containsKey(tPos)){ - tData = chunkData.get(tPos); - chunkData.remove(tPos); - if(tData.length>0) - tOil = tData[0]; - if(tData.length>1) - tPollution = tData[1]; - if(tData.length>2) - tOilFluid = tData[2]; + public void handleChunkLoadEvent(ChunkDataEvent.Load event) { + final int worldID=event.world.provider.dimensionId; + HashMap chunkData = dimensionWiseChunkData.get(worldID); + if (chunkData == null){ + chunkData=new HashMap<>(1024); + dimensionWiseChunkData.put(worldID, chunkData); } + if (dimensionWisePollution.get(worldID) == null) + dimensionWisePollution.put(worldID, new GT_Pollution(event.world)); + + int[] tInts = chunkData.get(event.getChunk().getChunkCoordIntPair()); + if (tInts == null) { + //NOT LOADED and NOT PROCESSED by pollution algorithms + //regular load + tInts = getDefaultChunkDataOnLoad(); + + if (event.getData().getByte("GTOILVER") == oilVer) { + if (event.getData().hasKey("GTOIL")) + tInts[GTOIL] = event.getData().getInteger("GTOIL"); + if (event.getData().hasKey("GTOILFLUID")) + tInts[GTOILFLUID] = event.getData().getInteger("GTOILFLUID"); + } + + tInts[GTPOLLUTION] = event.getData().getInteger("GTPOLLUTION");//Defaults to 0 + + //store in HASH MAP if has useful data + if (tInts[GTPOLLUTION] > 0 || tInts[GTOIL] >= 0 || tInts[GTOILFLUID] >= 0) + chunkData.put(event.getChunk().getChunkCoordIntPair(), tInts); + } else if (tInts[GTMETADATA] == NOT_LOADED) {//was NOT loaded from chunk save game data + //NOT LOADED but generated + //append load + if (event.getData().getByte("GTOILVER") == oilVer) { + if (tInts[GTOIL] < 0 && event.getData().hasKey("GTOIL"))//if was not yet initialized + tInts[GTOIL] = event.getData().getInteger("GTOIL"); + + if (tInts[GTOILFLUID] < 0 && event.getData().hasKey("GTOILFLUID"))//if was not yet initialized + tInts[GTOILFLUID] = event.getData().getInteger("GTOILFLUID"); + } else { + tInts[GTOIL] = -1; + tInts[GTOILFLUID] = -1; + } - if(tOil==0&&event.getData().hasKey("GTOIL")) - tOil = event.getData().getInteger("GTOIL"); - if(tPollution==0&&event.getData().hasKey("GTPOLLUTION")) - tPollution = event.getData().getInteger("GTPOLLUTION"); - if(tOilFluid==0&&event.getData().hasKey("GTOILFLUID")) - tOilFluid = event.getData().getInteger("GTOILFLUID"); + tInts[GTPOLLUTION] += event.getData().getInteger("GTPOLLUTION");//Defaults to 0, add stored pollution to data + tInts[GTMETADATA] = LOADED;//mark as = loaded + //store in HASHMAP - chunkData.put(tPos, new int[]{tOil,tPollution,tOilFluid}); + chunkData.put(event.getChunk().getChunkCoordIntPair(), tInts); + }//else if(tInts[0]==1){ + ////Already loaded chunk data + ////DO NOTHING - this chunk data was already loaded and stored in hash map + //} } public static class OreDictEventContainer { diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java new file mode 100644 index 0000000000..bc9a1331b1 --- /dev/null +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -0,0 +1,96 @@ +package gregtech.common; + +import gregtech.GT_Mod; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_UO_Fluid; +import gregtech.api.objects.XSTR; +import gregtech.common.GT_Proxy; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraft.world.ChunkPosition; +import net.minecraft.world.World; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +import java.util.HashMap; + +import static gregtech.api.util.GT_Utility.getScaleCoordinates; +import static gregtech.common.GT_Proxy.*; + +/** + * Created by Tec on 29.04.2017. + */ +public class GT_UndergroundOil { + + public static FluidStack undergroundOil(IGregTechTileEntity te,float drainSpeedCoefficient){ + return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),drainSpeedCoefficient); + } + + //Returns whole content for information purposes -> when drainSpeedCoeff < 0 + //Else returns extracted fluidStack if amount > 0, or null otherwise + public static FluidStack undergroundOil(Chunk chunk, float drainSpeedCoefficient) { + if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(chunk.worldObj.provider.dimensionId)) return null; + World aWorld = chunk.worldObj; + + //Read hash map + HashMap chunkData = dimensionWiseChunkData.get(aWorld.provider.dimensionId); + if(chunkData==null){ + chunkData=new HashMap<>(1024); + dimensionWiseChunkData.put(aWorld.provider.dimensionId,chunkData); + } + + int[] tInts = chunkData.get(chunk.getChunkCoordIntPair()); + + if(tInts==null) tInts=getDefaultChunkDataOnCreation();//init if null + else if(tInts[GTOIL]==0){ + //can return 0 amount stack for info :D + return drainSpeedCoefficient>=0 ? null : new FluidStack(FluidRegistry.getFluid(tInts[GTOILFLUID]),0); + } + + //GEN IT TO GET OBJECT... + XSTR tRandom = new XSTR(aWorld.getSeed() + aWorld.provider.dimensionId * 2 + + (chunk.getChunkCoordIntPair().chunkXPos>>3) + + 8267 * (chunk.getChunkCoordIntPair().chunkZPos>>3)); + GT_UO_Fluid uoFluid = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).getRandomFluid(tRandom); + + //Fluid stack holder + FluidStack fluidInChunk; + + //Set fluidstack from uoFluid + if (uoFluid == null || uoFluid.getFluid()==null){ + tInts[GTOILFLUID]=Integer.MAX_VALUE;//null fluid pointer... kindof + tInts[GTOIL]=0; + chunkData.put(chunk.getChunkCoordIntPair(),tInts);//update hash map + return null; + } else { + if(tInts[GTOILFLUID]== uoFluid.getFluid().getID()){//if stored fluid matches uoFluid + fluidInChunk = new FluidStack(uoFluid.getFluid(),tInts[GTOIL]); + }else{ + fluidInChunk = new FluidStack(uoFluid.getFluid(), uoFluid.getRandomAmount(tRandom)); + tRandom=new XSTR(); + fluidInChunk.amount=(int)((float)fluidInChunk.amount*(0.75f+(tRandom.nextFloat()/2f)));//Randomly change amounts by +/- 25% + } + tInts[GTOIL]=fluidInChunk.amount; + tInts[GTOILFLUID]=fluidInChunk.getFluidID(); + } + + //do stuff on it if needed + if(drainSpeedCoefficient>=0) { + int actualExtractionSpeed=(int)(uoFluid.DecreasePerOperationAmountInBuckets*1000*drainSpeedCoefficient); + if(fluidInChunk.amount>actualExtractionSpeed) { + fluidInChunk.amount=actualExtractionSpeed;//give appropriate amount + tInts[GTOIL]-=actualExtractionSpeed;//diminish amount + }else if(fluidInChunk.amount>0) { + //fluidInChunk.amount= the same amount... going to return this + tInts[GTOIL]=0; + }else{ + fluidInChunk=null; + tInts[GTOIL]=0;//just to be on safe side... + } + } + + chunkData.put(chunk.getChunkCoordIntPair(),tInts);//update hash map + return fluidInChunk; + } +} diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index b16986fffd..c725634030 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -148,7 +148,7 @@ public class GT_MetaTileEntity_Boiler_Bronze this.mTemperature += 1; } if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 3e5afedba2..8aef783b6b 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -127,7 +127,7 @@ public class GT_MetaTileEntity_Boiler_Lava } if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 20); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index 0e03cc73dc..adc1a0b152 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -152,7 +152,7 @@ public class GT_MetaTileEntity_Boiler_Steel this.mTemperature += 1; } if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) { - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 30); } aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 404e3dd3a7..6f1a9e32e3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -22,6 +22,7 @@ import gregtech.api.objects.ItemData; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; +import gregtech.common.GT_UndergroundOil; import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; import ic2.core.Ic2Items; @@ -153,7 +154,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba for (int z = tLeftZBound; z <= tRightZBound; ++z) { ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(x*16,96), 0, GT_Utility.getScaleCoordinates(z*16,96)); - FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), x*16, z*16); + FluidStack tFluid = GT_UndergroundOil.undergroundOil(getBaseMetaTileEntity(),-1); if (tFluid != null) if (tFluids.containsKey(tPos)) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 9be7fd36d9..f63c764c52 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -207,7 +207,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } } if(this.mMaxProgresstime>0 && (aTimer % 20L == 0L)){ - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 200); + GT_Pollution.addPollution(getBaseMetaTileEntity(), 200); } aBaseMetaTileEntity.setActive((this.mMaxProgresstime > 0) && (this.mMachine)); @@ -238,7 +238,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace XSTR floatGen=new XSTR(); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.3D, 0.0D); //Pollution particles intensify - if(GT_Pollution.getPollutionAtCoords(aWorld,this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getZCoord())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ + if(GT_Pollution.getPollution(getBaseMetaTileEntity())>GT_Mod.gregtechproxy.mPollutionSmogLimit){ aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.45D, 0.0D); aWorld.spawnParticle("largesmoke", xPos + floatGen.nextFloat(), yPos, zPos + floatGen.nextFloat(), 0.0D, 0.6D, 0.0D); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index c014724ab8..11c73709c1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -87,7 +87,7 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock this.mEfficiency = 10000; this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), mMaxProgresstime*10); + GT_Pollution.addPollution(getBaseMetaTileEntity(), mMaxProgresstime*10); return true; } else { this.mEfficiency = 0; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java index 26885c89a2..a5a5617a42 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java @@ -21,7 +21,9 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; -public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {//TODO REWORK +import static gregtech.common.GT_UndergroundOil.undergroundOil; + +public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase { private boolean completedCycle = false; private int extractionSpeed=0; @@ -79,29 +81,26 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase } } //Output fluid - FluidStack tFluid = null;//GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,false,0);//TODO FIX + FluidStack tFluid = undergroundOil(getBaseMetaTileEntity(),.5F+(getInputTier()*.25F));//consumes here... if (tFluid == null){ extractionSpeed=0; stopMachine(); return false;//impossible } if (getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) { + //Not at bedrock layer - i prefer to keep it like it is... if (completedCycle) { moveOneDown(); } tFluid = null; if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) completedCycle = true; - } else if (tFluid.amount == 0) {//no fluid remaining + } else if (tFluid.amount == 0) {//no fluid remaining, for SANity extractionSpeed=0; stopMachine(); return false;//stops processing?? } else { - int minExtraction= (int)Math.pow((float)GT_Utility.getTier(getMaxInputVoltage()),3F);//tier^3 - if(tFluid.amount>minExtraction) - tFluid.amount= Math.max(minExtraction,Math.min(tFluid.amount/50000,500)); extractionSpeed=tFluid.amount; - //GT_Utility.undergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord()>>4, getBaseMetaTileEntity().getZCoord()>>4,true,extractionSpeed);//TODO FIX } this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; -- cgit From f2b8bbdde8c7ebac99e5e6fdb3cc497d39dd575e Mon Sep 17 00:00:00 2001 From: Technus Date: Mon, 1 May 2017 10:24:30 +0200 Subject: Optimize imports --- .../interfaces/tileentity/IEnergyConnected.java | 1 - .../gregtech/api/items/GT_MetaGenerated_Tool.java | 1 - .../api/items/GT_RadioactiveCellIC_Item.java | 3 +-- .../api/metatileentity/BaseMetaTileEntity.java | 1 - .../api/metatileentity/MetaPipeEntity.java | 3 --- .../GT_MetaTileEntity_BasicGenerator.java | 2 -- .../GT_MetaTileEntity_BasicMachine.java | 3 +-- .../GT_MetaTileEntity_Hatch_Maintenance.java | 3 --- .../GT_MetaTileEntity_Hatch_Muffler.java | 1 - .../GT_MetaTileEntity_MultiBlockBase.java | 1 - .../java/gregtech/api/objects/GT_UO_Dimension.java | 10 ++------ .../gregtech/api/objects/GT_UO_DimensionList.java | 3 --- .../java/gregtech/api/objects/GT_UO_Fluid.java | 7 ++--- src/main/java/gregtech/api/util/GT_Utility.java | 8 ------ src/main/java/gregtech/common/GT_Client.java | 3 --- src/main/java/gregtech/common/GT_Pollution.java | 6 ++--- src/main/java/gregtech/common/GT_Proxy.java | 24 +++-------------- .../java/gregtech/common/GT_UndergroundOil.java | 4 --- .../gregtech/common/GT_Worldgen_GT_Ore_Layer.java | 1 - .../java/gregtech/common/GT_Worldgenerator.java | 1 - .../common/blocks/GT_Block_Reinforced.java | 3 --- .../common/covers/GT_Cover_Fluidfilter.java | 14 +--------- .../common/items/GT_MetaGenerated_Item_03.java | 10 -------- .../common/items/armor/ArmorCalculation.java | 7 ----- .../gregtech/common/items/armor/ArmorData.java | 21 ++++----------- .../common/items/armor/ElectricModularArmor1.java | 5 ---- .../common/items/armor/ModularArmor_Item.java | 30 +++++++++------------- .../java/gregtech/common/items/armor/Vector3.java | 11 ++++---- .../items/armor/components/ArmorComponent.java | 11 +++----- .../armor/components/LoadArmorComponents.java | 1 - .../common/items/armor/components/StatType.java | 4 --- .../items/armor/gui/ContainerModularArmor.java | 2 -- .../gregtech/common/items/armor/gui/FluidSync.java | 9 ------- .../common/items/armor/gui/FluidSync2.java | 10 -------- .../common/items/armor/gui/GuiElectricArmor1.java | 28 +++++--------------- .../common/items/armor/gui/GuiModularArmor.java | 15 +++++------ .../common/items/armor/gui/InventoryArmor.java | 8 ++---- .../gregtech/common/items/armor/gui/SlotFluid.java | 7 ----- .../items/behaviors/Behaviour_Plunger_Fluid.java | 1 - .../boilers/GT_MetaTileEntity_Boiler_Bronze.java | 1 - .../boilers/GT_MetaTileEntity_Boiler_Lava.java | 1 - .../boilers/GT_MetaTileEntity_Boiler_Steel.java | 1 - .../GT_MetaTileEntity_AdvSeismicProspector.java | 11 -------- .../machines/basic/GT_MetaTileEntity_Scanner.java | 1 - .../basic/GT_MetaTileEntity_Teleporter.java | 5 +--- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 1 - .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 2 -- .../multi/GT_MetaTileEntity_ProcessingArray.java | 2 -- .../steam/GT_MetaTileEntity_Compressor_Bronze.java | 2 -- .../steam/GT_MetaTileEntity_Compressor_Steel.java | 2 -- .../steam/GT_MetaTileEntity_Extractor_Bronze.java | 2 -- .../steam/GT_MetaTileEntity_Extractor_Steel.java | 2 -- .../steam/GT_MetaTileEntity_Macerator_Bronze.java | 1 - .../steam/GT_MetaTileEntity_Macerator_Steel.java | 1 - .../gregtech/loaders/misc/GT_Achievements.java | 1 - .../loaders/oreprocessing/ProcessingCircuit.java | 2 -- .../loaders/oreprocessing/ProcessingCrafting.java | 5 +++- .../oreprocessing/ProcessingCrushedOre.java | 1 - .../loaders/oreprocessing/ProcessingFoil.java | 1 - .../loaders/oreprocessing/ProcessingStick.java | 6 +---- .../loaders/postload/GT_MachineRecipeLoader.java | 3 +-- .../java/gregtech/nei/GT_NEI_DefaultHandler.java | 4 ++- 62 files changed, 65 insertions(+), 276 deletions(-) (limited to 'src/main/java/gregtech/api/util/GT_Utility.java') diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java index f3790eff8a..809357f624 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IEnergyConnected.java @@ -8,7 +8,6 @@ import gregtech.common.GT_Pollution; import ic2.api.energy.tile.IEnergySink; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java index 1c1f2f161e..640be5f23e 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java @@ -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; diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java index fe136e0621..24dcc8ef5e 100644 --- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java +++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java @@ -1,6 +1,7 @@ package gregtech.api.items; +import gregtech.api.GregTech_API; import ic2.api.reactor.IReactor; import ic2.api.reactor.IReactorComponent; import ic2.core.IC2Potion; @@ -12,8 +13,6 @@ import net.minecraft.world.World; import java.util.ArrayList; -import gregtech.api.GregTech_API; - public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implements IReactorComponent { public final int numberOfCells; diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index c724a83e68..028f47dee3 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -27,7 +27,6 @@ import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; 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; diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java index ff728f57b9..de352b6f8c 100644 --- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java @@ -2,7 +2,6 @@ package gregtech.api.metatileentity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -10,7 +9,6 @@ import gregtech.api.objects.GT_ItemStack; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Pollution; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IIconRegister; @@ -22,7 +20,6 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 492570c8f9..c20b8ad3a8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -7,11 +7,9 @@ import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; -import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; import java.util.Collection; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 56df2b1a96..b2d1cbd3a1 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -10,7 +10,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.XSTR; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -20,8 +19,8 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; -import net.minecraftforge.common.DimensionManager; import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index bcc24149f8..c96aa56aef 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java @@ -23,9 +23,6 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import scala.actors.threadpool.Arrays; - -import java.util.List; public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 9b9e83296c..8a53a598cc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -10,7 +10,6 @@ import gregtech.api.objects.XSTR; import gregtech.common.GT_Pollution; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index a67ced02c4..9256117ab3 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -23,7 +23,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; diff --git a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java index 657e9353c6..cca5e22bf7 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Dimension.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Dimension.java @@ -1,16 +1,10 @@ package gregtech.api.objects; -import java.util.ArrayList; -import java.util.Random; -import java.util.Set; - import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; - -import gregtech.api.enums.GT_Values; import net.minecraftforge.common.config.ConfigCategory; -import net.minecraftforge.common.config.Configuration; -import net.minecraftforge.fluids.Fluid; + +import java.util.Random; public class GT_UO_Dimension { diff --git a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java index c566affe41..68ad9cfca7 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java +++ b/src/main/java/gregtech/api/objects/GT_UO_DimensionList.java @@ -2,9 +2,6 @@ package gregtech.api.objects; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; - -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.common.config.Configuration; diff --git a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java index 398717b5b6..81d1387e12 100644 --- a/src/main/java/gregtech/api/objects/GT_UO_Fluid.java +++ b/src/main/java/gregtech/api/objects/GT_UO_Fluid.java @@ -1,14 +1,11 @@ package gregtech.api.objects; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Random; - -import gregtech.api.enums.GT_Values; import net.minecraftforge.common.config.ConfigCategory; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; +import java.util.Random; + public class GT_UO_Fluid { public String Registry = "null"; public int MaxAmount = 0; diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index af667eb4d5..dbb6bd7e76 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -2,13 +2,11 @@ package gregtech.api.util; import cofh.api.transport.IItemDuct; import cpw.mods.fml.common.FMLCommonHandler; -import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; import gregtech.api.enums.SubTag; import gregtech.api.events.BlockScanningEvent; import gregtech.api.interfaces.IDebugableBlock; @@ -18,9 +16,7 @@ import gregtech.api.items.GT_EnergyArmor_Item; import gregtech.api.items.GT_Generic_Item; import gregtech.api.net.GT_Packet_Sound; import gregtech.api.objects.GT_ItemStack; -import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.ItemData; -import gregtech.api.objects.XSTR; import gregtech.api.threads.GT_Runnable_Sound; import gregtech.common.GT_Proxy; import ic2.api.recipe.IRecipeInput; @@ -56,11 +52,8 @@ import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.WorldServer; -import net.minecraft.world.chunk.Chunk; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; @@ -78,7 +71,6 @@ import java.util.Map.Entry; import static gregtech.api.enums.GT_Values.*; import static gregtech.common.GT_Proxy.GTPOLLUTION; -import static gregtech.common.GT_Proxy.dimensionWiseChunkData; import static gregtech.common.GT_UndergroundOil.undergroundOil; /** diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java index fa14abf03d..bc44095510 100644 --- a/src/main/java/gregtech/common/GT_Client.java +++ b/src/main/java/gregtech/common/GT_Client.java @@ -11,13 +11,11 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.tileentity.ICoverable; import gregtech.api.interfaces.tileentity.ITurnable; import gregtech.api.metatileentity.BaseMetaPipeEntity; -import gregtech.api.objects.GT_FluidStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_PlayedSound; import gregtech.api.util.GT_Recipe; @@ -33,7 +31,6 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatFileWriter; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChatComponentText; import net.minecraft.world.World; import net.minecraftforge.client.event.DrawBlockHighlightEvent; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java index 0120f2c353..cfdd39cb8d 100644 --- a/src/main/java/gregtech/common/GT_Pollution.java +++ b/src/main/java/gregtech/common/GT_Pollution.java @@ -13,12 +13,12 @@ import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.event.world.WorldEvent; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import static gregtech.common.GT_Proxy.*; diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index f66a77261f..5a8fa2cc50 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1,13 +1,7 @@ package gregtech.common; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.IFuelHandler; -import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.ModContainer; -import cpw.mods.fml.common.ProgressManager; +import cpw.mods.fml.common.*; import cpw.mods.fml.common.eventhandler.Event.Result; -import cpw.mods.fml.common.eventhandler.EventBus; -import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.FMLNetworkEvent; @@ -24,20 +18,12 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.objects.GT_Fluid; -import gregtech.api.objects.GT_FluidStack; -import gregtech.api.objects.GT_UO_DimensionList; -import gregtech.api.objects.ItemData; -import gregtech.api.objects.MaterialStack; +import gregtech.api.objects.*; import gregtech.api.util.*; import gregtech.common.entities.GT_Entity_Arrow; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.items.armor.*; -import gregtech.common.items.armor.gui.ContainerBasicArmor; -import gregtech.common.items.armor.gui.ContainerElectricArmor1; -import gregtech.common.items.armor.gui.GuiElectricArmor1; -import gregtech.common.items.armor.gui.GuiModularArmor; -import gregtech.common.items.armor.gui.InventoryArmor; +import gregtech.common.items.armor.ModularArmor_Item; +import gregtech.common.items.armor.gui.*; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; @@ -61,7 +47,6 @@ import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; import net.minecraft.world.gen.feature.WorldGenMinable; -import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.EntityJoinWorldEvent; @@ -72,7 +57,6 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.ChunkDataEvent; -import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java index bc9a1331b1..c07729aaaa 100644 --- a/src/main/java/gregtech/common/GT_UndergroundOil.java +++ b/src/main/java/gregtech/common/GT_UndergroundOil.java @@ -4,18 +4,14 @@ import gregtech.GT_Mod; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_UO_Fluid; import gregtech.api.objects.XSTR; -import gregtech.common.GT_Proxy; import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import java.util.HashMap; -import static gregtech.api.util.GT_Utility.getScaleCoordinates; import static gregtech.common.GT_Proxy.*; /** diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java index 8d762a0d02..2fa8f27307 100644 --- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java +++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java @@ -2,7 +2,6 @@ package gregtech.common; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java index 539ec1c746..334097c729 100644 --- a/src/main/java/gregtech/common/GT_Worldgenerator.java +++ b/src/main/java/gregtech/common/GT_Worldgenerator.java @@ -3,7 +3,6 @@ package gregtech.common; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; -import gregtech.api.enums.GT_Values; import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Log; import gregtech.api.world.GT_Worldgen; diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index d7a47c0bb6..05caf4cb6a 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -14,13 +14,10 @@ import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import ic2.core.block.EntityIC2Explosive; -import ic2.core.block.EntityItnt; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.boss.EntityWither; import net.minecraft.entity.item.EntityTNTPrimed; diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java index 2b65e36994..9b9e426bc3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java @@ -1,23 +1,11 @@ package gregtech.common.covers; -import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.interfaces.tileentity.IMachineProgress; -import gregtech.api.objects.ItemData; import gregtech.api.util.GT_CoverBehavior; -import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidTankInfo; -import net.minecraftforge.fluids.IFluidContainerItem; -import net.minecraftforge.fluids.IFluidHandler; +import net.minecraftforge.fluids.*; public class GT_Cover_Fluidfilter diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java index a99bea0c0e..b2d2c58b84 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java @@ -1,20 +1,10 @@ package gregtech.common.items; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.SubTag; import gregtech.api.items.GT_MetaGenerated_Item_X32; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import ic2.core.IC2; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class GT_MetaGenerated_Item_03 extends GT_MetaGenerated_Item_X32 { diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java index 7c8100db62..8ecc5766ba 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java +++ b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java @@ -1,16 +1,9 @@ package gregtech.common.items.armor; -import cpw.mods.fml.common.Loader; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.objects.ItemData; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; -import thaumcraft.api.nodes.IRevealer; public class ArmorCalculation { public static float[] calculateArmor(ItemStack[] parts) { diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java index 00ec76aeea..52265a2b33 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorData.java +++ b/src/main/java/gregtech/common/items/armor/ArmorData.java @@ -1,18 +1,6 @@ package gregtech.common.items.armor; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Random; - -import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; import gregtech.common.items.armor.components.ArmorComponent; import gregtech.common.items.armor.components.StatType; import gregtech.common.items.armor.gui.ContainerBasicArmor; @@ -21,12 +9,13 @@ import gregtech.common.items.armor.gui.InventoryArmor; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.util.DamageSource; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.NumberFormat; +import java.util.*; + public class ArmorData { public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots; diff --git a/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java b/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java index 5d8bfd82f0..d310fa4c96 100644 --- a/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java +++ b/src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java @@ -1,12 +1,7 @@ package gregtech.common.items.armor; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.world.World; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; public class ElectricModularArmor1 extends ModularArmor_Item{ diff --git a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java index d2e51e67f1..80e28744c0 100644 --- a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java +++ b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java @@ -1,5 +1,11 @@ package gregtech.common.items.armor; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Optional; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enums.GT_Values; import gregtech.common.items.armor.components.StatType; @@ -7,20 +13,6 @@ import gregtech.common.items.armor.gui.ContainerBasicArmor; import gregtech.common.items.armor.gui.ContainerModularArmor; import gregtech.common.items.armor.gui.InventoryArmor; import ic2.core.IC2; - -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Random; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Optional; -import thaumcraft.api.IGoggles; -import thaumcraft.api.nodes.IRevealer; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.settings.GameSettings; @@ -29,21 +21,23 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; -import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.ISpecialArmor; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.event.entity.living.LivingFallEvent; +import thaumcraft.api.IGoggles; +import thaumcraft.api.nodes.IRevealer; + +import java.util.LinkedList; +import java.util.List; +import java.util.Random; @Optional.InterfaceList(value = { @Optional.Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft", striprefs = true), @Optional.Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft", striprefs = true) }) diff --git a/src/main/java/gregtech/common/items/armor/Vector3.java b/src/main/java/gregtech/common/items/armor/Vector3.java index 590f544546..2f79ff4c69 100644 --- a/src/main/java/gregtech/common/items/armor/Vector3.java +++ b/src/main/java/gregtech/common/items/armor/Vector3.java @@ -1,8 +1,7 @@ package gregtech.common.items.armor; -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; @@ -10,8 +9,10 @@ import net.minecraft.util.Vec3; import org.lwjgl.opengl.GL11; import org.lwjgl.util.vector.Vector3f; import org.lwjgl.util.vector.Vector4f; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; + +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; public class Vector3 { public static Vector3 zero = new Vector3(); diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java index 1d65f973ed..ea2f0184dd 100644 --- a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java @@ -1,20 +1,15 @@ package gregtech.common.items.armor.components; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; import gregtech.api.GregTech_API; -import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.items.armor.ArmorData; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; +import java.util.HashMap; +import java.util.Map; + public abstract class ArmorComponent implements IArmorComponent { public ItemStack mStack; public String mOreDict; diff --git a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java index d6d37fd935..bea0e2b5b4 100644 --- a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java +++ b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java @@ -6,7 +6,6 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; -import ic2.core.Ic2Items; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; diff --git a/src/main/java/gregtech/common/items/armor/components/StatType.java b/src/main/java/gregtech/common/items/armor/components/StatType.java index 80fe5cc6d4..aacb997f9b 100644 --- a/src/main/java/gregtech/common/items/armor/components/StatType.java +++ b/src/main/java/gregtech/common/items/armor/components/StatType.java @@ -1,9 +1,5 @@ package gregtech.common.items.armor.components; -import java.util.List; - -import net.minecraftforge.fluids.FluidStack; - public enum StatType { ELECTRIC, ELECTRIC2, diff --git a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java index 0258a3eb3c..1f63afac5e 100644 --- a/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java @@ -4,9 +4,7 @@ import gregtech.common.items.armor.ArmorData; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java index 8f1aef56d1..0e17a82ee8 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync.java @@ -1,14 +1,5 @@ package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java index 75c3c6d363..6882e67268 100644 --- a/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java +++ b/src/main/java/gregtech/common/items/armor/gui/FluidSync2.java @@ -1,15 +1,5 @@ package gregtech.common.items.armor.gui; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.WorldServer; -import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -import com.google.common.base.Charsets; -import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java index dec19e0308..b1e08bc708 100644 --- a/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java +++ b/src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java @@ -1,11 +1,14 @@ package gregtech.common.items.armor.gui; -import gregtech.api.enums.GT_Values; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_Network; -import gregtech.common.items.armor.ArmorData; import gregtech.common.items.armor.components.StatType; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Slot; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -14,23 +17,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; -import org.lwjgl.opengl.GL11; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Items; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidContainerItem; - @SideOnly(Side.CLIENT) public class GuiElectricArmor1 extends GuiContainer { ContainerModularArmor cont; diff --git a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java index ae2ba88013..9d552f4d2c 100644 --- a/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java @@ -1,19 +1,16 @@ package gregtech.common.items.armor.gui; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.items.armor.components.StatType; - -import java.util.ArrayList; -import java.util.List; - -import org.lwjgl.opengl.GL11; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.items.armor.components.StatType; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +import java.util.ArrayList; +import java.util.List; @SideOnly(Side.CLIENT) public class GuiModularArmor extends GuiContainer { diff --git a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java index ff77584314..2a4ca46f4a 100644 --- a/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java +++ b/src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java @@ -1,20 +1,16 @@ package gregtech.common.items.armor.gui; -import gregtech.api.util.GT_Utility; import gregtech.common.items.armor.ArmorData; import gregtech.common.items.armor.ModularArmor_Item; - -import java.util.Random; - import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.oredict.OreDictionary; +import java.util.Random; + public class InventoryArmor implements IInventory { public ItemStack[] parts; diff --git a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java index a3d2bdaf09..63e8873df9 100644 --- a/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java +++ b/src/main/java/gregtech/common/items/armor/gui/SlotFluid.java @@ -1,16 +1,9 @@ package gregtech.common.items.armor.gui; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import scala.reflect.internal.Trees.This; -import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidRegistry; public class SlotFluid extends Slot{ diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java index 0b9dcdf3c2..bd866ba994 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Fluid.java @@ -5,7 +5,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaBase_Item; import gregtech.api.items.GT_MetaGenerated_Tool; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java index c725634030..70f85673c4 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -14,7 +14,6 @@ import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 8aef783b6b..352a9c66a3 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -14,7 +14,6 @@ import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index adc1a0b152..71827cc4e2 100644 --- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -14,7 +14,6 @@ import gregtech.common.GT_Pollution; import gregtech.common.gui.GT_Container_Boiler; import gregtech.common.gui.GT_GUIContainer_Boiler; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.world.ChunkPosition; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidHandler; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java index 6f1a9e32e3..2b397329ce 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java @@ -1,25 +1,15 @@ package gregtech.common.tileentities.machines.basic; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; 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_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.GT_UndergroundOil; @@ -35,7 +25,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.ChunkPosition; import net.minecraftforge.fluids.FluidStack; -import java.util.ArrayList; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java index beb2e2b9b3..bbf6be7519 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -18,7 +18,6 @@ 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 { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java index 3b1fcab67c..8b74e6c2fa 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java @@ -1,14 +1,12 @@ package gregtech.common.tileentities.machines.basic; import gregtech.api.enums.ConfigCategories; -import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Config; import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_Teleporter; @@ -22,13 +20,11 @@ import net.minecraft.entity.boss.EntityDragonPart; import net.minecraft.entity.effect.EntityWeatherEffect; import net.minecraft.entity.item.*; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.entity.projectile.EntityFireball; import net.minecraft.entity.projectile.EntityFishHook; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.init.Blocks; import net.minecraft.inventory.IInventory; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -37,6 +33,7 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.fluids.FluidStack; + import static gregtech.api.enums.GT_Values.V; public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index f63c764c52..c46ad5e7bc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -22,7 +22,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 2a3c6011d6..a8fea99f9a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -18,8 +18,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidRegistry; - import java.util.ArrayList; import java.util.Collection; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index cd7f6e08f6..e8f00cf535 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -19,8 +19,6 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.ArrayUtils; -import static gregtech.api.enums.GT_Values.V; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java index 472f388202..ee2937bd26 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Compressor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java index c5d4b4b23a..6773499b3c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Compressor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java index 169121908b..396dc7857b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Extractor_Bronze extends GT_MetaTileEntity_BasicMachine_Bronze { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java index 260d675c68..0d737be386 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java @@ -8,11 +8,9 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.ItemStack; public class GT_MetaTileEntity_Extractor_Steel extends GT_MetaTileEntity_BasicMachine_Steel { diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index 573af14373..07e2c4722c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -8,7 +8,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 759d2a1de1..3ac197ee4d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -8,7 +8,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Steel; import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index cf92dbcb46..bb4d700ff7 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -19,7 +19,6 @@ import gregtech.api.util.GT_Recipe; 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; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java index 63b4c50473..f28aca2b40 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java @@ -1,9 +1,7 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; -import gregtech.api.enums.OreDictNames; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java index 6d5e5335ee..572ce9d2b1 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrafting.java @@ -1,6 +1,9 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.*; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java index ba4264f7dd..31cd0d5568 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCrushedOre.java @@ -1,6 +1,5 @@ package gregtech.loaders.oreprocessing; -import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java index ce46671fdb..ae3e28b0b9 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingFoil.java @@ -4,7 +4,6 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.enums.SubTag; import gregtech.api.interfaces.IOreRecipeRegistrator; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_OreDictUnificator; diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java index 9a68738b05..e02359541d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStick.java @@ -1,10 +1,6 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.GT_Values; -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.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index db3542abfc..f021f37ec4 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -1,5 +1,6 @@ package gregtech.loaders.postload; +import codechicken.nei.api.API; import com.dreammaster.gthandler.CustomItemList; import cpw.mods.fml.common.Loader; import gregtech.GT_Mod; @@ -26,8 +27,6 @@ import java.util.Arrays; import java.util.Iterator; import java.util.Map; -import codechicken.nei.api.API; - public class GT_MachineRecipeLoader implements Runnable { private final MaterialStack[][] mAlloySmelterList = {{new MaterialStack(Materials.Tetrahedrite, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 3L)}, {new MaterialStack(Materials.Tetrahedrite, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 3L)}, {new MaterialStack(Materials.Copper, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 4L)}, {new MaterialStack(Materials.Copper, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 4L)}, {new MaterialStack(Materials.Copper, 1L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Cupronickel, 2L)}, {new MaterialStack(Materials.Copper, 1L), new MaterialStack(Materials.Redstone, 4L), new MaterialStack(Materials.RedAlloy, 1L)}, {new MaterialStack(Materials.AnnealedCopper, 3L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.Bronze, 4L)}, {new MaterialStack(Materials.AnnealedCopper, 3L), new MaterialStack(Materials.Zinc, 1L), new MaterialStack(Materials.Brass, 4L)}, {new MaterialStack(Materials.AnnealedCopper, 1L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Cupronickel, 2L)}, {new MaterialStack(Materials.AnnealedCopper, 1L), new MaterialStack(Materials.Redstone, 4L), new MaterialStack(Materials.RedAlloy, 1L)}, {new MaterialStack(Materials.Iron, 1L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.TinAlloy, 2L)}, {new MaterialStack(Materials.WroughtIron, 1L), new MaterialStack(Materials.Tin, 1L), new MaterialStack(Materials.TinAlloy, 2L)}, {new MaterialStack(Materials.Iron, 2L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Invar, 3L)}, {new MaterialStack(Materials.WroughtIron, 2L), new MaterialStack(Materials.Nickel, 1L), new MaterialStack(Materials.Invar, 3L)}, {new MaterialStack(Materials.Tin, 9L), new MaterialStack(Materials.Antimony, 1L), new MaterialStack(Materials.SolderingAlloy, 10L)}, {new MaterialStack(Materials.Lead, 4L), new MaterialStack(Materials.Antimony, 1L), new MaterialStack(Materials.BatteryAlloy, 5L)}, {new MaterialStack(Materials.Gold, 1L), new MaterialStack(Materials.Silver, 1L), new MaterialStack(Materials.Electrum, 2L)}, {new MaterialStack(Materials.Magnesium, 1L), new MaterialStack(Materials.Aluminium, 2L), new MaterialStack(Materials.Magnalium, 3L)}, {new MaterialStack(Materials.Silver, 1L), new MaterialStack(Materials.Nikolite, 4L), new MaterialStack(Materials.BlueAlloy, 1L)}}; private final static String aTextAE = "appliedenergistics2"; private final static String aTextAEMM = "item.ItemMultiMaterial"; private final static String aTextForestry = "Forestry"; diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index f6b6d19810..cd9469850a 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -29,7 +29,9 @@ import net.minecraftforge.fluids.FluidStack; import org.lwjgl.opengl.GL11; import java.awt.*; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; import java.util.List; public class GT_NEI_DefaultHandler -- cgit