diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
3 files changed, 14 insertions, 9 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java index d6906c7b67..e0844bb071 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java @@ -129,7 +129,7 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In String[] aDesc = new String[] { "Item Input for Multiblocks", "This bus has no GUI, but can have items extracted", - ""+this.getSlots(this.mTier)+" Slots", + ""+getSlots(this.mTier)+" Slots", }; return aDesc; } @@ -164,7 +164,7 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In } if (aNames == null || aNames.length <= 0) { - PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) is Empty. Total Slots: "+this.getSlots(this.mTier)); + PlayerUtils.messagePlayer(aPlayer, "This Super Bus (I) is Empty. Total Slots: "+getSlots(this.mTier)); return; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java index 4fac3d36d8..3afa3312b1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java @@ -96,7 +96,7 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O String[] aDesc = new String[] { "Item Output for Multiblocks", "This bus has no GUI", - ""+this.getSlots(this.mTier)+" Slots", + ""+getSlots(this.mTier)+" Slots", }; return aDesc; } @@ -130,7 +130,7 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O } if (aNames == null || aNames.length <= 0) { - PlayerUtils.messagePlayer(aPlayer, "This Super Bus (O) is Empty. Total Slots: "+this.getSlots(this.mTier)); + PlayerUtils.messagePlayer(aPlayer, "This Super Bus (O) is Empty. Total Slots: "+getSlots(this.mTier)); return; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index 9fb9e3514e..5791cfbf73 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production; import java.util.concurrent.ScheduledExecutorService; import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; @@ -291,23 +292,27 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase long tVoltage = getMaxInputVoltage(); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); if (EU.getCharge(invItem) >= tVoltage) { - if (EU.discharge(invItem, (int) tVoltage, tTier)) { + Logger.WARNING("Can drain."); + if (EU.discharge(invItem, (int) tVoltage, -1)) { + Logger.WARNING("Drained Power."); + didElectricDamage = true; } else { + Logger.WARNING("Failed when draining Power."); this.getBaseMetaTileEntity().disableWorking(); } - didElectricDamage = true; } } } + Logger.WARNING("Drained Power? "+didElectricDamage); - //Logger.INFO("dmg: "+aDmg+" | max: "+aDmgMax); - if (!didElectricDamage) { + if (!didElectricDamage && invItem.getItem() instanceof GT_MetaGenerated_Tool) { long aDmg = GT_MetaGenerated_Tool.getToolDamage(invItem); long aDmgMax = GT_MetaGenerated_Tool.getToolMaxDamage(invItem); - if (aDmg < aDmgMax && invItem.isItemStackDamageable()) { + if (aDmg < aDmgMax && GT_MetaGenerated_Tool.getPrimaryMaterial(invItem) != Materials._NULL) { + Logger.WARNING("dmg: "+aDmg+" | max: "+aDmgMax); GT_MetaGenerated_Tool.setToolDamage(invItem, aDmg+getDamageToComponent(invItem)); } else if (aDmg >= aDmgMax) { |