diff options
8 files changed, 450 insertions, 162 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java index a41a44c113..2aba494d6e 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java @@ -1,5 +1,7 @@ package gtPlusPlus.core.item.base.itemblock; +import java.util.List; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; @@ -89,4 +91,10 @@ public class ItemBlockDoor extends ItemBlock { } } } + + @Override + public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { + p_77624_3_.add("This is a block, you can place it by right clicking"); + super.addInformation(p_77624_1_, p_77624_2_, p_77624_3_, p_77624_4_); + } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 627c171a00..456b535606 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -1,5 +1,7 @@ package gtPlusPlus.core.recipe; +import static gtPlusPlus.core.lib.CORE.GTNH; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; @@ -76,9 +78,43 @@ public class RECIPES_GREGTECH { cuttingSawRecipes(); breweryRecipes(); laserEngraverRecipes(); + assemblyLineRecipes(); addFuels(); } + private static void assemblyLineRecipes() { + + CORE.RA.addAssemblylineRecipe( + ItemList.Field_Generator_IV.get(1), + 20 * 60 * 30, + new ItemStack[] { + ItemList.Field_Generator_IV.get(GTNH ? 32 : 16), + ItemList.Electric_Motor_EV.get(GTNH ? 64 : 32), + ItemList.Energy_LapotronicOrb.get(GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.cableGt12, 7, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.wireGt16, 6, GTNH ? 64 : 32), + ItemUtils.getOrePrefixStack(OrePrefixes.plate, Materials.Naquadria, GTNH ? 64 : 16), + ELEMENT.getInstance().GADOLINIUM.getDust(GTNH ? 32 : 8), + ELEMENT.getInstance().SAMARIUM.getDust(GTNH ? 16 : 4), + ALLOY.ARCANITE.getGear(GTNH ? 8 : 2), + CI.getTieredComponent(OrePrefixes.circuit, 5, GTNH ? 64 : 32), + CI.getTieredComponent(OrePrefixes.circuit, 6, GTNH ? 32 : 16), + CI.getTieredComponent(OrePrefixes.circuit, 7, GTNH ? 16 : 8), + GregtechItemList.Laser_Lens_Special.get(1) + }, + new FluidStack[] { + ALLOY.NITINOL_60.getFluid(144 * 9 * (GTNH ? 4 : 2)), + ALLOY.ENERGYCRYSTAL.getFluid(144 * 9 * (GTNH ? 8 : 4)), + ALLOY.TUMBAGA.getFluid(144 * 9 * (GTNH ? 32 : 8)), + ALLOY.NICHROME.getFluid(144 * 1 * (GTNH ? 16 : 4)), + + }, + ItemUtils.getSimpleStack(ModBlocks.blockCasings3Misc, 15, 32), + 20 * 60 * 10 * (GTNH ? 2 : 1), + (int) GT_Values.V[6]); + + } + private static void laserEngraverRecipes() { GT_Values.RA.addLaserEngraverRecipe( @@ -130,7 +166,7 @@ public class RECIPES_GREGTECH { ItemUtils.getSimpleStack(ModItems.dustDecayedRadium226, 1), null, null, - FluidUtils.getFluidStack("radon", !CORE.GTNH ? 500 : 144), + FluidUtils.getFluidStack("radon", !GTNH ? 500 : 144), null, null, null, @@ -156,7 +192,7 @@ public class RECIPES_GREGTECH { private static void blastSmelterRecipes() { - if (!CORE.GTNH) { + if (!GTNH) { // Trinium CORE.RA.addBlastSmelterRecipe( new ItemStack[] { @@ -945,13 +981,6 @@ public class RECIPES_GREGTECH { } - private static boolean addAR(final ItemStack inputA, final ItemStack inputB, final ItemStack outputA, - final int seconds, final int voltage) { - // return GT_Values.RA.addAssemblerRecipe(inputA, inputB, outputA, - // seconds*20, voltage); - return addAR(inputA, inputB, null, outputA, seconds * 20, voltage); - } - private static boolean addAR(final ItemStack inputA, final ItemStack inputB, final FluidStack inputFluidA, final ItemStack outputA, final int seconds, final int voltage) { // return GT_Values.RA.addAssemblerRecipe(inputA, inputB, outputA, @@ -990,7 +1019,7 @@ public class RECIPES_GREGTECH { private static void addFuels() { Logger.INFO("Registering New Fuels."); - if (!CORE.GTNH) { + if (!GTNH) { GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketFire_water", 0, 1), null, 120, 0); GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketRocket_fuel", 0, 1), null, 112, 0); GT_Values.RA.addFuel(ItemUtils.simpleMetaStack("EnderIO:bucketHootch", 0, 1), null, 36, 0); @@ -1153,7 +1182,7 @@ public class RECIPES_GREGTECH { CI.emptyCells(1), 300 * 20); // LFTR Fuel Related Compounds - if (CORE.GTNH) { + if (GTNH) { // Hydroxide AddGregtechRecipe.addChemicalRecipeForBasicMachineOnly( ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), @@ -1177,7 +1206,7 @@ public class RECIPES_GREGTECH { CI.emptyCells(2), GT_Values.NI, 20 * 20, 30); } - if (!CORE.GTNH) { + if (!GTNH) { // Hydroxide GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1), GT_Values.NF, @@ -1397,57 +1426,54 @@ public class RECIPES_GREGTECH { FluidUtils.getFluidStack("plasma.beryllium", 2500), new ItemStack[] { Particle.getBaseParticle(Particle.GRAVITON), - Particle.getBaseParticle(Particle.UP), - Particle.getBaseParticle(Particle.DOWN), - Particle.getBaseParticle(Particle.CHARM), - Particle.getBaseParticle(Particle.STRANGE), - Particle.getBaseParticle(Particle.TOP), - Particle.getBaseParticle(Particle.BOTTOM), - Particle.getBaseParticle(Particle.ELECTRON), - Particle.getBaseParticle(Particle.MUON), - Particle.getBaseParticle(Particle.TAU), - Particle.getBaseParticle(Particle.ELECTRON_NEUTRINO), - Particle.getBaseParticle(Particle.MUON_NEUTRINO), - Particle.getBaseParticle(Particle.TAU_NEUTRINO), - Particle.getBaseParticle(Particle.GLUON), - Particle.getBaseParticle(Particle.PHOTON), - Particle.getBaseParticle(Particle.Z_BOSON), - Particle.getBaseParticle(Particle.W_BOSON), + Particle.getBaseParticle(Particle.ETA_MESON), + Particle.getBaseParticle(Particle.PION), + Particle.getBaseParticle(Particle.PROTON), + Particle.getBaseParticle(Particle.NEUTRON), + Particle.getBaseParticle(Particle.LAMBDA), + Particle.getBaseParticle(Particle.OMEGA), Particle.getBaseParticle(Particle.HIGGS_BOSON), }, null, - new int[] { 5, 20, 20, 20, 20, 20, 20, 15, 15, 15, 10, 10, 10, 40, 40, 40, 40, 1 }, - 20 * 300 * 134, + new int[] { 10, 20, 20, 10, 10, 5, 5, 2 }, + 17 * 247 * 134, (int) GT_Values.V[8], 750 * 20); //Graviton Smash CORE.RA.addCyclotronRecipe( CI.getNumberedCircuit(15), - FluidUtils.getFluidStack("plasma.hydrogen", 10), + FluidUtils.getFluidStack("plasma.hydrogen", GTNH ? 50 : 10), new ItemStack[] { Particle.getBaseParticle(Particle.GRAVITON), Particle.getBaseParticle(Particle.UNKNOWN) }, null, - new int[] {15, 1000}, - 20 * 30, + new int[] {15, 100}, + 20 * (GTNH ? 90 : 30), (int) GT_Values.V[6], 1000 * 20); + FluidStack aPlasma = Materials.Duranium.getMolten(GTNH ? 40 : 10); + FluidStack aPlasma_NULL = Materials._NULL.getPlasma(1); + + if (aPlasma == null || aPlasma.isFluidEqual(aPlasma_NULL)) { + aPlasma = Materials.Americium.getMolten(GTNH ? 20 : 5); + } + //Quantum Anomaly CORE.RA.addCyclotronRecipe( new ItemStack[] { CI.getNumberedCircuit(24), Particle.getBaseParticle(Particle.UNKNOWN), }, - FluidUtils.getFluidStack("plasma.osmium", 3), + aPlasma, new ItemStack[] { GregtechItemList.Laser_Lens_Special.get(1) }, null, new int[] {100}, - 20 * 60, + 20 * (GTNH ? 300 : 60), (int) GT_Values.V[6], 1000 * 20); @@ -1455,30 +1481,19 @@ public class RECIPES_GREGTECH { * Ions */ - String[] aElementsTest = new String[] { - "Hydrogen", "Helium", "Lithium", "Beryllium", "Boron", "Carbon", "Nitrogen", "Oxygen", "Fluorine", "Neon", "Sodium", "Magnesium", "Aluminum", "Silicon", "Phosphorus", "Sulfur", "Chlorine", "Argon" - }; - int IonCount = 2; - int tenCountA = 1; + int tenCountA = (GTNH ? 2 : 1); int tenCountB = 0; - for (String y : IonParticles.MetaToNameMap.values()) { - - if (tenCountB == 12) { - tenCountB = 0; - tenCountA++; - } - else { - tenCountB++; - } - - FluidStack aPlasma = FluidUtils.getFluidStack("plasma."+y.toLowerCase(), 1); + for (String y : IonParticles.MetaToNameMap.values()) { + FluidStack aPlasma2 = FluidUtils.getFluidStack("plasma."+y.toLowerCase(), 2); + Materials aTestMat = MaterialUtils.getMaterial(y); + FluidStack aPlasma3 = aTestMat != null ? aTestMat.getPlasma(2) : aPlasma2; // Ionize Plasma - if (aPlasma != null) { + if ((aPlasma2 != null && !aPlasma2.isFluidEqual(aPlasma_NULL)) || (aPlasma3 != null && !aPlasma3.isFluidEqual(aPlasma_NULL))) { CORE.RA.addCyclotronRecipe( CI.getNumberedCircuit(1+(tenCountA-1)), - aPlasma, + aPlasma2 != null ? aPlasma2 : aPlasma3, new ItemStack[] { Particle.getIon(y, 1), Particle.getIon(y, 2), @@ -1499,18 +1514,15 @@ public class RECIPES_GREGTECH { else { Logger.INFO("Plasma for "+y+" does not exist, please report this to Alkalus."); } + + if (tenCountB == 12) { + tenCountB = 0; + tenCountA++; + } + else { + tenCountB++; + } } - - - - - - /*CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400), - ItemUtils.getSimpleStack(ModItems.dustNeptunium238), null, new int[] { 500 }, 20 * 5, 500, - 500 * 20); //PO Special Value -*/ - - } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 27116ba125..12195c2dc0 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -1475,17 +1475,60 @@ public class RECIPES_Machines { } - + int aCostMultiplier = GTNH ? 2 : 1; //Mystic Frame - Logger.RECIPE("[Inspection] Portal Frame"); - if (RecipeUtils.addShapedGregtechRecipe( - "circuitMaster", ItemList.Field_Generator_MV.get(1, CI.circuitTier7), "circuitElite", - CI.craftingToolScrewdriver, GregtechItemList.Casing_Multi_Use.get(1), CI.craftingToolWrench, - ItemList.Sensor_HV.get(1, CI.circuitTier7), ItemList.Field_Generator_HV.get(1, CI.circuitTier7), ItemList.Emitter_HV.get(1, CI.circuitTier7), - ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 2))){ - Logger.INFO("Added a recipe for the Toxic Everglades Portal frame"); + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + GregtechItemList.Casing_Multi_Use.get(1), + ItemList.Field_Generator_MV.get(1, CI.circuitTier7), + ItemList.Field_Generator_HV.get(1, CI.circuitTier7), + ItemList.Emitter_HV.get(1, CI.circuitTier7), + ItemList.Sensor_HV.get(1, CI.circuitTier7), + CI.getTieredComponent(OrePrefixes.plate, 7, 8 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.wireGt08, 8, 4 * aCostMultiplier), + }, + CI.getTieredFluid(6, (144 * 8)), //Input Fluid + ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 2), + 45 * 20 * 1 * (6), + MaterialUtils.getVoltageForTier(6)); + + + //Player Doors + ItemStack[] aDoorInputs = new ItemStack[] { + ItemUtils.getSimpleStack(Blocks.log2), + ItemUtils.getSimpleStack(Blocks.iron_block), + ItemUtils.getSimpleStack(Blocks.glass), + ItemUtils.getSimpleStack(Blocks.packed_ice), + ItemUtils.getSimpleStack(Blocks.cactus), + }; + ItemStack[] aDoorOutputs = new ItemStack[] { + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorWooden), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorIron), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Glass), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Ice), + ItemUtils.getSimpleStack(ModBlocks.blockPlayerDoorCustom_Cactus), + }; + + for (int y = 0; y < aDoorInputs.length; y++) { + CORE.RA.addSixSlotAssemblingRecipe( + new ItemStack[] { + ItemUtils.getSimpleStack(Items.iron_door), + aDoorInputs[y], + ItemList.Sensor_LV.get(1, CI.circuitTier7), + CI.getTieredComponent(OrePrefixes.plate, 1, 2 * aCostMultiplier), + CI.getTieredComponent(OrePrefixes.wireGt02, 1, 2 * aCostMultiplier), + ItemUtils.getSimpleStack(Items.redstone, 16) + }, + CI.getTieredFluid(1, (144 * 2)), //Input Fluid + aDoorOutputs[y], + 100, + MaterialUtils.getVoltageForTier(1)); } + + + + Logger.INFO("Done loading recipes for the Various machine blocks."); @@ -1521,7 +1564,7 @@ public class RECIPES_Machines { Item aBaseCore = ModItems.itemControlCore; ItemStack[] aInputPrevTier = new ItemStack[] { - ItemUtils.getItemStack("miscutils:item.itemBufferCore5", 1), + GTNH ? ItemUtils.getItemStack("miscutils:item.itemBufferCore3", 1) : ItemUtils.getItemStack("miscutils:item.itemBufferCore2", 1), ItemUtils.simpleMetaStack(aBaseCore, 0, 1), ItemUtils.simpleMetaStack(aBaseCore, 1, 1), ItemUtils.simpleMetaStack(aBaseCore, 2, 1), @@ -1552,7 +1595,7 @@ public class RECIPES_Machines { aOutput[2], aMat_A[3].getGear(GTNH ? 4 : 2), aMat_B[5].getPlateDouble(GTNH ? 16 : 8), - ItemUtils.getItemStack("miscutils:item.itemBufferCore"+(GTNH ? "5" : "4"), GTNH ? 4 : 2), + ItemUtils.getItemStack("miscutils:item.itemBufferCore"+(GTNH ? "4" : "3"), GTNH ? 4 : 2), ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(GTNH ? 4 : 3), GTNH ? 10 : 5) }, aMat_B[4].getFluid(144 * 16), //Input Fluid @@ -1738,8 +1781,8 @@ public class RECIPES_Machines { for (int i = 0; i < 10; i++) { - ItemStack aPrevTier = (i == 0 ? CI.getTieredMachineHull(4) : aOutput[i-1]); - aPrevTier.stackSize = GTNH ? 4 : 2; + ItemStack aPrevTier = (i == 0 ? CI.getTieredMachineHull(GTNH ? 2 : 1) : aOutput[i-1]); + aPrevTier.stackSize = GTNH ? 2 : 1; int aTier = (i + 1); CORE.RA.addSixSlotAssemblingRecipe( new ItemStack[] { diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java index 1cb2513e90..3f08715914 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java @@ -1,28 +1,18 @@ package gtPlusPlus.core.util.minecraft; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier; - -import net.minecraft.block.Block; -import net.minecraft.init.Items; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; - import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import gtPlusPlus.GTplusplus; -import gtPlusPlus.api.objects.GregtechException; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.api.objects.minecraft.BlockPos; @@ -40,6 +30,14 @@ import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_DustGeneration; +import net.minecraft.block.Block; +import net.minecraft.init.Items; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.Item; +import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; @@ -52,9 +50,18 @@ public class ItemUtils { public static ItemStack getSimpleStack(final Block x) { return simpleMetaStack(Item.getItemFromBlock(x), 0, 1); } + + + public static ItemStack getSimpleStack(final Block x, int i) { + if (i == 0) { + return getSimpleStack(x, i, 1); + } + + return getSimpleStack(x, 0, i); + } - public static ItemStack getSimpleStack(final Block x, int meta) { - return simpleMetaStack(Item.getItemFromBlock(x), meta, 1); + public static ItemStack getSimpleStack(final Block x, int meta, int i) { + return simpleMetaStack(Item.getItemFromBlock(x), meta, i); } public static ItemStack getSimpleStack(final Item x, final int i) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java new file mode 100644 index 0000000000..fff86ba7bd --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java @@ -0,0 +1,232 @@ +package gtPlusPlus.xmod.gregtech.api.gui; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.gui.GT_ContainerMetaTile_Machine; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_LanguageManager; +import java.util.Iterator; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; + +public class CONTAINER_Cyclotron extends GT_ContainerMetaTile_Machine { + + public int mActive = 0; + public int mMaxProgressTime = 0; + public int mProgressTime = 0; + public long mEnergy = 0; + public int mSteam = 0; + public int mSteamStorage = 0; + public int mStorage = 0; + public int mOutput = 0; + public int mInput = 0; + public int mID = 0; + public int mDisplayErrorCode = 0; + private int oActive = 0; + private int oMaxProgressTime = 0; + private int oProgressTime = 0; + private long oEnergy = 0; + private int oSteam = 0; + private int oSteamStorage = 0; + private int oStorage = 0; + private int oOutput = 0; + private int oInput = 0; + private int oID = 0; + private int oDisplayErrorCode = 0; + private int mTimer = 0; + + public CONTAINER_Cyclotron(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + this.mTileEntity = aTileEntity; + if (this.mTileEntity != null && this.mTileEntity.getMetaTileEntity() != null) { + this.addSlots(aInventoryPlayer); + if (this.doesBindPlayerInventory()) { + this.bindPlayerInventory(aInventoryPlayer); + } + + this.detectAndSendChanges(); + } else { + aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; + } + + } + + public CONTAINER_Cyclotron(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, + boolean doesBindInventory) { + super(aInventoryPlayer, aTileEntity); + this.mTileEntity = aTileEntity; + if (this.mTileEntity != null && this.mTileEntity.getMetaTileEntity() != null) { + this.addSlots(aInventoryPlayer); + if (this.doesBindPlayerInventory() && doesBindInventory) { + this.bindPlayerInventory(aInventoryPlayer); + } + + this.detectAndSendChanges(); + } else { + aInventoryPlayer.player.openContainer = aInventoryPlayer.player.inventoryContainer; + } + + } + + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (!this.mTileEntity.isClientSide() && this.mTileEntity.getMetaTileEntity() != null) { + this.mStorage = (int) Math.min(2147483647L, this.mTileEntity.getEUCapacity()); + this.mEnergy = this.mTileEntity.getStoredEU(); + this.mSteamStorage = (int) Math.min(2147483647L, this.mTileEntity.getSteamCapacity()); + this.mSteam = (int) Math.min(2147483647L, this.mTileEntity.getStoredSteam()); + this.mOutput = (int) Math.min(2147483647L, this.mTileEntity.getOutputVoltage()); + this.mInput = (int) Math.min(2147483647L, this.mTileEntity.getInputVoltage()); + this.mDisplayErrorCode = this.mTileEntity.getErrorDisplayID(); + this.mProgressTime = this.mTileEntity.getProgress(); + this.mMaxProgressTime = this.mTileEntity.getMaxProgress(); + this.mActive = this.mTileEntity.isActive() ? 1 : 0; + ++this.mTimer; + Iterator var2 = this.crafters.iterator(); + + while (true) { + ICrafting var1; + do { + if (!var2.hasNext()) { + this.oID = this.mID; + this.oSteam = this.mSteam; + this.oInput = this.mInput; + this.oActive = this.mActive; + this.oOutput = this.mOutput; + this.oEnergy = this.mEnergy; + this.oStorage = this.mStorage; + this.oSteamStorage = this.mSteamStorage; + this.oProgressTime = this.mProgressTime; + this.oMaxProgressTime = this.mMaxProgressTime; + this.oDisplayErrorCode = this.mDisplayErrorCode; + return; + } + + var1 = (ICrafting) var2.next(); + if (this.mTimer % 500 == 10 || this.oEnergy != this.mEnergy) { + + int uEnergy = (int) Math.min(2147483647L, this.mTileEntity.getStoredEU()); + + var1.sendProgressBarUpdate(this, 0, uEnergy & ''); + var1.sendProgressBarUpdate(this, 1, uEnergy >>> 16); + } + + if (this.mTimer % 500 == 10 || this.oStorage != this.mStorage) { + var1.sendProgressBarUpdate(this, 2, this.mStorage & ''); + var1.sendProgressBarUpdate(this, 3, this.mStorage >>> 16); + } + + if (this.mTimer % 500 == 10 || this.oOutput != this.mOutput) { + var1.sendProgressBarUpdate(this, 4, this.mOutput); + } + + if (this.mTimer % 500 == 10 || this.oInput != this.mInput) { + var1.sendProgressBarUpdate(this, 5, this.mInput); + } + + if (this.mTimer % 500 == 10 || this.oDisplayErrorCode != this.mDisplayErrorCode) { + var1.sendProgressBarUpdate(this, 6, this.mDisplayErrorCode); + } + + if (this.mTimer % 500 == 10 || this.oProgressTime != this.mProgressTime) { + var1.sendProgressBarUpdate(this, 11, this.mProgressTime & ''); + var1.sendProgressBarUpdate(this, 12, this.mProgressTime >>> 16); + } + + if (this.mTimer % 500 == 10 || this.oMaxProgressTime != this.mMaxProgressTime) { + var1.sendProgressBarUpdate(this, 13, this.mMaxProgressTime & ''); + var1.sendProgressBarUpdate(this, 14, this.mMaxProgressTime >>> 16); + } + + if (this.mTimer % 500 == 10 || this.oID != this.mID) { + var1.sendProgressBarUpdate(this, 15, this.mID); + } + + if (this.mTimer % 500 == 10 || this.oActive != this.mActive) { + var1.sendProgressBarUpdate(this, 16, this.mActive); + } + + if (this.mTimer % 500 == 10 || this.oSteam != this.mSteam) { + var1.sendProgressBarUpdate(this, 17, this.mSteam & ''); + var1.sendProgressBarUpdate(this, 18, this.mSteam >>> 16); + } + } while (this.mTimer % 500 != 10 && this.oSteamStorage == this.mSteamStorage); + + var1.sendProgressBarUpdate(this, 19, this.mSteamStorage & ''); + var1.sendProgressBarUpdate(this, 20, this.mSteamStorage >>> 16); + } + } + } + + @SideOnly(Side.CLIENT) + public void updateProgressBar(int par1, int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 0 : + this.mEnergy = this.mEnergy & -65536 | par2; + break; + case 1 : + this.mEnergy = this.mEnergy & '' | par2 << 16; + break; + case 2 : + this.mStorage = this.mStorage & -65536 | par2; + break; + case 3 : + this.mStorage = this.mStorage & '' | par2 << 16; + break; + case 4 : + this.mOutput = par2; + break; + case 5 : + this.mInput = par2; + break; + case 6 : + this.mDisplayErrorCode = par2; + case 7 : + case 8 : + case 9 : + case 10 : + default : + break; + case 11 : + this.mProgressTime = this.mProgressTime & -65536 | par2; + break; + case 12 : + this.mProgressTime = this.mProgressTime & '' | par2 << 16; + break; + case 13 : + this.mMaxProgressTime = this.mMaxProgressTime & -65536 | par2; + break; + case 14 : + this.mMaxProgressTime = this.mMaxProgressTime & '' | par2 << 16; + break; + case 15 : + this.mID = par2; + break; + case 16 : + this.mActive = par2; + break; + case 17 : + this.mSteam = this.mSteam & -65536 | par2; + break; + case 18 : + this.mSteam = this.mSteam & '' | par2 << 16; + break; + case 19 : + this.mSteamStorage = this.mSteamStorage & -65536 | par2; + break; + case 20 : + this.mSteamStorage = this.mSteamStorage & '' | par2 << 16; + } + + } + + public boolean canInteractWith(EntityPlayer player) { + return this.mTileEntity.isUseableByPlayer(player); + } + + public String trans(String aKey, String aEnglish) { + return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false); + } +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index 3bfac81837..7fdabceebb 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -174,10 +174,10 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) { return false; } - if (!addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), + /*if (!addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), CASING_TEXTURE_ID)) { return false; - } + }*/ byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir); if (!CORE.GTNH) { @@ -203,7 +203,7 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase case 6: this.mHeatingCapacity = 9001; break; - default: + default:Logger.INFO("Heating Coils are bad."); return false; } } else { @@ -236,31 +236,33 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase this.mHeatingCapacity = 15001; break; default: + Logger.INFO("Heating Coils are bad."); return false; } } for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { - if ((i != 0) || (j != 0)) { - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j) != StaticFields59 - .getBlockCasings5()) { + if ((i != 0) || (j != 0)) { + //Coils 1 + if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) { + Logger.INFO("Heating Coils missing."); return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j) != tUsedMeta) { + + //Coils 2 + if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) { + Logger.INFO("Heating Coils missing."); return false; - } - if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j) != StaticFields59 - .getBlockCasings5()) { + } + + //Top Layer + final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j); + if (!isValidBlockForStructure(tTileEntity2, CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j), ModBlocks.blockCasings3Misc, 11)) { + Logger.INFO("Top Layer missing."); return false; } - if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j) != tUsedMeta) { - return false; - } - if (!isValidBlockForStructure(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j), CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j), ModBlocks.blockCasings3Misc, 11)) { - Logger.INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3."); - return false; - } + } } } @@ -269,9 +271,9 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase if ((xDir + i != 0) || (zDir + j != 0)) { IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0,zDir + j); if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j), ModBlocks.blockCasings3Misc, 11)) { - Logger.INFO("Matter Fabricator Casings Missing from one of the top layers inner 3x3."); + Logger.INFO("Bottom Layer missing."); return false; - } + } } } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java index e351d6e988..c424172241 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java @@ -248,9 +248,9 @@ extends GregtechMeta_MultiBlockBase { } //Top Layer - final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 2, zDir + j); - if (!isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(15), false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j), ModBlocks.blockCasingsMisc, 15)) { - Logger.INFO("Heating Coils missing."); + final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j); + if (!isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(15), true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j), ModBlocks.blockCasingsMisc, 15)) { + Logger.INFO("Top Layer missing."); return false; } } @@ -260,9 +260,9 @@ extends GregtechMeta_MultiBlockBase { for (int j = -1; j < 2; j++) { if (((xDir + i) != 0) || ((zDir + j) != 0)) { //Bottom Layer - final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 2, zDir + j); - if (!isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(15), false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j), ModBlocks.blockCasingsMisc, 15)) { - Logger.INFO("Heating Coils missing."); + final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); + if (!isValidBlockForStructure(tTileEntity2, TAE.GTPP_INDEX(15), true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j), ModBlocks.blockCasingsMisc, 15)) { + Logger.INFO("Bottom Layer missing."); return false; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java index f2eca2a697..eb2339cbea 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -26,8 +26,8 @@ import gregtech.common.gui.GT_GUIContainer_FusionReactor; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.item.chemistry.IonParticles; -import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_Cyclotron; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.block.Block; @@ -39,7 +39,7 @@ import net.minecraftforge.fluids.FluidStack; public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBase { - public int mEUStore; + public long mEUStore; public GregtechMetaTileEntity_Cyclotron(int aID, String aName, String aNameRegional, int tier) { super(aID, aName, aNameRegional); @@ -75,7 +75,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas @Override public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { - return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity); + return new CONTAINER_Cyclotron(aPlayerInventory, aBaseMetaTileEntity); } @Override @@ -96,17 +96,19 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas @Override public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setLong("mEUStore", mEUStore); super.saveNBTData(aNBT); } @Override public void loadNBTData(NBTTagCompound aNBT) { + mEUStore = aNBT.getLong("mEUStore"); super.loadNBTData(aNBT); } @Override public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - Logger.INFO("Checking form of Cyclotron."); + log("Checking form of Cyclotron."); int xCenter = getBaseMetaTileEntity().getXCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX * 5; int yCenter = getBaseMetaTileEntity().getYCoord(); int zCenter = getBaseMetaTileEntity().getZCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ * 5; @@ -143,28 +145,28 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas int mEnergyHatches_sS = this.mEnergyHatches.size(); for (int i = 0; i < mEnergyHatches_sS; i++) { if (this.mEnergyHatches.get(i).mTier < tier()){ - Logger.INFO("bad energy hatch"); + log("bad energy hatch"); return false; } } int mOutputHatches_sS = this.mOutputBusses.size(); for (int i = 0; i < mOutputHatches_sS; i++) { if (this.mOutputBusses.get(i).mTier < tier()){ - Logger.INFO("bad output hatch"); + log("bad output hatch"); return false; } } int mInputHatches_sS = this.mInputHatches.size(); for (int i = 0; i < mInputHatches_sS; i++) { if (this.mInputHatches.get(i).mTier < tier()){ - Logger.INFO("bad input hatch"); + log("bad input hatch"); return false; } } int mInputBusses_sS = this.mInputBusses.size(); for (int i = 0; i < mInputBusses_sS; i++) { if (this.mInputBusses.get(i).mTier < tier()){ - Logger.INFO("bad input hatch"); + log("bad input hatch"); return false; } } @@ -174,11 +176,11 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas mHardHammer = true; mSolderingTool = true; mCrowbar = true; - Logger.INFO("Built Cyclotron."); + log("Built Cyclotron."); turnCasingActive(true); return true; } - Logger.INFO("Failed building Cyclotron."); + log("Failed building Cyclotron."); return false; } @@ -216,27 +218,6 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas && (isAdvancedMachineCasing(aX - 2, aY, aZ + 4)) && (isAdvancedMachineCasing(aX + 2, aY, aZ - 4)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 4)); } - private boolean addIfEnergyInjector(int aX, int aY, int aZ, IGregTechTileEntity aBaseMetaTileEntity) { - if (addEnergyInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntity(aX, aY, aZ), TAE.GTPP_INDEX(26))) { - return true; - } - return isAdvancedMachineCasing(aX, aY, aZ); - } - - private boolean addIfInjector(int aX, int aY, int aZ, IGregTechTileEntity aTileEntity) { - if (addInputToMachineList(aTileEntity.getIGregTechTileEntity(aX, aY, aZ), TAE.GTPP_INDEX(26))) { - return true; - } - return isAdvancedMachineCasing(aX, aY, aZ); - } - - private boolean addIfExtractor(int aX, int aY, int aZ, IGregTechTileEntity aTileEntity) { - if (addOutputToMachineList(aTileEntity.getIGregTechTileEntity(aX, aY, aZ), TAE.GTPP_INDEX(26))) { - return true; - } - return isAdvancedMachineCasing(aX, aY, aZ); - } - private boolean isAdvancedMachineCasing(int aX, int aY, int aZ) { final Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); final int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ); @@ -246,7 +227,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas /*if (!debug) { this.getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, ModBlocks.blockCompressedObsidian); - Logger.INFO(""+aX+"/"+aY+"/"+aZ); + log(""+aX+"/"+aY+"/"+aZ); }*/ return debug; @@ -261,14 +242,10 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas /*if (!debug) { this.getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, ModBlocks.blockCompressedObsidian); - Logger.INFO(""+aX+"/"+aY+"/"+aZ); + log(""+aX+"/"+aY+"/"+aZ); }*/ - return debug; - - - - + return debug; } public Block getCasing() { @@ -342,7 +319,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas }*/ - //Logger.INFO("Recipe Check."); + //log("Recipe Check."); ArrayList<ItemStack> tItemList = getStoredInputs(); ItemStack[] tItemInputs = tItemList.toArray(new ItemStack[tItemList.size()]); ArrayList<FluidStack> tInputList = getStoredFluids(); @@ -427,10 +404,12 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isServerSide()) { if (mEfficiency < 0) - mEfficiency = 0; + mEfficiency = 0; - onRunningTick(null); + //Time Counter + this.mTotalRunTime++; + onRunningTick(null); if (mRunningOnLoad && checkMultiblock(aBaseMetaTileEntity, mInventory[1])) { this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); @@ -445,6 +424,10 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas mEnergyHatches.clear(); mMufflerHatches.clear(); mMaintenanceHatches.clear(); + mChargeHatches.clear(); + mDischargeHatches.clear(); + mControlCoreBus.clear(); + mMultiDynamoHatches.clear(); mMachine = checkMultiblock(aBaseMetaTileEntity, mInventory[1]); } if (mStartUpCheck < 0) { @@ -452,9 +435,9 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas if (this.mEnergyHatches != null) { for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) { - if (aBaseMetaTileEntity.getStoredEU() + (2048) < maxEUStore() - && tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048, false)) { - aBaseMetaTileEntity.increaseStoredEnergyUnits(2048, true); + if (aBaseMetaTileEntity.getStoredEU() + (2048*4) < maxEUStore() + && tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits((2048*4), false)) { + aBaseMetaTileEntity.increaseStoredEnergyUnits((2048*4), true); } } } @@ -462,7 +445,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas stopMachine(); } if (getRepairStatus() > 0) { - if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) { + if (mMaxProgresstime > 0) { this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputItems != null) @@ -511,6 +494,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas stopMachine(); } } + doRandomMaintenanceDamage(); aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); |