diff options
author | Mary <33456283+FourIsTheNumber@users.noreply.github.com> | 2024-07-18 09:58:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-18 20:58:41 +0700 |
commit | e3a650785887866e4b8533b61044479ecb80aee7 (patch) | |
tree | a5dcc2993f3f234f93e5891286d18fdc426070b4 /src | |
parent | dcc8dac94e6d5a5561cf8bf38fc7f87e222b40e3 (diff) | |
download | GT5-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')
32 files changed, 722 insertions, 9 deletions
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index e80bc7345b..979fd3d064 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -294,7 +294,7 @@ public class GregTech_API { sBlockMetal9, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced; public static Block sBlockGranites, sBlockConcretes, sBlockStones; public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5, sBlockCasings6, - sBlockCasings8, sBlockCasings9, sSolenoidCoilCasings; + sBlockCasings8, sBlockCasings9, sBlockCasings10, sSolenoidCoilCasings; public static Block sBlockLongDistancePipes; public static Block sDroneRender; /** diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index f7314f6059..37caa7fc38 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -651,6 +651,10 @@ public class GT_Values { public static final String AuthorSilverMoon = "Author: " + EnumChatFormatting.AQUA + "SilverMoon"; public static final String AuthorTheEpicGamer274 = "Author: " + "TheEpicGamer274"; public static final String AuthorFourIsTheNumber = "Author: " + EnumChatFormatting.LIGHT_PURPLE + "FourIsTheNumber"; + public static final String authorBaps = "Author: " + EnumChatFormatting.GOLD + + "Ba" + + EnumChatFormatting.LIGHT_PURPLE + + "ps"; // 7.5F comes from GT_Tool_Turbine_Large#getBaseDamage() given huge turbines are the most efficient now. public static double getMaxPlasmaTurbineEfficiencyFromMaterial(Materials material) { diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 0aa953483f..d5ee302d6a 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1451,6 +1451,15 @@ public enum ItemList implements IItemContainer { Machine_Multi_LargeChemicalReactor, + Machine_Multi_IndustrialElectromagneticSeparator, + Casing_Electromagnetic_Separator, + Hatch_Electromagnet, + Electromagnet_Iron, + Electromagnet_Steel, + Electromagnet_Neodymium, + Electromagnet_Samarium, + Electromagnet_Tengam, + Machine_Multi_Canner, Machine_LV_Miner, diff --git a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java index 73e79e4452..d13891f813 100644 --- a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java +++ b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java @@ -315,6 +315,8 @@ public enum MetaTileEntityIDs { WIREMILL_IV(355), PCB_FACTORY_CONTROLLER(356), NANO_FORGE_CONTROLLER(357), + INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR_CONTROLLER(358), + MAG_HATCH(359), MULTI_CANNER_CONTROLLER(360), CENTRIFUGE_LV(361), CENTRIFUGE_MV(362), diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 05689c1148..8eccbb050d 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -313,6 +313,12 @@ public class Textures { MACHINE_CASING_VENT, MACHINE_CASING_VENT_T2, + OVERLAY_FRONT_EMS, + OVERLAY_FRONT_EMS_ACTIVE, + OVERLAY_FRONT_EMS_ACTIVE_GLOW, + OVERLAY_FRONT_EMS_GLOW, + MACHINE_CASING_EMS, + OVERLAY_FRONT_MULTI_CANNER, OVERLAY_FRONT_MULTI_CANNER_ACTIVE, OVERLAY_FRONT_MULTI_CANNER_ACTIVE_GLOW, @@ -499,6 +505,9 @@ public class Textures { ITEM_OUT_SIGN, OVERLAY_MUFFLER, + OVERLAY_EMS_HOUSING, + OVERLAY_EMS_HOUSING_GLOW, + OVERLAY_CONTROLLER, OVERLAY_ACTIVITYDETECTOR, OVERLAY_ACTIVITYDETECTOR_GLOW, @@ -1672,11 +1681,17 @@ public class Textures { public static final ITexture[] CASING_BLOCKS = new ITexture[128]; // original variable still limited to 128 public static ITexture[][] MACHINE_CASINGS = new ITexture[15][17]; + // spotless:off /** - * by Default pages are null page 0: 0-63 GT casing 1-4, 64-127 GT++ page 1: 0-15 GT casing 5, 22-26 GS dyson - * swarm, 48-57 GT casing 8, 63 EMT, 80-95 GT reinforced blocks, 96 casing 2 meta 6, 97 error casing page 8: - * 0-111 TecTech, 112-127 GT casing 6 page 12: 0-127 GlodBlock page 42: 0-126 glee8e, 127 KekzTech LSC base + * by Default pages are null + * page 0: 0-63 GT casing 1-4, 64-127 GT++ + * page 1: 0-15 GT casing 5, 22-26 GS dyson swarm, 48-57 GT casing 8, 63 EMT, 80-95 GT reinforced blocks, 96 casing 2 meta 6, 97 error casing + * page 8: 0-111 TecTech, 112-127 GT casing 6 + * page 12: 0-127 GlodBlock + * page 16: 0-15 GT glass 1, 16-31 GT casing 9, 32-47 GT glass 2, 48-63 GT casing 10 + * page 42: 0-126 glee8e, 127 KekzTech LSC base */ + // spotless:on public static ITexture[][] casingTexturePages = new ITexture[128][]; // page holder so we don't make an short // long array @@ -1694,6 +1709,7 @@ public class Textures { // adds some known pages, modders also can do it... GT_Utility.addTexturePage((byte) 1); GT_Utility.addTexturePage((byte) 8); + GT_Utility.addTexturePage((byte) 16); setCasingTextureForId(ERROR_TEXTURE_INDEX, ERROR_RENDERING[0]); } diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java new file mode 100644 index 0000000000..9000d63ba5 --- /dev/null +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MagHatch.java @@ -0,0 +1,108 @@ +package gregtech.api.metatileentity.implementations; + +import static gregtech.api.enums.GT_Values.AuthorFourIsTheNumber; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_EMS_HOUSING; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_EMS_HOUSING_GLOW; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraftforge.common.util.ForgeDirection; + +import org.apache.commons.lang3.ArrayUtils; + +import com.gtnewhorizons.modularui.api.screen.ModularWindow; +import com.gtnewhorizons.modularui.api.screen.UIBuildContext; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; + +import gregtech.api.gui.modularui.GT_UIInfos; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.render.TextureFactory; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_IndustrialElectromagneticSeparator; + +public class GT_MetaTileEntity_MagHatch extends GT_MetaTileEntity_Hatch { + + public GT_MetaTileEntity_MagHatch(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional, 5, 1, "Holds electromagnet for the Magnetic Flux Exhibitor"); + } + + public GT_MetaTileEntity_MagHatch(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription[0], aTextures); + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(ForgeDirection facing) { + return true; + } + + @Override + public String[] getDescription() { + return ArrayUtils.addAll(this.mDescriptionArray, AuthorFourIsTheNumber); + } + + @Override + public boolean useModularUI() { + return true; + } + + @Override + public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { + builder.widget( + new SlotWidget(inventoryHandler, 0) + .setFilter(GT_MetaTileEntity_IndustrialElectromagneticSeparator::isValidElectromagnet) + .setAccess(true, true) + .setPos(79, 34)); + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer); + return true; + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture, TextureFactory.builder() + .addIcon(OVERLAY_EMS_HOUSING) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_EMS_HOUSING_GLOW) + .extFacing() + .glow() + .build() }; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[] { aBaseTexture, TextureFactory.builder() + .addIcon(OVERLAY_EMS_HOUSING) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_EMS_HOUSING_GLOW) + .extFacing() + .glow() + .build() }; + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_MagHatch(mName, mTier, mDescriptionArray, mTextures); + } +} 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(); + }; + } +} diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings10.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings10.java new file mode 100644 index 0000000000..519549ce6b --- /dev/null +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings10.java @@ -0,0 +1,14 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +/** + * 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_Item_Casings10 extends GT_Item_Casings_Abstract { + + public GT_Item_Casings10(Block block) { + super(block); + } +} diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 0a977aecfa..809c73c2e7 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -183,6 +183,11 @@ import static gregtech.common.items.ID_MetaItem_01.Electric_Pump_UMV; import static gregtech.common.items.ID_MetaItem_01.Electric_Pump_UV; import static gregtech.common.items.ID_MetaItem_01.Electric_Pump_UXV; import static gregtech.common.items.ID_MetaItem_01.Electric_Pump_ZPM; +import static gregtech.common.items.ID_MetaItem_01.Electromagnet_Iron; +import static gregtech.common.items.ID_MetaItem_01.Electromagnet_Neodymium; +import static gregtech.common.items.ID_MetaItem_01.Electromagnet_Samarium; +import static gregtech.common.items.ID_MetaItem_01.Electromagnet_Steel; +import static gregtech.common.items.ID_MetaItem_01.Electromagnet_Tengam; import static gregtech.common.items.ID_MetaItem_01.Emitter_EV; import static gregtech.common.items.ID_MetaItem_01.Emitter_HV; import static gregtech.common.items.ID_MetaItem_01.Emitter_IV; @@ -441,6 +446,7 @@ import net.minecraft.init.Items; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import gregtech.api.GregTech_API; @@ -505,6 +511,7 @@ import gregtech.common.items.behaviors.Behaviour_Sonictron; import gregtech.common.items.behaviors.Behaviour_Spray_Color; import gregtech.common.items.behaviors.Behaviour_Spray_Color_Remover; import gregtech.common.items.behaviors.Behaviour_WrittenBook; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_IndustrialElectromagneticSeparator.MagnetTiers; public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { @@ -3087,7 +3094,36 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 16L))); - + ItemList.Electromagnet_Iron.set( + addItem( + Electromagnet_Iron.ID, + "Iron Electromagnet", + MagnetTiers.buildMagnetTooltip(MagnetTiers.Iron), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 8))); + ItemList.Electromagnet_Steel.set( + addItem( + Electromagnet_Steel.ID, + "Steel Electromagnet", + MagnetTiers.buildMagnetTooltip(MagnetTiers.Steel), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 16))); + ItemList.Electromagnet_Neodymium.set( + addItem( + Electromagnet_Neodymium.ID, + "Neodymium Electromagnet", + MagnetTiers.buildMagnetTooltip(MagnetTiers.Neodymium), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 24))); + ItemList.Electromagnet_Samarium.set( + addItem( + Electromagnet_Samarium.ID, + EnumChatFormatting.YELLOW + "Samarium Electromagnet", + MagnetTiers.buildMagnetTooltip(MagnetTiers.Samarium), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 32))); + ItemList.Electromagnet_Tengam.set( + addItem( + Electromagnet_Tengam.ID, + EnumChatFormatting.GREEN + "Tengam Electromagnet", + MagnetTiers.buildMagnetTooltip(MagnetTiers.Tengam), + new TC_Aspects.TC_AspectStack(TC_Aspects.MAGNETO, 40))); removeRecipes(); setBurnValues(); oredictBlacklistEntries(); @@ -3239,6 +3275,11 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 { setFluidContainerStats(32000 + Large_Fluid_Cell_Iridium.ID, 8_192_000L, 2L); setFluidContainerStats(32000 + Large_Fluid_Cell_Osmium.ID, 32_768_000L, 1L); setFluidContainerStats(32000 + Large_Fluid_Cell_Neutronium.ID, 131_072_000L, 1L); + setFluidContainerStats(32000 + Electromagnet_Iron.ID, 0L, 1L); + setFluidContainerStats(32000 + Electromagnet_Steel.ID, 0L, 1L); + setFluidContainerStats(32000 + Electromagnet_Neodymium.ID, 0L, 1L); + setFluidContainerStats(32000 + Electromagnet_Samarium.ID, 0L, 1L); + setFluidContainerStats(32000 + Electromagnet_Tengam.ID, 0L, 1L); } private void oredictBlacklistEntries() { diff --git a/src/main/java/gregtech/common/items/ID_MetaItem_01.java b/src/main/java/gregtech/common/items/ID_MetaItem_01.java index ba479f399c..fd6f1cc78d 100644 --- a/src/main/java/gregtech/common/items/ID_MetaItem_01.java +++ b/src/main/java/gregtech/common/items/ID_MetaItem_01.java @@ -97,6 +97,11 @@ public enum ID_MetaItem_01 { Steam_Regulator_HV(334), Steam_Regulator_EV(335), Steam_Regulator_IV(336), + Electromagnet_Iron(345), + Electromagnet_Steel(346), + Electromagnet_Neodymium(347), + Electromagnet_Samarium(348), + Electromagnet_Tengam(349), Shape_Extruder_Plate(350), Shape_Extruder_Rod(351), Shape_Extruder_Bolt(352), diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IndustrialElectromagneticSeparator.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IndustrialElectromagneticSeparator.java new file mode 100644 index 0000000000..7d877e4b42 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IndustrialElectromagneticSeparator.java @@ -0,0 +1,444 @@ +package gregtech.common.tileentities.machines.multi; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.enums.GT_HatchElement.*; +import static gregtech.api.enums.GT_Values.AuthorFourIsTheNumber; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EMS; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EMS_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EMS_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_EMS_GLOW; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofFrame; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + +import javax.annotation.Nonnull; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import org.jetbrains.annotations.NotNull; + +import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.logic.ProcessingLogic; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MagHatch; +import gregtech.api.multitileentity.multiblock.casing.Glasses; +import gregtech.api.recipe.RecipeMap; +import gregtech.api.recipe.RecipeMaps; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.recipe.check.SimpleCheckRecipeResult; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import gregtech.common.blocks.GT_Block_Casings10; +import gregtech.common.items.GT_MetaGenerated_Item_01; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; + +public class GT_MetaTileEntity_IndustrialElectromagneticSeparator + extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_IndustrialElectromagneticSeparator> + implements ISurvivalConstructable { + + public enum MagnetTiers { + + Iron(8, 0.8F, 1F, false), + Steel(24, 0.75F, 1.25F, false), + Neodymium(48, 0.7F, 1.5F, false), + Samarium(96, 0.6F, 2F, false), + Tengam(256, 0.5F, 2.5F, true); + + final int maxParallel; + final float euModifier, speedBoost; + final boolean supportsExotic; + + MagnetTiers(int maxParallel, float euModifier, float speedBoost, boolean supportsExotic) { + this.maxParallel = maxParallel; + this.euModifier = euModifier; + this.speedBoost = 1F / speedBoost; + this.supportsExotic = supportsExotic; + } + + public static String buildMagnetTooltip(MagnetTiers m) { + String tooltip = "Used in Magnetic Flux Exhibitor/n " + EnumChatFormatting.LIGHT_PURPLE + + Math.round(1F / m.speedBoost * 100) + + "% Speed/n " + + EnumChatFormatting.DARK_PURPLE + + Math.round(m.euModifier * 100) + + "% EU Cost/n " + + EnumChatFormatting.AQUA + + m.maxParallel + + " Parallels/n "; + + if (m.supportsExotic) + tooltip = tooltip + EnumChatFormatting.BOLD + EnumChatFormatting.GREEN + "Can Use Multiamp Hatches"; + + return tooltip; + } + } + + final int MIN_CASING = 64; + private GT_MetaTileEntity_MagHatch mMagHatch = null; + private MagnetTiers magnetTier = null; + private boolean polarizerMode = false; + + private static final String STRUCTURE_PIECE_MAIN = "main"; + private static final IStructureDefinition<GT_MetaTileEntity_IndustrialElectromagneticSeparator> STRUCTURE_DEFINITION = StructureDefinition + .<GT_MetaTileEntity_IndustrialElectromagneticSeparator>builder() + .addShape( + STRUCTURE_PIECE_MAIN, + (transpose( + new String[][] { + { " ", " ", " ", " CD DC ", " CDD DDC ", " CDD DDC ", + " CDDDC ", " CCC ", " " }, + { " ", " ", " ", " CD DC ", " CDD DDC ", " CDD DDC ", + " CDDDC ", " CCC ", " " }, + { " ", " ", " ", " CD DC ", " ", " D ", + " C ", " ", " " }, + { " ", " ", " ", " CD DC ", " ", " D ", + " C ", " ", " " }, + { " ", " BBB ", " BBBBB ", " CDBBBBBDC ", " BBBBB ", " BBB ", + " D ", " C ", " " }, + { " ", " AAA ", " A A ", " CDA D ADC ", " A A ", " AAA ", + " D ", " C ", " " }, + { " ", " BBB ", " BBBBB ", " CDBBBBBDC ", " BBBBB ", " BBB ", + " D ", " C ", " " }, + { " B~B ", " BBBBB ", " BBBBBBB ", "CDBBBBBBBDC", " BBBBBBB ", " BBBBB ", + " BBB ", " D ", " C " } }))) + .addElement('A', Glasses.chainAllGlasses()) + .addElement( + 'B', + ofChain( + buildHatchAdder(GT_MetaTileEntity_IndustrialElectromagneticSeparator.class) + .adder(GT_MetaTileEntity_IndustrialElectromagneticSeparator::addMagHatch) + .hatchClass(GT_MetaTileEntity_MagHatch.class) + .shouldReject(t -> !(t.mMagHatch == null)) + .casingIndex(((GT_Block_Casings10) GregTech_API.sBlockCasings10).getTextureIndex(0)) + .dot(1) + .build(), + buildHatchAdder(GT_MetaTileEntity_IndustrialElectromagneticSeparator.class) + .atLeast(InputBus, OutputBus, Maintenance, Energy, ExoticEnergy) + .casingIndex(((GT_Block_Casings10) GregTech_API.sBlockCasings10).getTextureIndex(0)) + .dot(1) + .buildAndChain( + onElementPass( + GT_MetaTileEntity_IndustrialElectromagneticSeparator::onCasingAdded, + ofBlock(GregTech_API.sBlockCasings10, 0))))) + .addElement('C', ofFrame(Materials.NeodymiumMagnetic)) + .addElement('D', ofFrame(Materials.SamariumMagnetic)) + .build(); + + public GT_MetaTileEntity_IndustrialElectromagneticSeparator(final int aID, final String aName, + final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_IndustrialElectromagneticSeparator(String aName) { + super(aName); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_IndustrialElectromagneticSeparator> getStructureDefinition() { + return STRUCTURE_DEFINITION; + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_IndustrialElectromagneticSeparator(this.mName); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirection side, ForgeDirection aFacing, + int colorIndex, boolean aActive, boolean redstoneLevel) { + ITexture[] rTexture; + if (side == aFacing) { + if (aActive) { + rTexture = new ITexture[] { + Textures.BlockIcons + .getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings10, 0)), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EMS_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EMS_ACTIVE_GLOW) + .extFacing() + .glow() + .build() }; + } else { + rTexture = new ITexture[] { + Textures.BlockIcons + .getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings10, 0)), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EMS) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_EMS_GLOW) + .extFacing() + .glow() + .build() }; + } + } else { + rTexture = new ITexture[] { Textures.BlockIcons + .getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings10, 0)) }; + } + return rTexture; + } + + @Override + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Electromagnetic Separator/Polarizer") + .addInfo("Controller Block for the Magnetic Flux Exhibitor") + .addInfo("Use screwdriver to switch mode") + .addInfo("Insert an electromagnet into the electromagnet housing to use") + .addInfo("Better electromagnets give further bonuses") + .addInfo("With Tengam electromagnet, multiamp (NOT laser) hatches are allowed") + .addInfo( + AuthorFourIsTheNumber + EnumChatFormatting.GRAY + + " & " + + EnumChatFormatting.GOLD + + "Ba" + + EnumChatFormatting.LIGHT_PURPLE + + "ps") + .addSeparator() + .beginStructureBlock(11, 8, 9, false) + .addController("Front Center") + .addCasingInfoMin("MagTech Casings", MIN_CASING, false) + .addOtherStructurePart("Any glass", "x12") + .addOtherStructurePart("Magnetic Neodymium Frame Box", "x40") + .addOtherStructurePart("Magnetic Samarium Frame Box", "x45") + .addOtherStructurePart("Electromagnet Housing", "x1 Only, Any Casing") + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .toolTipFinisher("GregTech"); + return tt; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 5, 7, 0); + } + + @Override + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { + if (mMachine) return -1; + return survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 5, 7, 0, elementBudget, env, false, true); + } + + private int mCasingAmount; + + private void onCasingAdded() { + mCasingAmount++; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasingAmount = 0; + mMagHatch = null; + mExoticEnergyHatches.clear(); + mEnergyHatches.clear(); + + if (!checkPiece(STRUCTURE_PIECE_MAIN, 5, 7, 0)) return false; + if (mCasingAmount < MIN_CASING) return false; + if (mMagHatch == null) return false; + + // If there are exotic hatches, ensure there is only 1, and it is not laser. Only multiamp allowed + if (!mExoticEnergyHatches.isEmpty()) { + if (!mEnergyHatches.isEmpty()) return false; + if (mExoticEnergyHatches.size() > 1) return false; + if (mExoticEnergyHatches.get(0) + .maxWorkingAmperesIn() > 64) return false; + } + + // All checks passed! + return true; + } + + @Override + protected ProcessingLogic createProcessingLogic() { + return new ProcessingLogic() { + + @NotNull + @Override + protected CheckRecipeResult validateRecipe(@Nonnull GT_Recipe recipe) { + findMagnet(); + if (magnetTier != null) { + if (!mExoticEnergyHatches.isEmpty() && !magnetTier.supportsExotic) + return SimpleCheckRecipeResult.ofFailure("electromagnet_insufficient"); + euModifier = magnetTier.euModifier; + speedBoost = magnetTier.speedBoost; + return CheckRecipeResultRegistry.SUCCESSFUL; + } + return SimpleCheckRecipeResult.ofFailure("electromagnet_missing"); + } + }.setMaxParallelSupplier(this::getMaxParallels); + } + + private int getMaxParallels() { + if (magnetTier != null) return magnetTier.maxParallel; + return 0; + } + + @Override + public RecipeMap<?> getRecipeMap() { + return polarizerMode ? RecipeMaps.polarizerRecipes : RecipeMaps.electroMagneticSeparatorRecipes; + } + + @Nonnull + @Override + public Collection<RecipeMap<?>> getAvailableRecipeMaps() { + return Arrays.asList(RecipeMaps.polarizerRecipes, RecipeMaps.electroMagneticSeparatorRecipes); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + aNBT.setBoolean("polarizerMode", polarizerMode); + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + polarizerMode = aNBT.getBoolean("polarizerMode"); + super.loadNBTData(aNBT); + } + + @Override + public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) { + polarizerMode = !polarizerMode; + if (polarizerMode) { + PlayerUtils.messagePlayer(aPlayer, "Now running in Polarizing Mode."); + } else { + PlayerUtils.messagePlayer(aPlayer, "Now running in Separating Mode."); + } + } + + @Override + public void clearHatches() { + super.clearHatches(); + mExoticEnergyHatches.clear(); + } + + @Override + public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, + int z) { + super.getWailaNBTData(player, tile, tag, world, x, y, z); + tag.setBoolean("mode", polarizerMode); + } + + @Override + public void getWailaBody(ItemStack itemStack, List<String> currentTip, IWailaDataAccessor accessor, + IWailaConfigHandler config) { + super.getWailaBody(itemStack, currentTip, accessor, config); + final NBTTagCompound tag = accessor.getNBTData(); + currentTip.add( + StatCollector.translateToLocal("GT5U.machines.oreprocessor1") + " " + + EnumChatFormatting.WHITE + + StatCollector.translateToLocal( + "GT5U.INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR.mode." + (tag.getBoolean("mode") ? 1 : 0)) + + EnumChatFormatting.RESET); + } + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public boolean supportsVoidProtection() { + return true; + } + + @Override + public boolean supportsBatchMode() { + return true; + } + + @Override + public boolean supportsInputSeparation() { + return true; + } + + @Override + public boolean supportsSingleRecipeLocking() { + return true; + } + + private void findMagnet() { + magnetTier = null; + if (mMagHatch != null) { + ItemStack aSlot = mMagHatch.getStackInSlot(0); + if (aSlot != null) { + switch (aSlot.getItemDamage()) { + case 32345 -> magnetTier = MagnetTiers.Iron; + case 32346 -> magnetTier = MagnetTiers.Steel; + case 32347 -> magnetTier = MagnetTiers.Neodymium; + case 32348 -> magnetTier = MagnetTiers.Samarium; + case 32349 -> magnetTier = MagnetTiers.Tengam; + default -> magnetTier = null; + } + } + + } + } + + public static boolean isValidElectromagnet(ItemStack aMagnet) { + return aMagnet != null && aMagnet.getItem() instanceof GT_MetaGenerated_Item_01 + && aMagnet.getItemDamage() >= 32345 + && aMagnet.getItemDamage() <= 32349; + } + + private boolean addMagHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity != null) { + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_MagHatch) { + ((GT_MetaTileEntity_MagHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + if (mMagHatch == null) { + mMagHatch = (GT_MetaTileEntity_MagHatch) aMetaTileEntity; + return true; + } + } + } + return false; + } +} diff --git a/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java index 8c6bfc8100..03c1f2a280 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/AssemblyLineRecipes.java @@ -883,5 +883,6 @@ public class AssemblyLineRecipes implements Runnable { .duration(60 * SECONDS) .eut(TierEU.RECIPE_UHV) .addTo(AssemblyLine); + } } diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 7a0c7cfb84..04412da4c7 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -52,6 +52,7 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.common.blocks.GT_Block_Casings1; +import gregtech.common.blocks.GT_Block_Casings10; import gregtech.common.blocks.GT_Block_Casings2; import gregtech.common.blocks.GT_Block_Casings3; import gregtech.common.blocks.GT_Block_Casings4; @@ -536,6 +537,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { GregTech_API.sBlockCasings6 = new GT_Block_Casings6(); GregTech_API.sBlockCasings8 = new GT_Block_Casings8(); GregTech_API.sBlockCasings9 = new GT_Block_Casings9(); + GregTech_API.sBlockCasings10 = new GT_Block_Casings10(); GregTech_API.sBlockGranites = new GT_Block_Granites(); GregTech_API.sBlockLongDistancePipes = new GT_Block_LongDistancePipe(); GregTech_API.sBlockConcretes = new GT_Block_Concretes(); diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 31d917e868..5bd342cc48 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -146,6 +146,7 @@ import static gregtech.api.enums.MetaTileEntityIDs.HULL_WROUGHT_IRON; import static gregtech.api.enums.MetaTileEntityIDs.HULL_ZPM; import static gregtech.api.enums.MetaTileEntityIDs.IMPLOSION_COMPRESSOR_CONTROLLER; import static gregtech.api.enums.MetaTileEntityIDs.INDUSTRIAL_APIARY; +import static gregtech.api.enums.MetaTileEntityIDs.INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR_CONTROLLER; import static gregtech.api.enums.MetaTileEntityIDs.INPUT_BUS_EV; import static gregtech.api.enums.MetaTileEntityIDs.INPUT_BUS_HV; import static gregtech.api.enums.MetaTileEntityIDs.INPUT_BUS_IV; @@ -224,6 +225,7 @@ import static gregtech.api.enums.MetaTileEntityIDs.MAGIC_ENERGY_ABSORBER_MV; import static gregtech.api.enums.MetaTileEntityIDs.MAGIC_ENERGY_CONVERTER_HV; import static gregtech.api.enums.MetaTileEntityIDs.MAGIC_ENERGY_CONVERTER_LV; import static gregtech.api.enums.MetaTileEntityIDs.MAGIC_ENERGY_CONVERTER_MV; +import static gregtech.api.enums.MetaTileEntityIDs.MAG_HATCH; import static gregtech.api.enums.MetaTileEntityIDs.MAINTENANCE_HATCH; import static gregtech.api.enums.MetaTileEntityIDs.MASS_FABRICATOR_EV; import static gregtech.api.enums.MetaTileEntityIDs.MASS_FABRICATOR_HV; @@ -483,6 +485,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Multi import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_QuadrupleHumongous; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MagHatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Transformer; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Wireless_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Wireless_Hatch; @@ -551,6 +554,7 @@ import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionCompu import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer3; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_HeatExchanger; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_ImplosionCompressor; +import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_IndustrialElectromagneticSeparator; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_IntegratedOreFactory; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeBoiler_Bronze; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeBoiler_Steel; @@ -602,8 +606,6 @@ import gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperChest; import gregtech.common.tileentities.storage.GT_MetaTileEntity_SuperTank; // Free IDs left for machines in GT as of 29th of July 2022 - Colen. Please try use them up in order. -// 358 -// 359 // 366 // 367 // 368 @@ -1038,6 +1040,12 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC new GT_MetaTileEntity_DroneCentre(Drone_Centre.ID, "multimachine_DroneCentre", "Drone Centre") .getStackForm(1)); + ItemList.Machine_Multi_IndustrialElectromagneticSeparator.set( + new GT_MetaTileEntity_IndustrialElectromagneticSeparator( + INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR_CONTROLLER.ID, + "multimachine.electromagneticseparator", + "Magnetic Flux Exhibitor").getStackForm(1)); + ItemList.Machine_Multi_Canner.set( new GT_MetaTileEntity_MultiCanner(MULTI_CANNER_CONTROLLER.ID, "multimachine.canner", "TurboCan Pro") .getStackForm(1)); @@ -2366,6 +2374,11 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC "Crafting Input Slave").getStackForm(1L)); } + private static void registerMagHatch() { + ItemList.Hatch_Electromagnet.set( + new GT_MetaTileEntity_MagHatch(MAG_HATCH.ID, "hatch.mag_hatch", "Electromagnet Housing").getStackForm(1L)); + } + private static void registerInputBus() { ItemList.Hatch_Input_Bus_ULV.set( new GT_MetaTileEntity_Hatch_InputBus(INPUT_BUS_ULV.ID, "hatch.input_bus.tier.00", "Input Bus (ULV)", 0) @@ -4042,6 +4055,7 @@ public class GT_Loader_MetaTileEntities implements Runnable { // TODO CHECK CIRC registerSuperChest(); registerLongDistancePipe(); registerAE2Hatches(); + registerMagHatch(); registerInputBus(); registerOutputBus(); registerMufflerHatch(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index e1f7c415ef..71274e0091 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -242,6 +242,9 @@ public enum GregtechItemList implements GregtechItemContainer { Industrial_Electrolyzer, Casing_Electrolyzer, + // Industrial Electromagnetic Separator + Industrial_Electromagnetic_Separator, + // Industrial Maceration Stack Industrial_MacerationStack, Casing_MacerationStack, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java index 84aa3cf77f..544df5821e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamCompressor.java @@ -3,7 +3,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.s import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.withChannel; import static gregtech.api.GregTech_API.sBlockCasings1; import static gregtech.api.GregTech_API.sBlockCasings2; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java index d84003bb0f..b03c7b2a7a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java @@ -3,7 +3,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.s import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.withChannel; import static gregtech.api.GregTech_API.sBlockCasings1; import static gregtech.api.GregTech_API.sBlockCasings2; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 9d5a59264c..1136c50915 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -327,6 +327,8 @@ GT5U.GTPP_MULTI_WASH_PLANT.mode.1=Simple Washer GT5U.GTPP_MULTI_WASH_PLANT.mode.2=Chemical Bath GT5U.GTPP_MULTI_INDUSTRIAL_PLATE_PRESS.mode.0=Forming Press GT5U.GTPP_MULTI_INDUSTRIAL_PLATE_PRESS.mode.1=Bending +GT5U.INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR.mode.0=Electromagnetic Separator +GT5U.INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR.mode.1=Electromagnetic Polarizer GT5U.GTPP_MULTI_INDUSTRIAL_MULTI_MACHINE.mode.0=Metal GT5U.GTPP_MULTI_INDUSTRIAL_MULTI_MACHINE.mode.1=Fluid GT5U.GTPP_MULTI_INDUSTRIAL_MULTI_MACHINE.mode.2=Misc @@ -483,6 +485,8 @@ GT5U.gui.text.no_lubricant=§7No lubricant found GT5U.gui.text.fuel_quality_too_high=§7Fuel quality too high to run without boost GT5U.gui.text.no_data_sticks=§7No Data Sticks found GT5U.gui.text.bio_upgrade_missing=§7Recipe needs Bio Upgrade to start +GT5U.gui.text.electromagnet_missing=§7Needs an Electromagnet to run +GT5U.gui.text.electromagnet_insufficient=§7Electromagnet too weak to handle exotic energy hatches GT5U.gui.text.cleanroom_running=§aCleanroom running GT5U.gui.text.no_machine=§7No valid processing machine GT5U.gui.text.machine_mismatch=§7Machine doesn't match to locked recipe diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EMS.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EMS.png Binary files differnew file mode 100644 index 0000000000..32001ad716 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EMS.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING.png Binary files differnew file mode 100644 index 0000000000..bd5cf275db --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING.png.mcmeta new file mode 100644 index 0000000000..0abd1dd96d --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING_GLOW.png Binary files differnew file mode 100644 index 0000000000..0de4105d57 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING_GLOW.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING_GLOW.png.mcmeta b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING_GLOW.png.mcmeta new file mode 100644 index 0000000000..d2ce2e660a --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_EMS_HOUSING_GLOW.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation":{ + "frametime":2 + } +} diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS.png Binary files differnew file mode 100644 index 0000000000..6092ec4c18 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_ACTIVE.png Binary files differnew file mode 100644 index 0000000000..ffd43d8dc2 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_ACTIVE.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_ACTIVE_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_ACTIVE_GLOW.png Binary files differnew file mode 100644 index 0000000000..3bb29bbda6 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_ACTIVE_GLOW.png diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_GLOW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_GLOW.png Binary files differnew file mode 100644 index 0000000000..b7955d63ab --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EMS_GLOW.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/345.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/345.png Binary files differnew file mode 100644 index 0000000000..a09e6770a0 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/345.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/346.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/346.png Binary files differnew file mode 100644 index 0000000000..67452a2198 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/346.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/347.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/347.png Binary files differnew file mode 100644 index 0000000000..d77ba1974b --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/347.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/348.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/348.png Binary files differnew file mode 100644 index 0000000000..115597c2ff --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/348.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/349.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/349.png Binary files differnew file mode 100644 index 0000000000..6b17d56df8 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/349.png |