diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-26 04:12:39 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-26 04:12:39 +0000 |
commit | 22c6a05a8a3a00294bcb8890a1e2a0fdc9196de8 (patch) | |
tree | 15ce4082f42b720a1475b6db9c860a9dedfed4f0 /src/Java/gtPlusPlus/xmod | |
parent | d6f46ea411a7875334f5f74cd8a6888b0ad68831 (diff) | |
download | GT5-Unofficial-22c6a05a8a3a00294bcb8890a1e2a0fdc9196de8.tar.gz GT5-Unofficial-22c6a05a8a3a00294bcb8890a1e2a0fdc9196de8.tar.bz2 GT5-Unofficial-22c6a05a8a3a00294bcb8890a1e2a0fdc9196de8.zip |
+ Added recipes for Auto-Doors.
+ Added assembler recipes for Everglades portal block.
+ Added some other recipes.
% Custom Cyclotron GUI Container.
% Tweaked Cyclotron to consume 4x EU.
$ Fixed Adv. EBF and ABS not forming as expected.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
4 files changed, 288 insertions, 70 deletions
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); |