diff options
Diffstat (limited to 'src/main/java/gregtech/common')
8 files changed, 30 insertions, 17 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 703be0d9ad..c60a0bdb13 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -197,6 +197,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { public boolean mAprilFool = false; public boolean mCropNeedBlock = true; public boolean mReenableSimplifiedChemicalRecipes = false; + public boolean mAMHInteraction = true; public GT_Proxy() { GameRegistry.registerFuelHandler(this); 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 9c61f4feee..d76a05117b 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -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; } 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 3af0a7de99..371928ec58 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;
}
diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java index ee314c8e31..6ee6d790db 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); 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..761f263d79 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); @@ -266,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; 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 3e962496e9..09eb4d72ab 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<tFluids.length;i++){ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{}); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index e0d0ee46d1..0f07a3e743 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -91,7 +91,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace }
}
}
- ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[tInputList.size()]), 0, 2);
+ ItemStack[] tInputs = tInputList.toArray(new ItemStack[tInputList.size()]);
ArrayList<FluidStack> 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 118a04091a..d91b7efcb5 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))) {
|