diff options
author | Dream-Master <dream-master@gmx.net> | 2015-12-10 01:12:42 +0100 |
---|---|---|
committer | Dream-Master <dream-master@gmx.net> | 2015-12-10 01:12:42 +0100 |
commit | 55ed43f4ce02da937bc6104bbcea08c8d0377796 (patch) | |
tree | 1b939ae3538d675c8d89a0a2bfcd40961ee6f0de /src/main/java/gregtech/api/metatileentity/implementations | |
parent | 2cab6b81666d27f4212b5dfbb2919969cfe52e31 (diff) | |
download | GT5-Unofficial-55ed43f4ce02da937bc6104bbcea08c8d0377796.tar.gz GT5-Unofficial-55ed43f4ce02da937bc6104bbcea08c8d0377796.tar.bz2 GT5-Unofficial-55ed43f4ce02da937bc6104bbcea08c8d0377796.zip |
Added all fixes from Blood Asp we need. Just stay at Forestry 3.6.12.3
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
3 files changed, 15 insertions, 14 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java index 767d96a521..69c921e159 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java @@ -1,6 +1,7 @@ package gregtech.api.metatileentity.implementations; import cofh.api.energy.IEnergyReceiver; +import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; @@ -39,6 +40,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile public final boolean mInsulated, mCanShock; public long mTransferredAmperage = 0, mTransferredAmperageLast20 = 0, mTransferredVoltageLast20 = 0; public long mRestRF; + public short mOverheat; public GT_MetaPipeEntity_Cable(int aID, String aName, String aNameRegional, float aThickNess, Materials aMaterial, long aCableLossPerMeter, long aAmperage, long aVoltage, boolean aInsulated, boolean aCanShock) { super(aID, aName, aNameRegional, 0); @@ -197,8 +199,9 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile mTransferredVoltageLast20 = Math.max(mTransferredVoltageLast20, aVoltage); mTransferredAmperageLast20 = Math.max(mTransferredAmperageLast20, mTransferredAmperage); if (aVoltage > mVoltage || mTransferredAmperage > mAmperage) { - getBaseMetaTileEntity().setToFire(); - return aAmperage; + if(mOverheat> GT_Mod.gregtechproxy.mWireHeatingTicks * 100){ + getBaseMetaTileEntity().setToFire();}else{mOverheat +=100;} + return aAmperage; } return rUsedAmperes; } @@ -208,6 +211,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile if (aBaseMetaTileEntity.isServerSide()) { mTransferredAmperage = 0; + if(mOverheat>0)mOverheat--; + if (aTick % 20 == 0) { mTransferredVoltageLast20 = 0; mTransferredAmperageLast20 = 0; diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java index e40d505e68..87a5710595 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java @@ -553,17 +553,13 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_ @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false; - if (mInventory[aIndex] != null) return true; - switch (mInputSlotCount) { - case 0: - return false; - case 1: - return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), new ItemStack[]{aStack}); - case 2: - return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0) != null && getInputAt(1) != null) || (getInputAt(0) == null && getInputAt(1) == null ? getRecipeList().containsInput(aStack) : null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[]{aStack, getInputAt(1)} : new ItemStack[]{getInputAt(0), aStack})))); - default: - return getRecipeList().containsInput(aStack); - } + if (mInventory[aIndex] != null) return true; + switch (mInputSlotCount) { + case 0: return false; + case 1: return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), new ItemStack[] {aStack}); + case 2: return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0)!=null&&getInputAt(1)!=null) || (getInputAt(0)==null&&getInputAt(1)==null?getRecipeList().containsInput(aStack):(getRecipeList().containsInput(aStack)&&null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[] {aStack, getInputAt(1)} : new ItemStack[] {getInputAt(0), aStack}))))); + default: return getRecipeList().containsInput(aStack); + } } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index d631cf415d..28c7fba4b5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -204,7 +204,7 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getBackFacing()) { - mTargetStackSize = (byte) ((mTargetStackSize + 1) % 65); + mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking()? -1 : 1)) % 65); if (mTargetStackSize == 0) { GT_Utility.sendChatToPlayer(aPlayer, "Do not regulate Item Stack Size"); } else { |