diff options
author | â€huajijam <strhuaji@gmail.com> | 2019-05-17 23:26:41 +0800 |
---|---|---|
committer | â€huajijam <strhuaji@gmail.com> | 2019-05-17 23:26:41 +0800 |
commit | 5920c6db3ff62d89ba41db4eda59cc6d70ddce3b (patch) | |
tree | d4d6d5036e8cb95d2232066f0ee257f59b5aa967 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic | |
parent | 787c31758d2ea3259f8da9c5c7ffd4b28429eb9a (diff) | |
parent | cacc2915ef0039e3460817e4f116d44cf8e44e5f (diff) | |
download | GT5-Unofficial-5920c6db3ff62d89ba41db4eda59cc6d70ddce3b.tar.gz GT5-Unofficial-5920c6db3ff62d89ba41db4eda59cc6d70ddce3b.tar.bz2 GT5-Unofficial-5920c6db3ff62d89ba41db4eda59cc6d70ddce3b.zip |
Automatic synchronization
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic')
5 files changed, 371 insertions, 60 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java index c364fe5e9e..e277b671c6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java @@ -127,13 +127,6 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi } @Override - public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { - if (getBaseMetaTileEntity().isServerSide()) { - - } - } - - @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java new file mode 100644 index 0000000000..0a65db7be4 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java @@ -0,0 +1,318 @@ +package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.World; + +public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity { + + long mLastCleanup = 0; + long mLocalTickVar = 0; + int mFrequency = 5; + + public GregtechMetaGarbageCollector(final String aName, final String aNameRegional, final String aDescription) { + super(991, aName, aNameRegional, 5, 0, aDescription); + } + + public GregtechMetaGarbageCollector(final String aName, final String aDescription, final ITexture[][][] aTextures) { + super(aName, 5, 0, aDescription, aTextures); + } + + @Override + public String[] getDescription() { + return new String[] {this.mDescription, "Can request the JVM to perform garbage collection", "Configurable to run once every 5 minute interval (5-180)", "This Machine has no recipe", "Admin Tool, Limit one per world if possible"}; + } + + @Override + public ITexture[][][] getTextureSet(final ITexture[] aTextures) { + final ITexture[][][] rTextures = new ITexture[10][17][]; + for (byte i = -1; i < 16; i++) { + rTextures[0][i + 1] = this.getFront(i); + rTextures[1][i + 1] = this.getBack(i); + rTextures[2][i + 1] = this.getBottom(i); + rTextures[3][i + 1] = this.getTop(i); + rTextures[4][i + 1] = this.getSides(i); + rTextures[5][i + 1] = this.getFrontActive(i); + rTextures[6][i + 1] = this.getBackActive(i); + rTextures[7][i + 1] = this.getBottomActive(i); + rTextures[8][i + 1] = this.getTopActive(i); + rTextures[9][i + 1] = this.getSidesActive(i); + } + return rTextures; + } + + @Override + public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { + return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1]; + } + + + public ITexture[] getFront(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBack(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBottom(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getTop(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getSides(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; + } + + + public ITexture[] getFrontActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBackActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + } + + + public ITexture[] getBottomActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getTopActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + } + + + public ITexture[] getSidesActive(final byte aColor) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (mFrequency < 180){ + mFrequency += 5; + } + else { + mFrequency = 5; + } + PlayerUtils.messagePlayer(aPlayer, "Running every "+mFrequency+" minutes."); + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + + @Override + public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { + return new GregtechMetaGarbageCollector(this.mName, this.mDescription, this.mTextures); + } + + @Override public boolean isSimpleMachine() {return true;} + @Override public boolean isElectric() {return false;} + @Override public boolean isValidSlot(final int aIndex) {return false;} + @Override public boolean isFacingValid(final byte aFacing) {return true;} + @Override public boolean isEnetInput() {return false;} + @Override public boolean isEnetOutput() {return false;} + @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 0;} + @Override public long maxEUStore() {return 0;} + + @Override + public int getCapacity() { + return 0; + } + + @Override + public long maxEUInput() { + return 0; + } + + @Override + public long maxEUOutput() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + @Override public int rechargerSlotStartIndex() {return 0;} + @Override public int dechargerSlotStartIndex() {return 0;} + @Override public int rechargerSlotCount() {return 0;} + @Override public int dechargerSlotCount() {return 0;} + @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();} + @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();} + @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;} + + @Override + public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + { + return true; + } + this.showPollution(aPlayer.getEntityWorld(), aPlayer); + return true; + } + + private void showPollution(final World worldIn, final EntityPlayer playerIn){ + PlayerUtils.messagePlayer(playerIn, "Running every "+mFrequency+" minutes. Owner: "+this.getBaseMetaTileEntity().getOwnerName()); + long aDiff = mLocalTickVar - this.mLastCleanup; + PlayerUtils.messagePlayer(playerIn, "Last run: "+Utils.getSecondsFromMillis(aDiff)+" seconds ago."); + + + } + + @Override + public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { + return false; + } + + + @Override + public String[] getInfoData() { + return new String[] { + this.getLocalName() + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(final int p_94128_1_) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) { + return false; + } + + @Override + public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) { + return false; + } + + @Override + public int getSizeInventory() { + return 0; + } + + @Override + public ItemStack getStackInSlot(final int p_70301_1_) { + return null; + } + + @Override + public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) { + return null; + } + + @Override + public ItemStack getStackInSlotOnClosing(final int p_70304_1_) { + return null; + } + + @Override + public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) { + } + + @Override + public String getInventoryName() { + return null; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 0; + } + + @Override + public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) { + return true; + } + + @Override + public void openInventory() { + } + + @Override + public void closeInventory() { + } + + @Override + public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) { + return false; + } + + @Override + public boolean isOverclockerUpgradable() { + return false; + } + + @Override + public boolean isTransformerUpgradable() { + return false; + } + + @Override + public void saveNBTData(final NBTTagCompound aNBT) { + + } + + @Override + public void loadNBTData(final NBTTagCompound aNBT) { + + } + + @Override + public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.getBaseMetaTileEntity().isServerSide()) { + mLocalTickVar = System.currentTimeMillis(); + long aDiff = mLocalTickVar - this.mLastCleanup; + if (Utils.getSecondsFromMillis(aDiff) >= (this.mFrequency * 60)) { + CORE.gc(); + this.mLastCleanup = mLocalTickVar; + } + } + } + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java index c7f63e3bc2..4e5c296629 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java @@ -379,7 +379,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity { else { returnValue = getCurrentChunkPollution(); } - Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); + //Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |"); return returnValue; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java index b4e819a459..477848a90f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java @@ -131,15 +131,15 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti @Override public int checkRecipe() { - Logger.INFO("Recipe Tick 1."); + Logger.MACHINE_INFO("Recipe Tick 1."); if (!this.mCanProcessRecipe) { - Logger.INFO("Recipe Tick 1.1 - Cannot Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); if (this.mChargeConsumed < mFusionPoint) { - Logger.INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); this.mCharging = true; this.mCanProcessRecipe = false; if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { - Logger.INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + mFusionPoint); mChargeConsumed += (mFusionPoint / 100); } @@ -152,13 +152,13 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } } else { - Logger.INFO("Recipe Tick 1.1 - Try to Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); if (checkRecipeMulti()) { - Logger.INFO("Recipe Tick 1.2 - Process Recipe was Successful."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); return 2; } } - Logger.INFO("Recipe Tick 2. - Process Recipe failed."); + Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); return 0; } @@ -196,7 +196,7 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { this.mLastRecipe = null; - Logger.INFO("Just plain bad."); + Logger.MACHINE_INFO("Just plain bad."); return false; } if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { @@ -397,38 +397,38 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { // super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - // Logger.INFO("1"); + // Logger.MACHINE_INFO("1"); if (mEfficiency < 0) mEfficiency = 0; if (mRunningOnLoad) { - Logger.INFO("2"); + Logger.MACHINE_INFO("2"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); checkRecipeMulti(); } if (--mUpdate == 0 || --mStartUpCheck == 0) { - Logger.INFO("3"); + Logger.MACHINE_INFO("3"); mMachine = true; } if (mStartUpCheck < 0) { - //Logger.INFO("4"); + //Logger.MACHINE_INFO("4"); if (mMachine) { - //Logger.INFO("5"); + //Logger.MACHINE_INFO("5"); if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { - //Logger.INFO("5.5 A"); + //Logger.MACHINE_INFO("5.5 A"); } else { - //Logger.INFO("5.5 B"); + //Logger.MACHINE_INFO("5.5 B"); } } if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Logger.INFO("6"); + Logger.MACHINE_INFO("6"); stopMachine(); this.mLastRecipe = null; } if (mMaxProgresstime > 0) { - Logger.INFO("7"); + Logger.MACHINE_INFO("7"); this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputFluids != null) @@ -448,18 +448,18 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } } else { - //Logger.INFO("8"); + //Logger.MACHINE_INFO("8"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { - Logger.INFO("9"); + Logger.MACHINE_INFO("9"); // turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { - Logger.INFO("10"); + Logger.MACHINE_INFO("10"); if (checkRecipeMulti()) { - Logger.INFO("11"); + Logger.MACHINE_INFO("11"); if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Logger.INFO("12"); + Logger.MACHINE_INFO("12"); mMaxProgresstime = 0; // turnCasingActive(false); } @@ -473,12 +473,12 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti } else { // turnCasingActive(false); - Logger.INFO("Bad"); + Logger.MACHINE_INFO("Bad"); this.mLastRecipe = null; stopMachine(); } } - Logger.INFO("Good | "+mMaxProgresstime); + Logger.MACHINE_INFO("Good | "+mMaxProgresstime); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -489,14 +489,14 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a1"); + Logger.MACHINE_INFO("a1"); return false; } } if (this.mEUStore <= 0) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a2"); + Logger.MACHINE_INFO("a2"); return false; } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java index 5a0f888ddb..8b3ada610d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java @@ -131,15 +131,15 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux @Override public int checkRecipe() { - Logger.INFO("Recipe Tick 1."); + Logger.MACHINE_INFO("Recipe Tick 1."); if (!this.mCanProcessRecipe) { - Logger.INFO("Recipe Tick 1.1 - Cannot Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe."); if (this.mChargeConsumed < mFusionPoint) { - Logger.INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low."); this.mCharging = true; this.mCanProcessRecipe = false; if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) { - Logger.INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/" + mFusionPoint); mChargeConsumed += (mFusionPoint / 100); } @@ -152,13 +152,13 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux } } else { - Logger.INFO("Recipe Tick 1.1 - Try to Process Recipe."); + Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe."); if (checkRecipeMulti()) { - Logger.INFO("Recipe Tick 1.2 - Process Recipe was Successful."); + Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful."); return 2; } } - Logger.INFO("Recipe Tick 2. - Process Recipe failed."); + Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed."); return 0; } @@ -198,7 +198,7 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) { this.mLastRecipe = null; - Logger.INFO("Just plain bad."); + Logger.MACHINE_INFO("Just plain bad."); return false; } if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) { @@ -399,38 +399,38 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { // super.onPostTick(aBaseMetaTileEntity, aTick); if (aBaseMetaTileEntity.isServerSide()) { - // Logger.INFO("1"); + // Logger.MACHINE_INFO("1"); if (mEfficiency < 0) mEfficiency = 0; if (mRunningOnLoad) { - Logger.INFO("2"); + Logger.MACHINE_INFO("2"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); checkRecipeMulti(); } if (--mUpdate == 0 || --mStartUpCheck == 0) { - Logger.INFO("3"); + Logger.MACHINE_INFO("3"); mMachine = true; } if (mStartUpCheck < 0) { - //Logger.INFO("4"); + //Logger.MACHINE_INFO("4"); if (mMachine) { - //Logger.INFO("5"); + //Logger.MACHINE_INFO("5"); if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) { if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) { - //Logger.INFO("5.5 A"); + //Logger.MACHINE_INFO("5.5 A"); } else { - //Logger.INFO("5.5 B"); + //Logger.MACHINE_INFO("5.5 B"); } } if (this.mEUStore <= 0 && mMaxProgresstime > 0) { - Logger.INFO("6"); + Logger.MACHINE_INFO("6"); stopMachine(); this.mLastRecipe = null; } if (mMaxProgresstime > 0) { - Logger.INFO("7"); + Logger.MACHINE_INFO("7"); this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true); if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) { if (mOutputFluids != null) @@ -450,18 +450,18 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux } } else { - //Logger.INFO("8"); + //Logger.MACHINE_INFO("8"); this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU(); if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) { - Logger.INFO("9"); + Logger.MACHINE_INFO("9"); // turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { - Logger.INFO("10"); + Logger.MACHINE_INFO("10"); if (checkRecipeMulti()) { - Logger.INFO("11"); + Logger.MACHINE_INFO("11"); if (this.mEUStore < this.mLastRecipe.mSpecialValue) { - Logger.INFO("12"); + Logger.MACHINE_INFO("12"); mMaxProgresstime = 0; // turnCasingActive(false); } @@ -475,12 +475,12 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux } else { // turnCasingActive(false); - Logger.INFO("Bad"); + Logger.MACHINE_INFO("Bad"); this.mLastRecipe = null; stopMachine(); } } - Logger.INFO("Good | "+mMaxProgresstime); + Logger.MACHINE_INFO("Good | "+mMaxProgresstime); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); } } @@ -491,14 +491,14 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a1"); + Logger.MACHINE_INFO("a1"); return false; } } if (this.mEUStore <= 0) { this.mLastRecipe = null; stopMachine(); - Logger.INFO("a2"); + Logger.MACHINE_INFO("a2"); return false; } } |