diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common')
5 files changed, 24 insertions, 27 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java index bb2c8780d1..b3a1fb456c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java @@ -74,11 +74,11 @@ public class GregtechMetaTileEntityDoubleFuelGeneratorBase return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); } - else if (this.mTier >= 6){ + else { return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); } - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + //return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java index 1afa3634e2..ee36a920b0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityRocketFuelGenerator.java @@ -74,11 +74,11 @@ public class GregtechMetaTileEntityRocketFuelGenerator return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Advanced); } - else if (this.mTier >= 6){ + else{ return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Ultra); } - return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); + //return new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Simple_Top); } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java index 5fad590f3f..89c6c033d7 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java @@ -336,8 +336,15 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase this.mLastRecipe = null; return false; } + + if (tRecipe == null){ + return false; + } + if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { - this.mLastRecipe = tRecipe; + if (tRecipe != null){ + this.mLastRecipe = tRecipe; + } this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue)); this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue); this.mEfficiencyIncrease = 10000; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java index e6abbbd063..5e552f6647 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityAnimalFarm.java @@ -17,7 +17,6 @@ import gtPlusPlus.xmod.forestry.trees.TreefarmManager; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import java.lang.reflect.Field; -import java.util.ArrayList; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; @@ -32,7 +31,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo private static final ITexture[] FACING_ACTIVE = {new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBLASTFURNACE_ACTIVE)}; - public ArrayList<GT_MetaTileEntity_TieredMachineBlock> mCasings = new ArrayList(); + //public ArrayList<GT_MetaTileEntity_TieredMachineBlock> mCasings = new ArrayList(); private boolean running = false; private boolean p1, p2, p3, p4, p5, p6; @@ -148,7 +147,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - this.mCasings.clear(); + //this.mCasings.clear(); Utils.LOG_INFO("Step 1"); int xDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 7; int zDir = net.minecraftforge.common.util.ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 7; @@ -266,7 +265,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo } } mSolderingTool = true; - turnCasingActive(true); + //turnCasingActive(true); Utils.LOG_INFO("Multiblock Formed."); return true; } @@ -303,24 +302,14 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo if (aMetaTileEntity == null) return false; if (aMetaTileEntity instanceof GT_MetaTileEntity_TieredMachineBlock) { - return this.mCasings.add((GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity); + //return this.mCasings.add((GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity); } return false; } - public boolean turnCasingActive(boolean status) { - if (this.mCasings != null) { - Utils.LOG_INFO("Changing casing Textures."); - for (GT_MetaTileEntity_TieredMachineBlock hatch : this.mCasings) { - hatch = changeTextureswithReflection(hatch, getTextureSet()); - } - } - return true; - } - private GT_MetaTileEntity_TieredMachineBlock changeTextureswithReflection(GT_MetaTileEntity_TieredMachineBlock casing, ITexture[][][] textureSet){ GT_MetaTileEntity_TieredMachineBlock cv = casing; - System.out.println("Before: "+cv.mTextures.hashCode()); + //System.out.println("Before: "+cv.mTextures.hashCode()); //Get declared field from class Field f; try { @@ -336,7 +325,7 @@ public class GregtechMetaTileEntityAnimalFarm extends GT_MetaTileEntity_MultiBlo //change the field value f.set(cv, textureSet); //Verify change in texture set - System.out.println("After: "+cv.mTextures.hashCode()); + //System.out.println("After: "+cv.mTextures.hashCode()); return cv; } catch (NoSuchFieldException e) { Utils.LOG_INFO("Could not find mTextures."); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java index 50ff576724..fec81aaa15 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MultiTank.java @@ -549,24 +549,24 @@ extends GregtechMeta_MultiBlockBase { return tempTankStorageMax; } - private void tryForceNBTUpdate(){ + private boolean tryForceNBTUpdate(){ //Block is invalid. if (this == null || this.getBaseMetaTileEntity() == null){ Utils.LOG_WARNING("Block was not valid for saving data."); - return; + return false; } //Don't need this to run clientside. if (!this.getBaseMetaTileEntity().isServerSide()) { - return; + return false; } //Internal Tag was not valid. try{ if (internalCraftingComponentsTag == null){ Utils.LOG_WARNING("Internal NBT data tag was null."); - return; + return false; } } catch (NullPointerException x){ Utils.LOG_WARNING("Caught null NBT."); @@ -584,6 +584,7 @@ extends GregtechMeta_MultiBlockBase { this.getBaseMetaTileEntity().getWorld().markBlockForUpdate(x, y, z); //Mark block dirty, let chunk know it's data has changed and it must be saved to disk. (Albeit slowly) - this.getBaseMetaTileEntity().markDirty(); + this.getBaseMetaTileEntity().markDirty(); + return true; } } |