From 3b681b69d50cddd8a9efbb677c51bf8d2df389db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Wed, 10 May 2017 19:56:36 +0200 Subject: [PATCH 01/18] Changed multiblocks so they all consider all inputs for finding recipes --- .../machines/multi/GT_MetaTileEntity_DistillationTower.java | 2 +- .../machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java | 2 +- .../machines/multi/GT_MetaTileEntity_ImplosionCompressor.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 22dd01c7..78f247bb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -90,7 +90,7 @@ public class GT_MetaTileEntity_DistillationTower long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); - FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size()); + FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); if (tFluids.length > 0) { for(int i = 0;i tFluidList = getStoredFluids(); int tFluidList_sS = tFluidList.size(); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index 81e9485e..090b8432 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -83,7 +83,7 @@ public class GT_MetaTileEntity_ImplosionCompressor } } } - ItemStack[] tInputs = (ItemStack[]) Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2); + ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]); if (tInputList.size() > 0) { GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs); if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) { From 4e3ed071dc118de59128ffb03356377c3152e5a8 Mon Sep 17 00:00:00 2001 From: Yura Date: Tue, 16 May 2017 16:17:01 +0300 Subject: [PATCH 02/18] Auto Maintenance Hatch tweaks Fixed #958 and #1053, allowed robots\pipes to interact with it. --- .../GT_MetaTileEntity_Hatch_Maintenance.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 3bcd29a6..eb9b6954 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,8 +23,8 @@ 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.Arrays; import java.util.List; public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch { @@ -99,7 +99,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public boolean isValidSlot(int aIndex) { - return false; + return mAuto; } @Override @@ -128,6 +128,11 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity); } + public void updateSlots() { + for (int i = 0; i < mInventory.length; i++) + if (mInventory[i] != null && mInventory[i].stackSize <= 0) mInventory[i] = null; + } + public boolean autoMaintainance() { boolean tSuccess = true; ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)}; @@ -174,6 +179,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch this.mSoftHammer = true; this.mSolderingTool = true; this.mWrench = true; + updateSlots() return true; } return false; @@ -208,11 +214,11 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; + return mAuto; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return false; + return mAuto; } } From bc7eaaa76280cb5bef0ed420e3a3f20ebc345ee8 Mon Sep 17 00:00:00 2001 From: Yuriy Shnitkovskiy Date: Tue, 16 May 2017 19:49:46 +0300 Subject: [PATCH 03/18] Added config for automation --- src/main/java/gregtech/GT_Mod.java | 2 ++ .../GT_MetaTileEntity_Hatch_Maintenance.java | 8 ++++---- src/main/java/gregtech/common/GT_Proxy.java | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 7b6c5baf..7f6a90ce 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -239,6 +239,7 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mNerfedCrops = tMainConfig.get(aTextGeneral, "NerfCrops", true).getBoolean(true); gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true); gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true); + gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true); gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true); gregtechproxy.mImmersiveEngineeringRecipes = tMainConfig.get(aTextGeneral, "EnableImmersiveEngineeringRSupport", true).getBoolean(true); @@ -258,6 +259,7 @@ public class GT_Mod implements IGT_Mod { Calendar now = Calendar.getInstance(); gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) == 1); gregtechproxy.mCropNeedBlock = tMainConfig.get("general", "CropNeedBlockBelow", true).getBoolean(true); + gregtechproxy.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", 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/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java index eb9b6954..608bec11 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 @@ -99,7 +99,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public boolean isValidSlot(int aIndex) { - return mAuto; + return mAuto && GT_Mod.gregtechproxy.mAMHInteraction; } @Override @@ -179,7 +179,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch this.mSoftHammer = true; this.mSolderingTool = true; this.mWrench = true; - updateSlots() + updateSlots(); return true; } return false; @@ -214,11 +214,11 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return mAuto; + return mAuto && GT_Mod.gregtechproxy.mAMHInteraction; } @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return mAuto; + return mAuto && GT_Mod.gregtechproxy.mAMHInteraction; } } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 91033a1f..e7fcd1e0 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -196,6 +196,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mLowGravProcessing = false; public boolean mAprilFool = false; public boolean mCropNeedBlock = true; + public boolean mAMHInteraction = true; public GT_Proxy() { GameRegistry.registerFuelHandler(this); From c0f8bafc604ea5b55e2a6cfbcb13dbb58ca0e450 Mon Sep 17 00:00:00 2001 From: Yuriy Shnitkovskiy Date: Tue, 16 May 2017 19:52:04 +0300 Subject: [PATCH 04/18] I guess I wanted to put it here for some reason --- src/main/java/gregtech/GT_Mod.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 7f6a90ce..fd208d5d 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -239,7 +239,6 @@ public class GT_Mod implements IGT_Mod { gregtechproxy.mNerfedCrops = tMainConfig.get(aTextGeneral, "NerfCrops", true).getBoolean(true); gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true); gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true); - gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true); gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true); gregtechproxy.mImmersiveEngineeringRecipes = tMainConfig.get(aTextGeneral, "EnableImmersiveEngineeringRSupport", true).getBoolean(true); From d805ce46136dcc5206e5af3f5ad9a9e64d1167d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Thu, 18 May 2017 19:22:06 +0200 Subject: [PATCH 05/18] Fixed MaterialStack String representations sometimes missing brackets --- src/main/java/gregtech/api/objects/MaterialStack.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java index 6066d3cf..df087a22 100644 --- a/src/main/java/gregtech/api/objects/MaterialStack.java +++ b/src/main/java/gregtech/api/objects/MaterialStack.java @@ -1,6 +1,7 @@ package gregtech.api.objects; import gregtech.api.enums.Materials; +import gregtech.api.util.GT_Log; public class MaterialStack implements Cloneable { public long mAmount; @@ -33,9 +34,10 @@ public class MaterialStack implements Cloneable { @Override public String toString() { String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = ""; + System.out.println("EPIK "+mMaterial.mDefaultLocalName+" "+mMaterial.mElement); if (mAmount > 1) { temp4 = String.valueOf(mAmount); - if (mMaterial.mMaterialList.size() > 1) { + if (mMaterial.mMaterialList.size() > 1 || (mMaterial.mMaterialList.size() == 1 && mMaterial.mElement == null)) { temp1 = "("; temp3 = ")"; } From 32db407391507ec85556af36db021d848f0d8c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Thu, 18 May 2017 19:26:30 +0200 Subject: [PATCH 06/18] Removed debugging prints accidentally left in the previous commit --- src/main/java/gregtech/api/objects/MaterialStack.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java index df087a22..62adefa3 100644 --- a/src/main/java/gregtech/api/objects/MaterialStack.java +++ b/src/main/java/gregtech/api/objects/MaterialStack.java @@ -1,7 +1,6 @@ package gregtech.api.objects; import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Log; public class MaterialStack implements Cloneable { public long mAmount; @@ -34,7 +33,6 @@ public class MaterialStack implements Cloneable { @Override public String toString() { String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = ""; - System.out.println("EPIK "+mMaterial.mDefaultLocalName+" "+mMaterial.mElement); if (mAmount > 1) { temp4 = String.valueOf(mAmount); if (mMaterial.mMaterialList.size() > 1 || (mMaterial.mMaterialList.size() == 1 && mMaterial.mElement == null)) { From aa4839ebf64d0b21134ef1cfb78d8d4af232b4aa Mon Sep 17 00:00:00 2001 From: antifluxfield Date: Sat, 27 May 2017 14:46:03 +0800 Subject: [PATCH 07/18] Update GT_Cover_PlayerDetector.java --- .../java/gregtech/common/covers/GT_Cover_PlayerDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java index 9c61f4fe..c9df9f14 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -34,7 +34,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { playerDetected = true; break; } - if (tEntity.getDisplayName().equalsIgnoreCase(placer)) { + if (!tEntity.getDisplayName().equalsIgnoreCase(placer)) { if (aCoverVariable == 1) { playerDetected = true; break; From c42c2facb1379c30e5642738bf1dd42cd9f16282 Mon Sep 17 00:00:00 2001 From: antifluxfield Date: Sat, 27 May 2017 14:48:39 +0800 Subject: [PATCH 08/18] Update GT_Cover_PlayerDetector.java --- .../gregtech/common/covers/GT_Cover_PlayerDetector.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java index c9df9f14..d76a0511 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -34,7 +34,7 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { playerDetected = true; break; } - if (!tEntity.getDisplayName().equalsIgnoreCase(placer)) { + if (tEntity.getDisplayName().equalsIgnoreCase(placer)) { if (aCoverVariable == 1) { playerDetected = true; break; @@ -57,8 +57,8 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { if(aCoverVariable <0){aCoverVariable = 2;} switch(aCoverVariable) { case 0: GT_Utility.sendChatToPlayer(aPlayer, "Emit if any Player is close"); break; - case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); break; - case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); break; + case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); break; + case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); break; } return aCoverVariable; } From 40304ed2f583e6d6a99a0115056d2135b510602d Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 18:09:30 +0200 Subject: [PATCH 09/18] Catch login armor crash --- build.properties | 2 +- .../java/gregtech/common/items/armor/ModularArmor_Item.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.properties b/build.properties index ba078cec..f4dcfcfa 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.29 +gt.version=5.09.30pre1 ae2.version=rv2-beta-33 applecore.version=1.7.10-1.2.1+107.59407 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 d2e51e67..ef961b94 100644 --- a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java +++ b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java @@ -89,6 +89,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg data = fillArmorData((EntityPlayer) player, armor); } if (player != null && armor != null && source != null) { + try{ double tmp = 0.0d; if (source.isMagicDamage()) { tmp = data.mStat.get(StatType.MAGICDEFENCE); @@ -127,6 +128,9 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg tmp = 1.0f - ((1.0f - tmp) / 2.0f); } return new ISpecialArmor.ArmorProperties(0, data.getBaseAbsorptionRatio() * tmp, 1000); + }catch(Exception e){System.err.println(e); + return new ISpecialArmor.ArmorProperties(0, 0, 0); + } } else { return new ISpecialArmor.ArmorProperties(0, 0, 0); From c28a8ceb7885c89d5812cc9ef30f3e7324078d9b Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 18:10:11 +0200 Subject: [PATCH 10/18] Catch broken items on recipe move --- src/main/java/gregtech/api/util/GT_ModHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 62c87148..daa1b670 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -682,8 +682,8 @@ public class GT_ModHandler { for (ItemStack tStack : ((IRecipeInput) tRecipe.getKey()).getInputs()) { if (GT_Utility.isStackValid(tStack)) { if (aAddGTRecipe && (aGTRecipeMap.findRecipe(null, false, Long.MAX_VALUE, null, tStack) == null)) { + try{ if (aExcludeGTIC2Items && ((tStack.getUnlocalizedName().contains("gt.metaitem.01") || tStack.getUnlocalizedName().contains("gt.blockores") || tStack.getUnlocalizedName().contains("ic2.itemCrushed") || tStack.getUnlocalizedName().contains("ic2.itemPurifiedCrushed")))) continue; - try{ switch (aGTRecipeMap.mUnlocalizedName) { case "gt.recipe.macerator": aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); From 1af33411d201a2170a845e8f10d78260f5cad139 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 18:53:56 +0200 Subject: [PATCH 11/18] Disable switching armor gui because of broken sync --- .../gregtech/common/items/armor/ModularArmor_Item.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ef961b94..761f263d 100644 --- a/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java +++ b/src/main/java/gregtech/common/items/armor/ModularArmor_Item.java @@ -270,10 +270,10 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg } aPlayer.openGui(GT_Values.GT, openGuiNr+(typeMod), aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ); } - if(data.helmet!=null&&data.helmet.openGui){data.helmet.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+400, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} - if(data.chestplate!=null&&data.chestplate.openGui){data.chestplate.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+300, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} - if(data.leggings!=null&&data.leggings.openGui){data.leggings.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+200, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} - if(data.boots!=null&&data.boots.openGui){data.boots.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+100, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} +// if(data.helmet!=null&&data.helmet.openGui){data.helmet.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+400, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} +// if(data.chestplate!=null&&data.chestplate.openGui){data.chestplate.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+300, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} +// if(data.leggings!=null&&data.leggings.openGui){data.leggings.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+200, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} +// if(data.boots!=null&&data.boots.openGui){data.boots.openGui=false;aPlayer.openGui(GT_Values.GT, openGuiNr+100, aWorld, (int) aPlayer.posX, (int) aPlayer.posY, (int) aPlayer.posZ);} // Night Vision if (timer >= 200) { timer = 0; From b418fede093d0cec311113651ae170997168e896 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 18:59:32 +0200 Subject: [PATCH 12/18] Change Automaintain default --- src/main/java/gregtech/GT_Mod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index fd208d5d..4a4f0963 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -258,7 +258,7 @@ public class GT_Mod implements IGT_Mod { Calendar now = Calendar.getInstance(); gregtechproxy.mAprilFool = GregTech_API.sSpecialFile.get(ConfigCategories.general, "AprilFool", now.get(Calendar.MONTH) == Calendar.APRIL && now.get(Calendar.DAY_OF_MONTH) == 1); gregtechproxy.mCropNeedBlock = tMainConfig.get("general", "CropNeedBlockBelow", true).getBoolean(true); - gregtechproxy.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", true).getBoolean(true); + gregtechproxy.mAMHInteraction = tMainConfig.get("general", "AllowAutoMaintenanceHatchInteraction", false).getBoolean(false); 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); From 09e0361990e5842111bd062fce93c9b843b77bda Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 21:11:34 +0200 Subject: [PATCH 13/18] Add recipe for very heavy oil --- .../java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 1daeb77e..e5376e4a 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -651,7 +651,8 @@ if(Loader.isModLoaded("Railcraft")){ GT_Values.RA.addUniversalDistillationRecipe(Materials.OilHeavy.getFluid(100), new FluidStack[]{Materials.SulfuricGas.getGas(60), Materials.SulfuricNaphtha.getFluid(15), Materials.SulfuricLightFuel.getFluid(45), Materials.SulfuricHeavyFuel.getFluid(250)}, null, 20, 288); GT_Values.RA.addUniversalDistillationRecipe(Materials.CrackedLightFuel.getFluid(192), new FluidStack[]{Materials.Gas.getGas(480), Materials.Naphtha.getFluid(60), Materials.HeavyFuel.getFluid(20), new FluidStack(ItemList.sToluene,20)}, null, 16, 120); GT_Values.RA.addUniversalDistillationRecipe(Materials.CrackedHeavyFuel.getFluid(192), new FluidStack[]{Materials.Gas.getGas(160), Materials.Naphtha.getFluid(20), Materials.LightFuel.getFluid(80), new FluidStack(ItemList.sToluene,60), Materials.Lubricant.getFluid(10)}, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.HydratedCoal, 1L), 16, 120); - + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new FluidStack(ItemList.sOilExtraHeavy,10), Materials.OilHeavy.getFluid(15), 16, 24, false); + GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), Materials.HeavyFuel.getFluid(10L), new FluidStack(ItemList.sToluene,4), 16, 24, false); GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new FluidStack(ItemList.sToluene,30), Materials.LightFuel.getFluid(30L), 16, 24, false); GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L, new Object[0]), new FluidStack(ItemList.sToluene,100), ItemList.GelledToluene.get(1, new Object[0]), 100, 16); From 4c17c2beffdaa88b316ab2797e18d54c8a27cf62 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 21:37:26 +0200 Subject: [PATCH 14/18] Make Internal wireless redstone work as machine controller --- .../common/covers/GT_Cover_RedstoneReceiverInternal.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java index 3af0a7de..371928ec 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneReceiverInternal.java @@ -2,10 +2,18 @@ package gregtech.common.covers; import gregtech.api.GregTech_API; import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IMachineProgress; public class GT_Cover_RedstoneReceiverInternal extends GT_Cover_RedstoneWirelessBase { public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + if (aTileEntity instanceof IMachineProgress) { + if (getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity) >0) + ((IMachineProgress) aTileEntity).enableWorking(); + else + ((IMachineProgress) aTileEntity).disableWorking(); + ((IMachineProgress) aTileEntity).setWorkDataValue(aInputRedstone); + } return aCoverVariable; } From 080c229e0970f474e57990112c8ca0667d12dcf8 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 21:37:50 +0200 Subject: [PATCH 15/18] fix #1041 --- .../java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java index 97b6f89c..9ac3228e 100644 --- a/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java @@ -436,6 +436,7 @@ public class GT_CraftingRecipeLoader implements Runnable { } if (GT_Mod.gregtechproxy.mNerfDustCrafting) { GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Electrum, 6L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Silver), OrePrefixes.dust.get(Materials.Gold)}); + GT_ModHandler.removeRecipeByOutput(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 1L)); GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Brass, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Zinc)}); GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Brass, 9L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Tetrahedrite), OrePrefixes.dust.get(Materials.Zinc)}); GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Bronze, 3L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.AnyCopper), OrePrefixes.dust.get(Materials.Tin)}); From b047ab56b2578aba23b0a4445e594396ced16dd1 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 21:42:32 +0200 Subject: [PATCH 16/18] Fix spelling #1043 --- src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 dacc42cc..baa5d23b 100644 --- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java +++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java @@ -339,7 +339,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements if (name.equals("gt.metatool.01.170") || name.equals("gt.metatool.01.172") || name.equals("gt.metatool.01.174") || name.equals("gt.metatool.01.176")) { aList.add(tOffset + 0, EnumChatFormatting.WHITE + "Durability: " + EnumChatFormatting.GREEN + (tMaxDamage - getToolDamage(aStack)) + " / " + tMaxDamage + EnumChatFormatting.GRAY); aList.add(tOffset + 1, EnumChatFormatting.WHITE + tMaterial.mDefaultLocalName + EnumChatFormatting.YELLOW + " lvl " + getHarvestLevel(aStack, "") + EnumChatFormatting.GRAY); - aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficency: " + EnumChatFormatting.BLUE + (50.0F + (10.0F * getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY); + aList.add(tOffset + 2, EnumChatFormatting.WHITE + "Turbine Efficiency: " + EnumChatFormatting.BLUE + (50.0F + (10.0F * getToolCombatDamage(aStack))) + EnumChatFormatting.GRAY); aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Steam flow: " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 1000) + EnumChatFormatting.GRAY + "L/sec"); aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Gas flow(EU burnvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 50) + EnumChatFormatting.GRAY + "EU/t"); aList.add(tOffset + 3, EnumChatFormatting.WHITE + "Optimal Plasma flow(Plasma energyvalue per tick): " + EnumChatFormatting.LIGHT_PURPLE + Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed * 2000) + EnumChatFormatting.GRAY + "EU/t"); From 94f858147728b2839ebddf9243e00488e4829357 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 21:52:58 +0200 Subject: [PATCH 17/18] Fix multiblock recipe search fix #1044 --- .../GT_MetaTileEntity_MultiBlockBase.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 3dd59126..5e06b743 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 @@ -641,11 +641,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ArrayList getStoredOutputs() { ArrayList rList = new ArrayList(); - for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { - if (isValidMetaTileEntity(tHatch)) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); - } - } +// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { +// if (isValidMetaTileEntity(tHatch)) { +// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1)); +// } +// } for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) { if (isValidMetaTileEntity(tHatch)) { for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) { @@ -669,12 +669,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ArrayList getStoredInputs() { ArrayList rList = new ArrayList(); - for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { - tHatch.mRecipeMap = getRecipeMap(); - if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) { - rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0)); - } - } +// for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) { +// tHatch.mRecipeMap = getRecipeMap(); +// if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) { +// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0)); +// } +// } for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) { tHatch.mRecipeMap = getRecipeMap(); if (isValidMetaTileEntity(tHatch)) { From 9a69e1978db321e8f1462dd982c5a199911ca334 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Wed, 31 May 2017 22:57:21 +0200 Subject: [PATCH 18/18] Fix comb processing recipes #1052 --- .../java/gregtech/common/items/ItemComb.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index ee314c8e..6ee6d790 100644 --- a/src/main/java/gregtech/common/items/ItemComb.java +++ b/src/main/java/gregtech/common/items/ItemComb.java @@ -187,15 +187,15 @@ public class ItemComb extends Item { if (ProcessingModSupport.aEnableGCMarsMats) addProcess(tComb, Materials.MeteoricIron, 100); tComb = getStackForType(CombType.STEEL); - addProcess(tComb, Materials.Iron, Materials.Steel, 100); - addProcess(tComb, Materials.Magnetite, Materials.Steel, 100); - addProcess(tComb, Materials.BrownLimonite, Materials.Steel, 100); - addProcess(tComb, Materials.YellowLimonite, Materials.Steel, 100); - addProcess(tComb, Materials.VanadiumMagnetite, Materials.VanadiumSteel, 100); - addProcess(tComb, Materials.BandedIron, Materials.Steel, 100); - addProcess(tComb, Materials.Pyrite, Materials.Steel, 100); + addProcess(tComb, Materials.Iron, Materials.Iron, 100); + addProcess(tComb, Materials.Magnetite, Materials.Magnetite, 100); + addProcess(tComb, Materials.BrownLimonite, Materials.BrownLimonite, 100); + addProcess(tComb, Materials.YellowLimonite, Materials.YellowLimonite, 100); + addProcess(tComb, Materials.VanadiumMagnetite, Materials.VanadiumMagnetite, 100); + addProcess(tComb, Materials.BandedIron, Materials.BandedIron, 100); + addProcess(tComb, Materials.Pyrite, Materials.Pyrite, 100); if (ProcessingModSupport.aEnableGCMarsMats) - addProcess(tComb, Materials.MeteoricIron, Materials.MeteoricSteel, 100); + addProcess(tComb, Materials.MeteoricIron, Materials.MeteoricIron, 100); addProcess(tComb, Materials.Molybdenite, 100); addProcess(tComb, Materials.Molybdenum, 100); tComb = getStackForType(CombType.NICKEL);