Bugfixes 4

This commit is contained in:
Muramasa 2016-08-14 05:09:34 +01:00
parent 2bd06dc60e
commit b6032a3bd2
9 changed files with 34 additions and 30 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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)

View file

@ -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)

View file

@ -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]);

View file

@ -49,6 +49,7 @@ public class GT_FluidStack extends FluidStack {
}
}
@Deprecated
public void fixFluidIDForFucksSake() {
if (ForgeVersion.getBuildVersion() < 1355) {
int fluidID;

View file

@ -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;

View file

@ -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);

View file

@ -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) {