diff options
Diffstat (limited to 'src/main/java')
23 files changed, 1501 insertions, 118 deletions
diff --git a/src/main/java/com/github/technus/tectech/CommonValues.java b/src/main/java/com/github/technus/tectech/CommonValues.java index 8ac6188b63..9564643fbe 100644 --- a/src/main/java/com/github/technus/tectech/CommonValues.java +++ b/src/main/java/com/github/technus/tectech/CommonValues.java @@ -18,6 +18,10 @@ public final class CommonValues { EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.BLUE + ": Theta Movement"; + public static final String COSMIC_MARK = + EnumChatFormatting.BLUE + "Tec" + + EnumChatFormatting.DARK_BLUE + "Tech" + + EnumChatFormatting.BLUE + ": Cosmic";//TODO get a better name than cosmic for *UNDEFINED* thing public static final byte DECAY_AT = 0;// hatches compute decays public static final byte MULTI_PURGE_1_AT = 2;// multiblocks clean their hatches 1 diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index 2272733d5a..4df0ad70ed 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -13,6 +13,7 @@ import com.github.technus.tectech.loader.mechanics.ElementalLoader; import com.github.technus.tectech.loader.network.NetworkDispatcher; import com.github.technus.tectech.loader.recipe.RecipeLoader; import com.github.technus.tectech.loader.thing.ComponentLoader; +import com.github.technus.tectech.loader.thing.CoverLoader; import com.github.technus.tectech.loader.thing.MachineLoader; import com.github.technus.tectech.loader.thing.ThingsLoader; import com.github.technus.tectech.thing.casing.TT_Container_Casings; @@ -73,7 +74,7 @@ public final class MainLoader { } public static void load() { - ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 8); + ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 9); progressBarLoad.step("Elemental Things"); new ElementalLoader().run(); @@ -95,6 +96,10 @@ public final class MainLoader { new MachineLoader().run(); LOGGER.info("Machine Init Done"); + progressBarLoad.step("Cover Things"); + new CoverLoader().run(); + LOGGER.info("Cover Init Done"); + progressBarLoad.step("Register entities"); new EntityLoader().run(); LOGGER.info("Entities registered"); 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 new file mode 100644 index 0000000000..e71489339e --- /dev/null +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -0,0 +1,19 @@ +package com.github.technus.tectech.loader.thing; + +import com.github.technus.tectech.TecTech; + +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.TeslaCoilCover; +import com.github.technus.tectech.thing.item.TeslaCoilCoverUltimate; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.item.ItemStack; +public class CoverLoader implements Runnable { + public void run(){ + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil_Ultimate()); + TecTech.LOGGER.info("Cover functionality registered"); + } +} diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java index e9fe5cfb19..9e3caca4db 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java @@ -582,6 +582,10 @@ public class MachineLoader implements Runnable { Machine_OwnerDetector.set(new GT_MetaTileEntity_OwnerDetector(15480, "machine.tt.ownerdetector", "Owner detector", 3).getStackForm(1L)); Machine_DataReader.set(new GT_MetaTileEntity_DataReader(15481, "machine.tt.datareader", "Data Reader", 5).getStackForm(1L)); + // =================================================================================================== + // Buck Converters + // =================================================================================================== + Machine_BuckConverter_IV.set(new GT_MetaTileEntity_BuckConverter(15485, "machine.tt.buck.05", "Insane Buck Converter", 5).getStackForm(1L)); Machine_BuckConverter_LuV.set(new GT_MetaTileEntity_BuckConverter(15486, "machine.tt.buck.06", "Ludicrous Buck Converter", 6).getStackForm(1L)); Machine_BuckConverter_ZPM.set(new GT_MetaTileEntity_BuckConverter(15487, "machine.tt.buck.07", "ZPM Voltage Buck Converter", 7).getStackForm(1L)); @@ -593,6 +597,34 @@ public class MachineLoader implements Runnable { Machine_BuckConverter_UXV.set(new GT_MetaTileEntity_BuckConverter(15493, "machine.tt.buck.13", "Extended Mega Ultimate Buck Converter", 13).getStackForm(1L)); // =================================================================================================== + // Tesla Transceiver + // =================================================================================================== + + Machine_TeslaCoil_LV_1A.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,1).getStackForm(1L)); + Machine_TeslaCoil_MV_1A.set(new GT_MetaTileEntity_TeslaCoil(16001, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 1).getStackForm(1L)); + Machine_TeslaCoil_HV_1A.set(new GT_MetaTileEntity_TeslaCoil(16002, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 1).getStackForm(1L)); + Machine_TeslaCoil_EV_1A.set(new GT_MetaTileEntity_TeslaCoil(16003, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 1).getStackForm(1L)); + Machine_TeslaCoil_IV_1A.set(new GT_MetaTileEntity_TeslaCoil(16004, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 1).getStackForm(1L)); + + Machine_TeslaCoil_LV_4A.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,4).getStackForm(1L)); + Machine_TeslaCoil_MV_4A.set(new GT_MetaTileEntity_TeslaCoil(16006, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 4).getStackForm(1L)); + Machine_TeslaCoil_HV_4A.set(new GT_MetaTileEntity_TeslaCoil(16007, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 4).getStackForm(1L)); + Machine_TeslaCoil_EV_4A.set(new GT_MetaTileEntity_TeslaCoil(16008, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 4).getStackForm(1L)); + Machine_TeslaCoil_IV_4A.set(new GT_MetaTileEntity_TeslaCoil(16009, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 4).getStackForm(1L)); + + Machine_TeslaCoil_LV_9A.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,9).getStackForm(1L)); + Machine_TeslaCoil_MV_9A.set(new GT_MetaTileEntity_TeslaCoil(16011, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 9).getStackForm(1L)); + Machine_TeslaCoil_HV_9A.set(new GT_MetaTileEntity_TeslaCoil(16012, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 9).getStackForm(1L)); + Machine_TeslaCoil_EV_9A.set(new GT_MetaTileEntity_TeslaCoil(16013, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 9).getStackForm(1L)); + Machine_TeslaCoil_IV_9A.set(new GT_MetaTileEntity_TeslaCoil(16014, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 9).getStackForm(1L)); + + Machine_TeslaCoil_LV_16A.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,16).getStackForm(1L)); + Machine_TeslaCoil_MV_16A.set(new GT_MetaTileEntity_TeslaCoil(16016, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 16).getStackForm(1L)); + Machine_TeslaCoil_HV_16A.set(new GT_MetaTileEntity_TeslaCoil(16017, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 16).getStackForm(1L)); + Machine_TeslaCoil_EV_16A.set(new GT_MetaTileEntity_TeslaCoil(16018, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 16).getStackForm(1L)); + Machine_TeslaCoil_IV_16A.set(new GT_MetaTileEntity_TeslaCoil(16019, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 16).getStackForm(1L)); + + // =================================================================================================== // Debug Stuff // =================================================================================================== Machine_DebugPollutor.set(new GT_MetaTileEntity_DebugPollutor(15495,"debug.tt.pollutor","Debug Pollution Generator",15).getStackForm(1)); @@ -607,8 +639,11 @@ public class MachineLoader implements Runnable { // =================================================================================================== GT_MetaTileEntity_Hatch_Rack.run(); + GT_MetaTileEntity_DataReader.run(); + GT_MetaTileEntity_Hatch_Capacitor.run(); + if (!Loader.isModLoaded(Reference.DREAMCRAFT)) { new NoDreamCraftMachineLoader().run(); } 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 b422688a70..13d8861d31 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 @@ -7,10 +7,7 @@ import com.github.technus.tectech.compatibility.openmodularturrets.blocks.turret import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; import com.github.technus.tectech.thing.block.ReactorSimBlock; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsNH; -import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT; -import com.github.technus.tectech.thing.casing.GT_Block_HintTT; -import com.github.technus.tectech.thing.casing.TT_Container_Casings; +import com.github.technus.tectech.thing.casing.*; import com.github.technus.tectech.thing.item.*; import cpw.mods.fml.common.Loader; import gregtech.api.enums.Textures; @@ -34,6 +31,8 @@ public class ThingsLoader implements Runnable { TecTech.LOGGER.info("Added texture page if was null"); TT_Container_Casings.sBlockCasingsTT = new GT_Block_CasingsTT(); TecTech.LOGGER.info("Elemental Casing registered"); + TT_Container_Casings.sBlockCasingsBA0 = new GT_Block_CasingsBA0(); + TecTech.LOGGER.info("Nikolai's Casing registered"); TT_Container_Casings.sHintCasingsTT = new GT_Block_HintTT(); TecTech.LOGGER.info("Hint Blocks registered"); @@ -53,11 +52,19 @@ public class ThingsLoader implements Runnable { ReactorSimBlock.run(); TecTech.LOGGER.info("Reactor Simulator registered"); + TeslaCoilCover.run(); + TeslaCoilCoverUltimate.run(); + TecTech.LOGGER.info("Covers Items registered"); + ConstructableTriggerItem.run(); FrontRotationTriggerItem.run(); ParametrizerMemoryCard.run(); ElementalDefinitionScanStorage_EM.run(); EuMeterGT.run(); + + + TeslaCoilCapacitor.run(); + TecTech.LOGGER.info("Useful Items registered"); ElementalDefinitionContainer_EM.run(); diff --git a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java index cd3d1cccd8..dfd49da1a5 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -77,6 +77,9 @@ public enum CustomItemList implements IItemContainer { Parametrizer_Hatch, ParametrizerX_Hatch, Uncertainty_Hatch, UncertaintyX_Hatch, dataIn_Hatch, dataOut_Hatch, dataInAss_Hatch, dataOutAss_Hatch, eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, debugBlock, + + tM_TeslaBase, tM_TeslaToroid, tM_TeslaFrame, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaPrimary_3, tM_TeslaPrimary_4, tM_TeslaPrimary_5, + Machine_Multi_Microwave, Machine_Multi_teslaCoil, Machine_Multi_Transformer, Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank, @@ -89,8 +92,12 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_BHG, hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - scanContainer,parametrizerMemory; + scanContainer,parametrizerMemory, + Machine_TeslaCoil_LV_1A, Machine_TeslaCoil_MV_1A, Machine_TeslaCoil_HV_1A, Machine_TeslaCoil_EV_1A, Machine_TeslaCoil_IV_1A, + Machine_TeslaCoil_LV_4A, Machine_TeslaCoil_MV_4A, Machine_TeslaCoil_HV_4A, Machine_TeslaCoil_EV_4A, Machine_TeslaCoil_IV_4A, + Machine_TeslaCoil_LV_9A, Machine_TeslaCoil_MV_9A, Machine_TeslaCoil_HV_9A, Machine_TeslaCoil_EV_9A, Machine_TeslaCoil_IV_9A, + Machine_TeslaCoil_LV_16A, Machine_TeslaCoil_MV_16A, Machine_TeslaCoil_HV_16A, Machine_TeslaCoil_EV_16A, Machine_TeslaCoil_IV_16A; private ItemStack mStack; private boolean mHasNotBeenSet = true; diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java new file mode 100644 index 0000000000..ad552f64e3 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsBA0.java @@ -0,0 +1,178 @@ +package com.github.technus.tectech.thing.casing; + +import com.github.technus.tectech.thing.CustomItemList; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_CopiedBlockTexture; +import gregtech.api.util.GT_LanguageManager; +import gregtech.common.blocks.GT_Block_Casings_Abstract; +import gregtech.common.blocks.GT_Material_Casings; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import java.util.List; + +import static com.github.technus.tectech.TecTech.tectechTexturePage1; + +/** + * Created by danie_000 on 03.10.2016. + */ +public class GT_Block_CasingsBA0 extends GT_Block_Casings_Abstract { + public static final byte texturePage=tectechTexturePage1; + public static final short textureOffset = (texturePage << 7)+16;//Start of PAGE 8 (which is the 9th page) (8*128)+16 + + private static IIcon[] tM0 = new IIcon[2]; + private static IIcon[] tM1 = new IIcon[2]; + private static IIcon[] tM2 = new IIcon[2]; + private static IIcon[] tM3 = new IIcon[2]; + private static IIcon[] tM4 = new IIcon[2]; + private static IIcon[] tM5 = new IIcon[2]; + private static IIcon[] tM6 = new IIcon[2]; + private static IIcon tM7; + private static IIcon[] tM8 = new IIcon[2]; + + public GT_Block_CasingsBA0() { + super(GT_Item_CasingsBA0.class, "gt.blockcasingsBA0", GT_Material_Casings.INSTANCE); + for (byte b = 0; b < 16; b = (byte) (b + 1)) { + Textures.BlockIcons.casingTexturePages[texturePage][b+16] = new GT_CopiedBlockTexture(this, 6, b); + /*IMPORTANT for block recoloring**/ + } + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "T0 Primary Tesla Windings");//TODO Decide tesla coil winding materials to rename + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "T1 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "T2 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "T3 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "T4 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "T5 Primary Tesla Windings"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Tesla Base Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Tesla Toroid Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Tesla Secondary Windings"); + + CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 0)); + CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 1)); + CustomItemList.tM_TeslaPrimary_2.set(new ItemStack(this, 1, 2)); + CustomItemList.tM_TeslaPrimary_3.set(new ItemStack(this, 1, 3)); + CustomItemList.tM_TeslaPrimary_4.set(new ItemStack(this, 1, 4)); + CustomItemList.tM_TeslaPrimary_5.set(new ItemStack(this, 1, 5)); + + CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 6)); + CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 7)); + CustomItemList.tM_TeslaFrame.set(new ItemStack(this, 1, 8)); + } + + @Override + public void registerBlockIcons(IIconRegister aIconRegister) { + tM0[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_0"); + tM0[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_0"); + tM1[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_1"); + tM1[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_1"); + tM2[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_2"); + tM2[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_2"); + tM3[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_3"); + tM3[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_3"); + tM4[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_4"); + tM4[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_4"); + tM5[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_TOP_BOTTOM_5"); + tM5[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_PRIMARY_SIDES_5"); + + tM6[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); + tM6[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_SIDES"); + tM7 = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_TOROID"); + tM8[0] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_BASE_TOP_BOTTOM"); + tM8[1] = aIconRegister.registerIcon("gregtech:iconsets/TM_TESLA_WINDING_SECONDARY"); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + switch (aMeta) { + case 0: + switch (aSide){ + case 0: + case 1: + return tM0[0]; + default: + return tM0[1]; + } + case 1: + switch (aSide){ + case 0: + case 1: + return tM1[0]; + default: + return tM1[1]; + } + case 2: + switch (aSide){ + case 0: + case 1: + return tM2[0]; + default: + return tM2[1]; + } + case 3: + switch (aSide){ + case 0: + case 1: + return tM3[0]; + default: + return tM3[1]; + } + case 4: + switch (aSide){ + case 0: + case 1: + return tM4[0]; + default: + return tM4[1]; + } + case 5: + switch (aSide){ + case 0: + case 1: + return tM5[0]; + default: + return tM5[1]; + } + case 6: + switch (aSide){ + case 0: + case 1: + return tM6[0]; + default: + return tM6[1]; + } + case 7: + return tM7; + case 8: + switch (aSide){ + case 0: + case 1: + return tM8[0]; + default: + return tM8[1]; + } + default: + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(IBlockAccess aWorld, int xCoord, int yCoord, int zCoord, int aSide) { + int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + return getIcon(aSide, tMeta); + } + + @Override + public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i <= 8; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java index 2ea22b625d..639e68fef6 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java @@ -57,7 +57,6 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Debug Sides");//NOT REGISTER AS TEXTURE FOR HATCHES! - CustomItemList.eM_Power.set(new ItemStack(this, 1, 0)); CustomItemList.eM_Computer_Casing.set(new ItemStack(this, 1, 1)); diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java new file mode 100644 index 0000000000..8a494baea1 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsBA0.java @@ -0,0 +1,70 @@ +package com.github.technus.tectech.thing.casing; + +import gregtech.common.blocks.GT_Item_Casings_Abstract; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.CommonValues.*; + +/** + * Created by danie_000 on 03.10.2016. + */ +public class GT_Item_CasingsBA0 extends GT_Item_Casings_Abstract { + public GT_Item_CasingsBA0(Block par1) { + super(par1); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + if(aStack.getItemDamage() < 15) { + aList.add(BASS_MARK); + } else { + aList.add(COSMIC_MARK); + } + switch (aStack.getItemDamage()) { + case 0://"T0 Primary Tesla Windings" + aList.add("Well suited for high power applications."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "The power levels are rising!"); + break; + case 1://"T1 Primary Tesla Windings" + aList.add("Nice and clean casing."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Dust can break it!?"); + break; + case 2://"T2 Primary Tesla Windings" + aList.add("Air vent with a filter."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Perfectly muffled sound!"); + break; + case 3://"T3 Primary Tesla Windings" + aList.add("Contains high bandwidth bus"); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "couple thousand qubits wide."); + break; + case 4://"T4 Primary Tesla Windings" + aList.add("Stops elemental things."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Radiation and emotions too..."); + break; + case 5://"T5 Primary Tesla Windings" + aList.add("Cooling and stabilization."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "A comfortable machine bed."); + break; + case 6://"Tesla Base Casing" + aList.add("Creates a field that..."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "can stop even force carriers."); + break; + case 7://"Tesla Toroid Casing" + aList.add("Well it does things too..."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "[Use this coil!]"); + break; + case 8://"Tesla Secondary Windings" + aList.add("Reinforced accelerator tunnel."); + aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + "Most advanced pipe ever."); + break; + default://WTF? + aList.add("Damn son where did you get that!?"); + aList.add(EnumChatFormatting.BLUE.toString() + "From outer space... I guess..."); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java index 6751e4b24b..2fd58c408f 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java @@ -8,8 +8,7 @@ import net.minecraft.util.EnumChatFormatting; import java.util.List; -import static com.github.technus.tectech.CommonValues.TEC_MARK_EM; -import static com.github.technus.tectech.CommonValues.TEC_MARK_GENERAL; +import static com.github.technus.tectech.CommonValues.*; /** * Created by danie_000 on 03.10.2016. @@ -21,10 +20,10 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { @Override public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - if(aStack.getItemDamage()>0 && aStack.getItemDamage()<15) { + if(aStack.getItemDamage() < 15) { aList.add(TEC_MARK_EM); } else { - aList.add(TEC_MARK_GENERAL); + aList.add(COSMIC_MARK); } switch (aStack.getItemDamage()) { case 0://"High Power Casing" diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java b/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java index 851046f34b..071a4ae28f 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java @@ -8,6 +8,8 @@ import net.minecraft.block.Block; public final class TT_Container_Casings { public static Block sBlockCasingsTT; public static Block sHintCasingsTT; + public static Block sBlockCasingsBA0; + public static Block sBlockCasingsNH; private TT_Container_Casings() {} diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java new file mode 100644 index 0000000000..721f730960 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -0,0 +1,28 @@ +package com.github.technus.tectech.thing.cover; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; + +import static ic2.api.info.Info.DMG_ELECTRIC; + +public class GT_Cover_TM_TeslaCoil extends GT_CoverBehavior { + public GT_Cover_TM_TeslaCoil() { + } + + public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return "Do not attempt to use screwdriver!"; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if(aTileEntity.getStoredEU() > 0 && !GT_Utility.isWearingFullElectroHazmat(aPlayer)){ + aPlayer.attackEntityFrom(DMG_ELECTRIC, 20); + } + return aCoverVariable; + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java new file mode 100644 index 0000000000..db7c751fc6 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java @@ -0,0 +1,29 @@ +package com.github.technus.tectech.thing.cover; + +import gregtech.api.interfaces.tileentity.ICoverable; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_TM_TeslaCoil_Ultimate extends GT_Cover_TM_TeslaCoil { + public GT_Cover_TM_TeslaCoil_Ultimate() { + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { |
