aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java
diff options
context:
space:
mode:
authorMary <33456283+FourIsTheNumber@users.noreply.github.com>2024-07-18 09:58:41 -0400
committerGitHub <noreply@github.com>2024-07-18 20:58:41 +0700
commite3a650785887866e4b8533b61044479ecb80aee7 (patch)
treea5dcc2993f3f234f93e5891286d18fdc426070b4 /src/main/java/gregtech/common/blocks/GT_Block_Casings10.java
parentdcc8dac94e6d5a5561cf8bf38fc7f87e222b40e3 (diff)
downloadGT5-Unofficial-e3a650785887866e4b8533b61044479ecb80aee7.tar.gz
GT5-Unofficial-e3a650785887866e4b8533b61044479ecb80aee7.tar.bz2
GT5-Unofficial-e3a650785887866e4b8533b61044479ecb80aee7.zip
Add a Multiblock Electromagnetic Separator (#2726)
* Built multi template with required methods in gt++. * Filled out template based on gt++ electrolyzer code * Refactored into gregtech. Not supposed to add multis to gt++, whoops! * IntelliJ "smartly" deleted all of the imports in GT_Loader_MetaTileEntities and replaced it with a wildcard import... which caused it to fail checkstyle. Thanks so much, IntelliJ. * Figured out how to make IntelliJ Stop Doing That * Added author tag and vac freezer texture for testing. * Registered casing, working on getting texture functional * Added casing texture * Fixed structure check and added processing logic. Multi now forms and can run EMS recipes * Added overlay textures * Made new Casings10 class and added EMS Casings to it. Texture mesh now functions * Made controller match casing mesh * Shifted Casings10 to an actual page number instead of magic number. Now sits on page 16, following where waterline casings will be implemented in future * Added Electromagnet Housing. Has no texture, but you can place an open its inventory * Added electromagnets and their texture files * Multi now requires EM housing and breaks if there are 2 * Electromagnet Housing has proper texture and can be wrenched. Also has a placeholder overlay * Tooltip updates. Added pollution * Electromagnet tiers modify processing logic. Some issues remaining * Prettier switch & spotlessApply * Multi now validates electromagnet before recipe check. Also added a machine casing texture * Pollution fix * Support for exotic energy hatches added. Recipe check fails if electromagnet is too weak * Stack size of 1 for electromagnets * New electromagnet textures * Final pass on EM textures. Also, EM Housing uses IV hull as base texture instead of ULV * Put in placeholder-ish recipes for controller/casings/EM housing * Placeholder recipes for electromagnets. Also fixed structure check, whoops * Renamed multi to Magnetic Flux Exhibitor * MFE can run as a polarizer * Fixed exotic warning getting stuck * Attempted to add assline recipes, not working * Fixed assembling line recipe templates. Thank you chochem <3 * Fancied up tooltips * Fixed parallel issue * Updated recipes. Will have to move them to coremod * Nerfed speed on all electromagnets * sa * Restricted MFE to multiamp non-laser. * Spotless * Animated Mag hatch * Added glow * Removed pollution. I am a gentle soul * Addition to structure check * Disabled wireless laser compatibility * sa (cherry picked from commit 155cf4dd7284ca84bd9be79f11b6f577b38a4e0d) * spotless * Removed all recipes. These have been replaced in the coremod * -Removed unnecessary structure check -MIN_CASING final -Baps author tag -Refactored mMagHatch to not be a list -Added tooltip builder in MagnetTiers * Forgot to run spotless * Last minute tooltip fix for structure accuracy --------- Co-authored-by: Dream Master <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/common/blocks/GT_Block_Casings10.java')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings10.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java
new file mode 100644
index 0000000000..8f5ee9de5b
--- /dev/null
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings10.java
@@ -0,0 +1,38 @@
+package gregtech.common.blocks;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Textures;
+import gregtech.api.util.GT_LanguageManager;
+
+/**
+ * The casings are split into separate files because they are registered as regular blocks, and a regular block can have
+ * 16 subtypes at most.
+ */
+public class GT_Block_Casings10 extends GT_Block_Casings_Abstract {
+
+ public GT_Block_Casings10() {
+ super(GT_Item_Casings10.class, "gt.blockcasings10", GT_Material_Casings.INSTANCE, 16);
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "MagTech Casing");
+
+ ItemList.Casing_Electromagnetic_Separator.set(new ItemStack(this, 1, 0));
+ }
+
+ @Override
+ public int getTextureIndex(int aMeta) {
+ return (16 << 7) | (aMeta + 48);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int ordinalSide, int aMeta) {
+ return switch (aMeta) {
+ case 0 -> Textures.BlockIcons.MACHINE_CASING_EMS.getIcon();
+ default -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon();
+ };
+ }
+}