From ec0469d5e0673b509af793c8d7456571339f7382 Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Mon, 31 Oct 2022 15:55:31 +0000 Subject: Add solenoid coils for cyclotron (#1494) * Add solenoid coils for cyclotron. * Fix? * Push * Spotless apply for branch cyclotron_coils for #1494 (#1495) * Change stack size (#1484) * Replace TSS Coils with Titanium-Platinum Ones (#1211) * Replace TSS Coils with Titanium-Platinum Ones - Created a new material, TPV-Alloy, made from Titanium, Platinum and Vanadium (3/3/1); - Replaced the Tungstensteel Coil Block with a TPV one, to make it properly included in EV while adding a Platinum sink in that tier; * Simplified Metal Proportion for TPV * change tpv ebf temp to 3k to be even with TSS (cherry picked from commit 52dda9f666d8e1b2d220a0b2d9e24513ad8a4490) * add TPV mixer recipe (cherry picked from commit 30b6cf62c14165add271a1ecc4a322ab0ce609d1) * add tpv as metal via tag (cherry picked from commit 75dba7283e26b6e2f717a3230d6369e4cbe20c8e) * Spotless apply for branch EV_Coil_Change for #1211 (#1482) * Remove convert gendustry bees code (#1187) * Remove convert gendustry bees code * fix derp. run BS update Co-authored-by: Martin Robertz * Added check to API if the block should drop its inventory on break (#1479) * Added check to API if the block should drop its inventory on break * Apply spotless * Changed should drop flag to take index argument * spotlessApply Co-authored-by: DianeXD <64360468+DianeXD@users.noreply.github.com> Co-authored-by: Martin Robertz Co-authored-by: Maxim Co-authored-by: Steelux <70096037+Steelux8@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * move TSS and TPV to ev (Mixer recipe) (cherry picked from commit 74dc0da61db49102cc3e073f5c506e8c494c508f) * add info to Nei * Spotless apply for branch EV_Coil_Change for #1211 (#1483) * Remove convert gendustry bees code (#1187) * Remove convert gendustry bees code * fix derp. run BS update Co-authored-by: Martin Robertz * Added check to API if the block should drop its inventory on break (#1479) * Added check to API if the block should drop its inventory on break * Apply spotless * Changed should drop flag to take index argument * spotlessApply Co-authored-by: DianeXD <64360468+DianeXD@users.noreply.github.com> Co-authored-by: Martin Robertz Co-authored-by: Maxim Co-authored-by: Steelux <70096037+Steelux8@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: Martin Robertz Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: DianeXD <64360468+DianeXD@users.noreply.github.com> Co-authored-by: Maxim * Recipe fixes 2022/10/25 (#1489) * Fix quad input hatch voiding (#1487) fixes https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11728 * Add constructor for Energy Hatch with inventory (#1488) * Force Industrial Apiary to suck 4 amps (#1492) * Fixed annoying cover message bug (#1490) * Fixed annoying cover message bug * Spotless * make the cleanroom to accept 2 doors so alastor is happy (#1493) * spotlessApply Co-authored-by: Phineasor <80113803+Phineasor@users.noreply.github.com> Co-authored-by: Steelux <70096037+Steelux8@users.noreply.github.com> Co-authored-by: Martin Robertz Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: DianeXD <64360468+DianeXD@users.noreply.github.com> Co-authored-by: Maxim Co-authored-by: miozune Co-authored-by: Guinea Wheek Co-authored-by: Jakub <53441451+kuba6000@users.noreply.github.com> Co-authored-by: johnch18 <42650497+johnch18@users.noreply.github.com> Co-authored-by: RIONDY 'POPlol333' Adam <76914762+POPlol333@users.noreply.github.com> Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Random magic numbers Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Phineasor <80113803+Phineasor@users.noreply.github.com> Co-authored-by: Steelux <70096037+Steelux8@users.noreply.github.com> Co-authored-by: Martin Robertz Co-authored-by: DianeXD <64360468+DianeXD@users.noreply.github.com> Co-authored-by: Maxim Co-authored-by: miozune Co-authored-by: Guinea Wheek Co-authored-by: Jakub <53441451+kuba6000@users.noreply.github.com> Co-authored-by: johnch18 <42650497+johnch18@users.noreply.github.com> Co-authored-by: RIONDY 'POPlol333' Adam <76914762+POPlol333@users.noreply.github.com> --- .../gregtech/common/blocks/GT_Cyclotron_Coils.java | 117 +++++++++++++++++++++ .../common/blocks/GT_Cyclotron_Item_Casings.java | 9 ++ 2 files changed, 126 insertions(+) create mode 100644 src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java create mode 100644 src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java new file mode 100644 index 0000000000..66d9ffe6e8 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Coils.java @@ -0,0 +1,117 @@ +package gregtech.common.blocks; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +public class GT_Cyclotron_Coils extends GT_Block_Casings_Abstract { + + public GT_Cyclotron_Coils() { + super(GT_Cyclotron_Item_Casings.class, "gt.blockcasings.cyclotron_coils", GT_Material_Casings.INSTANCE, 16); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "MV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "HV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "EV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "IV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "LuV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "ZPM Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "UV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "UHV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "UEV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "UIV Solenoid Superconductor Coil"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "UMV Solenoid Superconductor Coil"); + + ItemList.Superconducting_Magnet_Solenoid_MV.set(new ItemStack(this, 1, 0)); + ItemList.Superconducting_Magnet_Solenoid_HV.set(new ItemStack(this, 1, 1)); + ItemList.Superconducting_Magnet_Solenoid_EV.set(new ItemStack(this, 1, 2)); + ItemList.Superconducting_Magnet_Solenoid_IV.set(new ItemStack(this, 1, 3)); + ItemList.Superconducting_Magnet_Solenoid_LuV.set(new ItemStack(this, 1, 4)); + ItemList.Superconducting_Magnet_Solenoid_ZPM.set(new ItemStack(this, 1, 5)); + ItemList.Superconducting_Magnet_Solenoid_UV.set(new ItemStack(this, 1, 6)); + ItemList.Superconducting_Magnet_Solenoid_UHV.set(new ItemStack(this, 1, 7)); + ItemList.Superconducting_Magnet_Solenoid_UEV.set(new ItemStack(this, 1, 8)); + ItemList.Superconducting_Magnet_Solenoid_UIV.set(new ItemStack(this, 1, 9)); + ItemList.Superconducting_Magnet_Solenoid_UMV.set(new ItemStack(this, 1, 10)); + } + + @Override // Magic numbers... + public int getTextureIndex(int aMeta) { + return 192 + aMeta; + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + if ((aMeta >= 0) && (aMeta < 16)) { + switch (aMeta) { + case 0: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.MV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.MV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 1: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.HV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.HV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 2: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.EV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.EV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 3: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.IV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.IV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 4: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.LuV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.LuV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 5: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.ZPM_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.ZPM_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 6: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.UV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.UV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 7: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.UHV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.UHV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 8: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.UEV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.UEV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 9: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.UIV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.UIV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + case 10: + if (aSide == 0 || aSide == 1) { + return Textures.BlockIcons.UMV_TOP_CYCLOTRON_SOLENOID.getIcon(); + } + return Textures.BlockIcons.UMV_SIDE_CYCLOTRON_SOLENOID.getIcon(); + } + } + return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); + } + + @Override + public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { + return aWorld.getBlockMetadata(aX, aY, aZ) > 9 + ? super.colorMultiplier(aWorld, aX, aY, aZ) + : gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[0] << 16 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[1] << 8 + | gregtech.api.enums.Dyes.MACHINE_METAL.mRGBa[2]; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java new file mode 100644 index 0000000000..a522b2bd3f --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Cyclotron_Item_Casings.java @@ -0,0 +1,9 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class GT_Cyclotron_Item_Casings extends GT_Item_Casings_Abstract { + public GT_Cyclotron_Item_Casings(Block block) { + super(block); + } +} -- cgit