aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java6
-rw-r--r--src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java14
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java14
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java2
-rw-r--r--src/main/java/gregtech/api/objects/GT_FluidStack.java1
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java2
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java6
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java14
9 files changed, 34 insertions, 30 deletions
diff --git a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
index 6e3c6df6e1..0d5e70ff07 100644
--- a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
+++ b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
@@ -200,9 +200,9 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor {
if (tTargetChargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem)) {
tTargetChargeItem = null;
}
- if (tTargetDechargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem) || !(aStack == tTargetDechargeItem || GT_ModHandler.isChargerItem(tTargetDechargeItem))) {
- tTargetDechargeItem = null;
- }
+ /*if (tTargetDechargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem) || !(aStack == tTargetDechargeItem || GT_ModHandler.isChargerItem(tTargetDechargeItem))) {
+ tTargetDechargeItem = null;//not need in J2SE 6.0?
+ }*/
if (aPlayer.worldObj.isDaytime() && aPlayer.worldObj.canBlockSeeTheSky(MathHelper.floor_double(aPlayer.posX), MathHelper.floor_double(aPlayer.posY + 1), MathHelper.floor_double(aPlayer.posZ))) {
if ((mSpecials & 32) != 0 && tTargetChargeItem != null) {
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 455cfb14a5..66ee4ea1cb 100644
--- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
+++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
@@ -1,7 +1,6 @@
package gregtech.api.items;
-import gregtech.api.enums.ItemList;
import ic2.api.reactor.IReactor;
import ic2.api.reactor.IReactorComponent;
import ic2.core.IC2Potion;
@@ -54,7 +53,9 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
for (int i = 0; i < pulses; i++) {
acceptUraniumPulse(reactor, yourStack, yourStack, x, y, x, y, heatrun);
}
- pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
+ //dead code?
+ //pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
+ checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun);checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun);checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun);checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
} else {
pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
index eb464b143b..9feceade1c 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
@@ -359,13 +359,13 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
if (aValue > 16 || aValue < 0) aValue = 0;
mColor = (byte) aValue;
break;
- case 3:
- mSidedRedstone[0] = (byte) ((aValue & 1) > 0 ? 15 : 0);
- mSidedRedstone[1] = (byte) ((aValue & 2) > 0 ? 15 : 0);
- mSidedRedstone[2] = (byte) ((aValue & 4) > 0 ? 15 : 0);
- mSidedRedstone[3] = (byte) ((aValue & 8) > 0 ? 15 : 0);
- mSidedRedstone[4] = (byte) ((aValue & 16) > 0 ? 15 : 0);
- mSidedRedstone[5] = (byte) ((aValue & 32) > 0 ? 15 : 0);
+ case 3: //int X & Y = 0 or Y; Y -> {1,2,4,8,16,32}; byte type analogy
+ mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0);
+ mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0);
+ mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0);
+ mSidedRedstone[3] = (byte) ((aValue & 8) == 8 ? 15 : 0);
+ mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0);
+ mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0);
break;
case 4:
if (hasValidMetaTileEntity() && mTickTimer > 20)
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 8e60733bcd..15767bb40b 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -604,13 +604,13 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
if (aValue > 16 || aValue < 0) aValue = 0;
mColor = (byte) aValue;
break;
- case 3:
- mSidedRedstone[0] = (byte) ((aValue & 1) > 0 ? 15 : 0);
- mSidedRedstone[1] = (byte) ((aValue & 2) > 0 ? 15 : 0);
- mSidedRedstone[2] = (byte) ((aValue & 4) > 0 ? 15 : 0);
- mSidedRedstone[3] = (byte) ((aValue & 8) > 0 ? 15 : 0);
- mSidedRedstone[4] = (byte) ((aValue & 16) > 0 ? 15 : 0);
- mSidedRedstone[5] = (byte) ((aValue & 32) > 0 ? 15 : 0);
+ case 3: //int X & Y = 0 or Y; Y -> {1,2,4,8,16,32}; byte type analogy
+ mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0);
+ mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0);
+ mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0);
+ mSidedRedstone[3] = (byte) ((aValue & 8) == 8 ? 15 : 0);
+ mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0);
+ mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0);
break;
case 4:
if (hasValidMetaTileEntity() && mTickTimer > 20)
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 8cf320b86d..823790b98b 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
@@ -414,7 +414,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
if (mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
NBTTagCompound tNBT = mInventory[1].getTagCompound();
if (tNBT != null) {
- NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");
+ NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");//tNBT2 dont use out if
if (!tNBT.getBoolean("mDis")) {
tNBT2 = new NBTTagCompound();
Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[1]);
diff --git a/src/main/java/gregtech/api/objects/GT_FluidStack.java b/src/main/java/gregtech/api/objects/GT_FluidStack.java
index 3f9e52818c..bc1dd8f077 100644
--- a/src/main/java/gregtech/api/objects/GT_FluidStack.java
+++ b/src/main/java/gregtech/api/objects/GT_FluidStack.java
@@ -49,6 +49,7 @@ public class GT_FluidStack extends FluidStack {
}
}
+ @Deprecated
public void fixFluidIDForFucksSake() {
if (ForgeVersion.getBuildVersion() < 1355) {
int fluidID;
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 2030d12c94..c0b23df4b4 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -142,7 +142,7 @@ public class GT_RecipeAdder
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("cnc", aOutput1, aDuration)) <= 0) {
+ if ((/*aDuration = */GregTech_API.sRecipeFile.get("cnc", aOutput1, aDuration)) <= 0) {
return false;
}
return true;
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index 84e3ad9687..3a862fec35 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -107,9 +107,9 @@ public class GT_Worldgenerator
int j = 0;
for (int tZ = this.mZ - 16; j < 3; tZ += 16) {
String tBiome = this.mWorld.getBiomeGenForCoords(tX + 8, tZ + 8).biomeName;
- if (tBiome == null) {
- tBiome = BiomeGenBase.plains.biomeName;
- }
+ /*if (tBiome == null) {
+ + tBiome = BiomeGenBase.plains.biomeName;//FindBugs: DLS - DLS_DEAD_LOCAL_STORE
+ + }*/
for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
try {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider);
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
index b0b2604ba4..aa263bbdc7 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
@@ -86,11 +86,11 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
if (tPrimaryByProductSmall == null) {
tPrimaryByProductSmall = tSmall;
}
- if (tSecondaryByMaterial == null) tSecondaryByMaterial = tPrimaryByMaterial;
- if (tSecondaryByProduct == null) tSecondaryByProduct = tPrimaryByProduct;
- if (tSecondaryByProductSmall == null) {
- tSecondaryByProductSmall = tPrimaryByProductSmall;
- }
+ //if (tSecondaryByMaterial == null) tSecondaryByMaterial = tPrimaryByMaterial;//dead code?
+ //if (tSecondaryByProduct == null) tSecondaryByProduct = tPrimaryByProduct;//dead code?
+ //if (tSecondaryByProductSmall == null) {
+ //tSecondaryByProductSmall = tPrimaryByProductSmall;//dead code?
+ //}
boolean tHasSmelting = false;
if (tSmeltInto != null) {
@@ -110,7 +110,9 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
}
if (!tHasSmelting) {
- tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
+ //dead code?
+ //tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
+ GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
}
if (tCrushed != null) {