diff options
9 files changed, 98 insertions, 1 deletions
diff --git a/real.gradle.properties b/real.gradle.properties index 5e40f654cb..ed62eeefe5 100644 --- a/real.gradle.properties +++ b/real.gradle.properties @@ -1,4 +1,4 @@ -projectVersion=4.10.3 +projectVersion=4.10.4 ic2Version=2.2.828-experimental gt5uVersion=experimental-SNAPSHOT yamcoreVersion=1.7.10-0.5.79 diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java index 1376049f5a..880113073c 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -2,9 +2,11 @@ package com.github.technus.tectech.loader.thing; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.thing.cover.GT_Cover_TM_EnderFluidLink; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_PowerPassUpgrade; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.item.EnderFluidLinkCover; +import com.github.technus.tectech.thing.item.PowerPassUpgradeCover; import com.github.technus.tectech.thing.item.TeslaCoilCover; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; @@ -19,10 +21,12 @@ public class CoverLoader implements Runnable { final IIconContainer TESLA_OVERLAY = new Textures.BlockIcons.CustomIcon("iconsets/TESLA_OVERLAY"); final IIconContainer TESLA_OVERLAY_ULTIMATE = new Textures.BlockIcons.CustomIcon("iconsets/TESLA_OVERLAY_ULTIMATE"); final IIconContainer ENDERFLUIDLINK_OVERLAY = new Textures.BlockIcons.CustomIcon("iconsets/ENDERFLUIDLINK_OVERLAY"); + final IIconContainer POWERPASSUPGRADE_OVERLAY = new Textures.BlockIcons.CustomIcon("iconsets/POWERPASSUPGRADE_OVERLAY"); GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1, 0), new GT_RenderedTexture(TESLA_OVERLAY), new GT_Cover_TM_TeslaCoil()); GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1, 1), new GT_RenderedTexture(TESLA_OVERLAY_ULTIMATE), new GT_Cover_TM_TeslaCoil_Ultimate()); GregTech_API.registerCover(new ItemStack(EnderFluidLinkCover.INSTANCE, 1, 0), new GT_RenderedTexture(ENDERFLUIDLINK_OVERLAY), new GT_Cover_TM_EnderFluidLink()); + GregTech_API.registerCover(new ItemStack(PowerPassUpgradeCover.INSTANCE, 1, 0), new GT_RenderedTexture(POWERPASSUPGRADE_OVERLAY), new GT_Cover_TM_PowerPassUpgrade()); TecTech.LOGGER.info("Cover functionality registered"); } } diff --git a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java index 6fa0ba2bb3..4adeeec315 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java @@ -61,6 +61,7 @@ public class ThingsLoader implements Runnable { TeslaCoilCover.run(); TeslaCoilCapacitor.run(); EnderFluidLinkCover.run(); + PowerPassUpgradeCover.run(); TecTech.LOGGER.info("Useful Items registered"); TeslaCoilComponent.run(); diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_PowerPassUpgrade.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_PowerPassUpgrade.java new file mode 100644 index 0000000000..ce40a33dff --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_PowerPassUpgrade.java @@ -0,0 +1,37 @@ +package com.github.technus.tectech.thing.cover; + +import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_CoverBehavior; + +public class GT_Cover_TM_PowerPassUpgrade extends GT_CoverBehavior { + public GT_Cover_TM_PowerPassUpgrade() { + } + + @Override + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) { + IGregTechTileEntity TE = aTileEntity.getIGregTechTileEntityOffset(0, 0, 0); + if (TE instanceof GT_MetaTileEntity_MultiblockBase_EM) { + GT_MetaTileEntity_MultiblockBase_EM multi = (GT_MetaTileEntity_MultiblockBase_EM) TE; + multi.ePowerPassUpgraded = true; + } + return super.doCoverThings(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity, aTimer); + } + + @Override + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, boolean aForced) { + IGregTechTileEntity TE = aTileEntity.getIGregTechTileEntityOffset(0, 0, 0); + if (TE instanceof GT_MetaTileEntity_MultiblockBase_EM) { + GT_MetaTileEntity_MultiblockBase_EM multi = (GT_MetaTileEntity_MultiblockBase_EM) TE; + multi.ePowerPassUpgraded = false; + } + return true; + } + + @Override + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + //It updates once every 200 ticks, so once every 10 seconds + return 200; + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java b/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java new file mode 100644 index 0000000000..7dcf8bb48a --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/PowerPassUpgradeCover.java @@ -0,0 +1,47 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.util.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.thing.CustomItemList.enderLinkFluidCover; +import static net.minecraft.util.StatCollector.translateToLocal; + +public final class PowerPassUpgradeCover extends Item { + public static PowerPassUpgradeCover INSTANCE; + + private PowerPassUpgradeCover() { + setHasSubtypes(true); + setUnlocalizedName("tm.powerpassupgradecover"); + setTextureName(MODID + ":itemPowerPassUpgradeCover"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add(translateToLocal("item.tm.powerpassupgradecover.desc.0"));//Ender-Fluid-Enables Machines! + aList.add(EnumChatFormatting.BLUE + translateToLocal("item.tm.powerpassupgradecover.desc.1"));//Use on any side of a fluid tank to link it to the Ender + aList.add(EnumChatFormatting.BLUE + translateToLocal("item.tm.powerpassupgradecover.desc.2"));//Ender Tanks so are laggy -Bot from the Chads of NH + } + + public static void run() { + INSTANCE = new PowerPassUpgradeCover(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + enderLinkFluidCover.set(INSTANCE); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + itemIcon = iconRegister.registerIcon(getIconString()); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 63df215bc8..7cc83caaba 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -121,6 +121,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt //if u need to force some things to be fixed - u might need to override doRandomMaintenanceDamage protected byte minRepairStatus = 3; + //can power pass be enabled + public boolean ePowerPassUpgraded = false; + //functionality toggles - changed by buttons in gui also public boolean ePowerPass = false, eSafeVoid = false; diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/POWERPASSUPGRADE_OVERLAY.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/POWERPASSUPGRADE_OVERLAY.png Binary files differnew file mode 100644 index 0000000000..a623e9f1d5 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/POWERPASSUPGRADE_OVERLAY.png diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index f7209aed6a..89d2b517a2 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -92,6 +92,11 @@ item.tm.enderfluidlinkcover.desc.0=Ender-Fluid-Enables Machines! item.tm.enderfluidlinkcover.desc.1=Use on any side of a fluid tank to link it to the Ender item.tm.enderfluidlinkcover.desc.2=Ender Tanks so are laggy -Bot from the Chads of NH +item.tm.powerpassupgradecover.name=Power Pass Upgrade Cover +item.tm.powerpassupgradecover.desc.0=Add power pass functionality to TecTech Multiblocks +item.tm.powerpassupgradecover.desc.1=Active transformer in a can?? +item.tm.powerpassupgradecover.desc.2=Chain them up like Christmas lights! + #Death Messages death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. diff --git a/src/main/resources/assets/tectech/textures/items/itemPowerPassUpgradeCover.png b/src/main/resources/assets/tectech/textures/items/itemPowerPassUpgradeCover.png Binary files differnew file mode 100644 index 0000000000..85f8a77b77 --- /dev/null +++ b/src/main/resources/assets/tectech/textures/items/itemPowerPassUpgradeCover.png |