diff --git a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java index 9da7de5578..31f2ce4f31 100644 --- a/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java +++ b/src/main/java/gtPlusPlus/core/item/crafting/ItemDummyResearch.java @@ -31,7 +31,8 @@ public static enum ASSEMBLY_LINE_RESEARCH { RESEARCH_8_TURBINE_AUTOMATION("Turbine Automation", "You really don't want to share this with anyone!"), RESEARCH_9_CLOAKING("Cloaking Technologies", "Sneaking around like a mouse"), RESEARCH_10_SPARGING("Gas Sparging", "Blowing gas for results"), - RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"); + RESEARCH_11_MOLECULAR_TRANSFORMER("Molecular Transformation", "Turning things into something better"), + RESEARCH_12_HIGH_AMPERAGE("High-Amp Technologies", "I want it louder, more power."); private final String mName; private final String mDesc; diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 4df59ebd81..0277ffce51 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -7,6 +7,13 @@ import static gregtech.api.enums.Mods.GregTech; import static gregtech.api.enums.Mods.Railcraft; import static gregtech.api.enums.Mods.RemoteIO; +import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; +import static gregtech.api.util.GT_RecipeBuilder.HOURS; +import static gregtech.api.util.GT_RecipeBuilder.INGOTS; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gregtech.api.util.GT_RecipeConstants.AssemblyLine; +import static gregtech.api.util.GT_RecipeConstants.RESEARCH_ITEM; +import static gregtech.api.util.GT_RecipeConstants.RESEARCH_TIME; import java.util.List; @@ -26,6 +33,7 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.TierEU; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -252,6 +260,7 @@ private static void run() { advHeatExchanger(); chiselBuses(); solidifierHatches(); + maUpgradeChip(); gt4FarmManager(); gt4Inventory(); @@ -3063,4 +3072,40 @@ private static void solidifierHatches() { (int) GT_Values.VP[componentTier]); } } + + private static void maUpgradeChip() { + // research item recipe + GT_Values.RA.stdBuilder() + .itemInputs( + GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.SuperconductorUIV, 64), + ItemList.Casing_Coil_Hypogen.get(64), + GT_Utility.getIntegratedCircuit(1)) + .itemOutputs(ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_12_HIGH_AMPERAGE, 1)) + .duration(20 * SECONDS).eut(TierEU.RECIPE_UIV).addTo(assemblerRecipes); + + // upgrade chip recipe + + GT_Values.RA.stdBuilder() + .metadata( + RESEARCH_ITEM, + ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_12_HIGH_AMPERAGE, 1)) + .metadata(RESEARCH_TIME, 2 * HOURS) + .itemInputs( + ItemList.Field_Generator_UIV.get(32), + ItemList.Electric_Motor_UEV.get(64), + ItemList.Wireless_Dynamo_Energy_UMV.get(32), + ALLOY.PIKYONIUM.getGear(8), + new Object[] { CI.getTieredCircuitOreDictName(7), 64 }, + new Object[] { CI.getTieredCircuitOreDictName(8), 32 }, + new Object[] { CI.getTieredCircuitOreDictName(9), 16 }, + GregtechItemList.Laser_Lens_Special.get(1), + ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 3, 64)) + .fluidInputs( + ALLOY.NITINOL_60.getFluidStack(144 * 9 * 4), + ALLOY.ENERGYCRYSTAL.getFluidStack(144 * 9 * 8), + ALLOY.TUMBAGA.getFluidStack(144 * 9 * 32), + Materials.Nichrome.getMolten(16 * INGOTS)) + .itemOutputs(GregtechItemList.MultiAmp_Upgrade_Chip.get(1)).eut(TierEU.RECIPE_UIV).duration(2 * HOURS) + .addTo(AssemblyLine); + } } 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 41ccecbbff..46c93b3bdc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -168,9 +168,10 @@ public enum GregtechItemList implements GregtechItemContainer { // Pellet Mold Pellet_Mold, - // Upgrade chip for Distillus + // Upgrade chips Distillus_Upgrade_Chip, Maceration_Upgrade_Chip, + MultiAmp_Upgrade_Chip, // Milling Balls Milling_Ball_Alumina, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 079b90f81c..7839acf917 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -204,7 +204,11 @@ public String[] getInfoData() { "" + EnumChatFormatting.YELLOW + Long.toString(getMaxInputVoltage()) + EnumChatFormatting.RESET - + " EU/t(*2A) " + + " EU/t(*" + + EnumChatFormatting.YELLOW + + Long.toString(getMaxInputAmps()) + + EnumChatFormatting.RESET + + ") " + StatCollector.translateToLocal("GTPP.machines.tier") + ": " + EnumChatFormatting.YELLOW diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase_ExoticCapable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase_ExoticCapable.java new file mode 100644 index 0000000000..e90418dec1 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase_ExoticCapable.java @@ -0,0 +1,184 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; +import net.minecraftforge.common.util.ForgeDirection; + +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyTunnel; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.logic.ProcessingLogic; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.util.GT_ExoticEnergyInputHelper; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; + +// how to use this class +// extend this instead of GregtechMeta_MultiBlockBase +// change Energy to Energy.or(ExoticEnergy) in structure definition +// make sure checkHatch is called in checkMachine + +public abstract class GregtechMeta_MultiBlockBase_ExoticCapable> + extends GregtechMeta_MultiBlockBase { + + private boolean multiAmp = false; + + public GregtechMeta_MultiBlockBase_ExoticCapable(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GregtechMeta_MultiBlockBase_ExoticCapable(String aName) { + super(aName); + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide() && aTick % 20 == 0 && !multiAmp) { + ItemStack aGuiStack = this.getControllerSlot(); + if (GregtechItemList.MultiAmp_Upgrade_Chip.isStackEqual(aGuiStack, false, true)) { + multiAmp = true; + mInventory[1] = ItemUtils.depleteStack(aGuiStack); + markDirty(); + // schedule a structure check + mUpdated = true; + } + } + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, ForgeDirection side, + float aX, float aY, float aZ) { + if (!multiAmp && !aPlayer.isSneaking()) { + ItemStack heldItem = aPlayer.getHeldItem(); + if (GregtechItemList.MultiAmp_Upgrade_Chip.isStackEqual(heldItem, false, true)) { + multiAmp = true; + aPlayer.setCurrentItemOrArmor(0, ItemUtils.depleteStack(heldItem)); + if (getBaseMetaTileEntity().isServerSide()) { + markDirty(); + aPlayer.inventory.markDirty(); + // schedule a structure check + mUpdated = true; + } + return true; + } + } + return super.onRightclick(aBaseMetaTileEntity, aPlayer, side, aX, aY, aZ); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mExotic", multiAmp); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + if (!aNBT.hasKey("mExotic")) multiAmp = false; + else multiAmp = aNBT.getBoolean("mExotic"); + } + + @Override + public void initDefaultModes(NBTTagCompound aNBT) { + super.initDefaultModes(aNBT); + if (aNBT == null || !aNBT.hasKey("mExotic")) { + multiAmp = false; + } else { + multiAmp = aNBT.getBoolean("mExotic"); + } + } + + @Override + public void setItemNBT(NBTTagCompound aNBT) { + super.setItemNBT(aNBT); + aNBT.setBoolean("mExotic", multiAmp); + } + + @Override + public void addAdditionalTooltipInformation(ItemStack stack, List tooltip) { + super.addAdditionalTooltipInformation(stack, tooltip); + NBTTagCompound aNBT = stack.getTagCompound(); + int tier; + if (aNBT == null || !aNBT.hasKey("mExotic") || !aNBT.getBoolean("mExotic")) { + return; + } else { + tooltip.add(StatCollector.translateToLocal("tooltip.multi_amp_enabled")); + } + } + + @Override + public List getExoticAndNormalEnergyHatchList() { + List tHatches = new ArrayList<>(); + tHatches.addAll(mExoticEnergyHatches); + tHatches.addAll(mEnergyHatches); + return tHatches; + } + + private boolean checkExotics() { + for (GT_MetaTileEntity_Hatch tHatch : getExoticAndNormalEnergyHatchList()) { + if (tHatch instanceof GT_MetaTileEntity_Hatch_EnergyTunnel + || (!multiAmp && tHatch instanceof GT_MetaTileEntity_Hatch_EnergyMulti)) { + return false; + } + } + return true; + } + + @Override + public boolean checkHatch() { + return checkExotics() && super.checkHatch(); + } + + @Override + protected void setProcessingLogicPower(ProcessingLogic logic) { + logic.setAvailableVoltage(getMaxInputVoltage()); + logic.setAvailableAmperage(multiAmp ? getMaxInputAmps() : 1); + logic.setAmperageOC(!multiAmp); + } + + /* + * As far as I can tell, this never runs. It just doesn't work, and I have no idea what is going on in + * GregtechMeta_MultiBlockBase that makes it not work + * @Override public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { boolean exotic + * = addExoticEnergyInputToMachineList(aTileEntity, aBaseCasingIndex); return super.addToMachineList(aTileEntity, + * aBaseCasingIndex) || exotic; } + */ + + @Override + public boolean addToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) { + boolean exotic = false; + if (aMetaTileEntity == null) return false; + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch hatch + && GT_ExoticEnergyInputHelper.isExoticEnergyInput(aMetaTileEntity)) { + hatch.updateTexture(aBaseCasingIndex); + hatch.updateCraftingIcon(this.getMachineCraftingIcon()); + exotic = mExoticEnergyHatches.add(hatch); + } + return super.addToMachineList(aMetaTileEntity, aBaseCasingIndex) || exotic; + } + + @Override + public String[] getInfoData() { + System.out.println("MCMEME"); + for (GT_MetaTileEntity_Hatch tHatch : this.getExoticEnergyHatches()) { + System.out.println("FUGGO"); + } + for (GT_MetaTileEntity_Hatch tHatch : this.mAllEnergyHatches) { + System.out.println(tHatch.mName); + } + + for (GT_MetaTileEntity_Hatch tHatch : this.mTecTechEnergyHatches) { + System.out.println(tHatch.mName); + } + return super.getInfoData(); + } + +} diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index defa3d558b..bc7b427a8e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -295,6 +295,17 @@ public void generateMetaItems() { .set(this.addItem(151, "Distillus Upgrade Chip", "Used to upgrade Distillus to Tier 2")); GregtechItemList.Maceration_Upgrade_Chip .set(this.addItem(152, "Maceration Upgrade Chip", "Used to upgrade Maceration Stack to Tier 2")); + GregtechItemList.MultiAmp_Upgrade_Chip.set( + this.addItem( + 153, + "Multi-Amp Upgrade Chip", + "Used to make some machines compatible with Multi-Amp energy Hatchs.")); + /* + * +"\n" + "Disables tierskipping " +"\n" + + * "Supports Extruder, LPF, Cutting Machine, Mixer, Press, and Forge Hammer " TODO: not sure if there is an easy + * way to get multiline tooltips here + */ + } public void registerCustomCircuits() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java index e729b23ac1..82ba3513f8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java @@ -4,6 +4,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; import static gregtech.api.enums.GT_HatchElement.InputBus; import static gregtech.api.enums.GT_HatchElement.InputHatch; import static gregtech.api.enums.GT_HatchElement.Maintenance; @@ -39,11 +40,12 @@ import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase_ExoticCapable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -public class GregtechMetaTileEntity_IndustrialCuttingMachine extends - GregtechMeta_MultiBlockBase implements ISurvivalConstructable { +public class GregtechMetaTileEntity_IndustrialCuttingMachine + extends GregtechMeta_MultiBlockBase_ExoticCapable + implements ISurvivalConstructable { private boolean mCuttingMode = true; private int mCasing; @@ -94,9 +96,13 @@ public IStructureDefinition get { "CCC", "CCC", "CCC", "CCC", "CCC" }, })) .addElement( 'C', - buildHatchAdder(GregtechMetaTileEntity_IndustrialCuttingMachine.class) - .atLeast(InputBus, InputHatch, OutputBus, Maintenance, Energy, Muffler) - .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain( + buildHatchAdder(GregtechMetaTileEntity_IndustrialCuttingMachine.class).atLeast( + InputBus, + InputHatch, + OutputBus, + Maintenance, + Energy.or(ExoticEnergy), + Muffler).casingIndex(getCasingTextureIndex()).dot(1).buildAndChain( onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings2Misc, 13)))) .build(); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java index 149d1a8017..86cc103439 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java @@ -4,6 +4,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; import static gregtech.api.enums.GT_HatchElement.InputBus; import static gregtech.api.enums.GT_HatchElement.Maintenance; import static gregtech.api.enums.GT_HatchElement.Muffler; @@ -30,11 +31,12 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase_ExoticCapable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -public class GregtechMetaTileEntity_IndustrialExtruder extends - GregtechMeta_MultiBlockBase implements ISurvivalConstructable { +public class GregtechMetaTileEntity_IndustrialExtruder + extends GregtechMeta_MultiBlockBase_ExoticCapable + implements ISurvivalConstructable { private int mCasing; private static IStructureDefinition STRUCTURE_DEFINITION = null; @@ -85,7 +87,7 @@ public IStructureDefinition getStruct .addElement( 'C', buildHatchAdder(GregtechMetaTileEntity_IndustrialExtruder.class) - .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler) + .atLeast(InputBus, OutputBus, Maintenance, Energy.or(ExoticEnergy), Muffler) .casingIndex(getCasingTextureIndex()).dot(1).buildAndChain( onElementPass( x -> ++x.mCasing, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java index d7a182e483..84ddc4321d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialForgeHammer.java @@ -5,6 +5,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; import static gregtech.api.enums.GT_HatchElement.InputBus; import static gregtech.api.enums.GT_HatchElement.InputHatch; import static gregtech.api.enums.GT_HatchElement.Maintenance; @@ -46,12 +47,13 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase_ExoticCapable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; @SuppressWarnings("SpellCheckingInspection") -public class GregtechMetaTileEntity_IndustrialForgeHammer extends - GregtechMeta_MultiBlockBase implements ISurvivalConstructable { +public class GregtechMetaTileEntity_IndustrialForgeHammer + extends GregtechMeta_MultiBlockBase_ExoticCapable + implements ISurvivalConstructable { private int mCasing; private int mAnvilTier = 0; @@ -129,9 +131,14 @@ public IStructureDefinition getStr { "CCC", "CCC", "CCC" }, })) .addElement( 'C', - buildHatchAdder(GregtechMetaTileEntity_IndustrialForgeHammer.class) - .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch) - .casingIndex(TAE.getIndexFromPage(1, 11)).dot(1).buildAndChain( + buildHatchAdder(GregtechMetaTileEntity_IndustrialForgeHammer.class).atLeast( + InputBus, + OutputBus, + Maintenance, + Energy.or(ExoticEnergy), + Muffler, + InputHatch, + OutputHatch).casingIndex(TAE.getIndexFromPage(1, 11)).dot(1).buildAndChain( onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings5Misc, 6)))) .addElement( 'A', diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java index e9172ae5a9..0d5cc6a990 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java @@ -4,6 +4,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; import static gregtech.api.enums.GT_HatchElement.InputBus; import static gregtech.api.enums.GT_HatchElement.InputHatch; import static gregtech.api.enums.GT_HatchElement.Maintenance; @@ -36,11 +37,12 @@ import gtPlusPlus.api.recipe.GTPPRecipeMaps; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase_ExoticCapable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; public class GregtechMetaTileEntity_IndustrialMixer - extends GregtechMeta_MultiBlockBase implements ISurvivalConstructable { + extends GregtechMeta_MultiBlockBase_ExoticCapable + implements ISurvivalConstructable { public static int CASING_TEXTURE_ID; public static String mCasingName = "Multi-Use Casing"; @@ -109,9 +111,14 @@ public IStructureDefinition getStructure { "C~C", "CMC", "CCC" }, { "CCC", "CCC", "CCC" }, })) .addElement( 'C', - buildHatchAdder(GregtechMetaTileEntity_IndustrialMixer.class) - .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch) - .casingIndex(CASING_TEXTURE_ID).dot(1).buildAndChain( + buildHatchAdder(GregtechMetaTileEntity_IndustrialMixer.class).atLeast( + InputBus, + OutputBus, + Maintenance, + Energy.or(ExoticEnergy), + Muffler, + InputHatch, + OutputHatch).casingIndex(CASING_TEXTURE_ID).dot(1).buildAndChain( onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 2)))) .addElement('M', ofBlock(GregTech_API.sBlockCasings4, 11)).build(); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java index 17e1572cb1..aaa7ab63cf 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java @@ -4,6 +4,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; import static gregtech.api.enums.GT_HatchElement.InputBus; import static gregtech.api.enums.GT_HatchElement.InputHatch; import static gregtech.api.enums.GT_HatchElement.Maintenance; @@ -64,13 +65,14 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Solidifier; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase_ExoticCapable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; -public class GregtechMetaTileEntity_IndustrialMultiMachine extends - GregtechMeta_MultiBlockBase implements ISurvivalConstructable { +public class GregtechMetaTileEntity_IndustrialMultiMachine + extends GregtechMeta_MultiBlockBase_ExoticCapable + implements ISurvivalConstructable { protected int mInternalMode = 0; private static final int MODE_COMPRESSOR = 0; @@ -162,9 +164,14 @@ public IStructureDefinition getSt { "CCC", "CCC", "CCC" }, })) .addElement( 'C', - buildHatchAdder(GregtechMetaTileEntity_IndustrialMultiMachine.class) - .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler, InputHatch, OutputHatch) - .casingIndex(getTextureIndex()).dot(1).buildAndChain( + buildHatchAdder(GregtechMetaTileEntity_IndustrialMultiMachine.class).atLeast( + InputBus, + OutputBus, + Maintenance, + Energy.or(ExoticEnergy), + Muffler, + InputHatch, + OutputHatch).casingIndex(getTextureIndex()).dot(1).buildAndChain( onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasings3Misc, 2)))) .build(); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java index 8ea7787c35..9d6a5fd31b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java @@ -4,6 +4,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.ExoticEnergy; import static gregtech.api.enums.GT_HatchElement.InputBus; import static gregtech.api.enums.GT_HatchElement.Maintenance; import static gregtech.api.enums.GT_HatchElement.Muffler; @@ -37,11 +38,12 @@ import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase_ExoticCapable; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -public class GregtechMetaTileEntity_IndustrialPlatePress extends - GregtechMeta_MultiBlockBase implements ISurvivalConstructable { +public class GregtechMetaTileEntity_IndustrialPlatePress + extends GregtechMeta_MultiBlockBase_ExoticCapable + implements ISurvivalConstructable { private boolean mFormingMode = false; private int mCasing; @@ -92,8 +94,8 @@ public IStructureDefinition getStru .addElement( 'C', buildHatchAdder(GregtechMetaTileEntity_IndustrialPlatePress.class) - .atLeast(InputBus, OutputBus, Maintenance, Energy, Muffler).casingIndex(50).dot(1) - .buildAndChain( + .atLeast(InputBus, OutputBus, Maintenance, Energy.or(ExoticEnergy), Muffler) + .casingIndex(50).dot(1).buildAndChain( onElementPass(x -> ++x.mCasing, ofBlock(ModBlocks.blockCasingsMisc, 4)))) .build(); } diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 5b9e9dd59f..09b460cf98 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -278,3 +278,6 @@ achievement.gt.blockmachines.moleculartransformer.controller.tier.single=Molecul achievement.gt.blockmachines.moleculartransformer.controller.tier.single.desc=[AL] Pickup this item to see the recipe in NEI achievement.gt.blockmachines.gtpp.multimachine.replicator=Elemental Duplicator achievement.gt.blockmachines.gtpp.multimachine.replicator.desc=[AL] Pickup this item to see the recipe in NEI + +//2024-4-15 +tooltip.multi_amp_enabled=Compatible with Multi-Amp Hatches diff --git a/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/153.png b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/153.png new file mode 100644 index 0000000000..3409a9b693 Binary files /dev/null and b/src/main/resources/assets/miscutils/textures/items/MU-metaitem.01/153.png differ