aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/api/objects/GT_FluidStack.java5
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java2
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java4
-rw-r--r--src/main/java/gregtech/common/items/armor/ModularArmor_Item.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java2
5 files changed, 17 insertions, 8 deletions
diff --git a/src/main/java/gregtech/api/objects/GT_FluidStack.java b/src/main/java/gregtech/api/objects/GT_FluidStack.java
index f4aad8ed5e..2ed1ed0583 100644
--- a/src/main/java/gregtech/api/objects/GT_FluidStack.java
+++ b/src/main/java/gregtech/api/objects/GT_FluidStack.java
@@ -69,4 +69,9 @@ public class GT_FluidStack extends FluidStack {
}
return new GT_FluidStack(this);
}
+
+ @Override
+ public String toString() {
+ return String.format("GT_FluidStack: %s x %s, ID:%s", this.amount, this.getFluid().getName(), this.getFluidID());
+ }
} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java
index 62c8714807..daa1b67069 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);
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/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_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java
index e82fa34fa0..e0d0ee46d1 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
@@ -109,7 +109,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
}
}
}
- FluidStack[] tFluids = Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tInputList.size()]), 0, 1);
+ FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
if (tInputList.size() > 0) {
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));