diff options
author | basdxz <tudurap.com@gmail.com> | 2021-01-18 21:23:37 +0000 |
---|---|---|
committer | basdxz <tudurap.com@gmail.com> | 2021-01-18 21:23:37 +0000 |
commit | 84048d774b12fc7ae48d83e61fc55438cc657831 (patch) | |
tree | f988523f894badf67082687e45e28d1daa6c0f24 /src/main/java | |
parent | a1e38a7ab6cebacd5b99e0667863ae293b6abbff (diff) | |
download | GT5-Unofficial-84048d774b12fc7ae48d83e61fc55438cc657831.tar.gz GT5-Unofficial-84048d774b12fc7ae48d83e61fc55438cc657831.tar.bz2 GT5-Unofficial-84048d774b12fc7ae48d83e61fc55438cc657831.zip |
Missing Textures
Diffstat (limited to 'src/main/java')
4 files changed, 91 insertions, 0 deletions
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/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; |