diff --git a/dependencies.gradle b/dependencies.gradle index 87bd86f62ce..c4b9d719167 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -39,7 +39,7 @@ dependencies { api("com.github.GTNewHorizons:NotEnoughItems:2.6.34-GTNH:dev") api("com.github.GTNewHorizons:NotEnoughIds:2.1.0:dev") api("com.github.GTNewHorizons:GTNHLib:0.5.5:dev") - api("com.github.GTNewHorizons:ModularUI:1.2.1:dev") + api("com.github.GTNewHorizons:ModularUI:1.2.2:dev") api("com.github.GTNewHorizons:ModularUI2:2.1.4-1.7.10:dev") api("com.github.GTNewHorizons:waila:1.8.1:dev") api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-450-GTNH:dev") @@ -49,7 +49,7 @@ dependencies { compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.10.1:dev') compileOnlyApi("com.github.GTNewHorizons:Mobs-Info:0.4.6-GTNH:dev") - compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.6:dev") + compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.10:dev") implementation('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false} // Required to prevent an older bauble api from Extra Utilities from loading first in the javac classpath compileOnly('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false} diff --git a/src/main/java/ggfab/mte/MTEAdvAssLine.java b/src/main/java/ggfab/mte/MTEAdvAssLine.java index c1fd180b92a..941f42e3412 100644 --- a/src/main/java/ggfab/mte/MTEAdvAssLine.java +++ b/src/main/java/ggfab/mte/MTEAdvAssLine.java @@ -715,20 +715,8 @@ public ArrayList getDataItems(int state) { if (GTUtility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) { rList.add(mInventory[1]); } - for (MTEHatchDataAccess tHatch : mDataAccessHatches) { - if (tHatch.isValid()) { - for (int i = 0; i < tHatch.getBaseMetaTileEntity() - .getSizeInventory(); i++) { - if (tHatch.getBaseMetaTileEntity() - .getStackInSlot(i) != null && isCorrectDataItem( - tHatch.getBaseMetaTileEntity() - .getStackInSlot(i), - state)) - rList.add( - tHatch.getBaseMetaTileEntity() - .getStackInSlot(i)); - } - } + for (MTEHatchDataAccess tHatch : filterValidMTEs(mDataAccessHatches)) { + rList.addAll(tHatch.getInventoryItems(stack -> isCorrectDataItem(stack, state))); } return rList; } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java index 4ff0288a283..d268db2f35d 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java @@ -1,5 +1,6 @@ package goodgenerator.blocks.tileEntity; +import static bartworks.util.BWTooltipReference.TT; import static bartworks.util.BWUtil.ofGlassTieredMixed; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; @@ -340,6 +341,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("But gives more parallel with more advanced one.") .addInfo("It is 100% faster in Normal Mode.") .addInfo("Imprecise (MK-0) = 16x, MK-I = 32x, MK-II = 64x, MK-III = 128x, MK-IV = 256x") + .addInfo("Supports " + TT + " energy hatches") .addPollutionAmount(getPollutionPerSecond(null)) .addInfo("The structure is too complex!") .addInfo(BLUE_PRINT_INFO) diff --git a/src/main/java/gregtech/api/enums/GTValues.java b/src/main/java/gregtech/api/enums/GTValues.java index eaca14b3eec..69df9c25a6b 100644 --- a/src/main/java/gregtech/api/enums/GTValues.java +++ b/src/main/java/gregtech/api/enums/GTValues.java @@ -32,7 +32,6 @@ import gregtech.api.interfaces.internal.IGTMod; import gregtech.api.interfaces.internal.IGTRecipeAdder; import gregtech.api.net.IGT_NetworkHandler; -import gregtech.api.util.GTChunkAssociatedData; /** * Made for static imports, this Class is just a Helper. @@ -657,6 +656,10 @@ public static final class NBT { + "Ba" + EnumChatFormatting.LIGHT_PURPLE + "ps"; + public static final String AuthorOmdaCZ = "Author: " + EnumChatFormatting.BLUE + + "Omda" + + EnumChatFormatting.RED + + "CZ"; public static final String AuthorEvgenWarGold = "" + EnumChatFormatting.RED + EnumChatFormatting.BOLD diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index dba8f510b9e..f995de50327 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1476,6 +1476,10 @@ public enum ItemList implements IItemContainer { Electromagnet_Tengam, Machine_Multi_Canner, + Machine_Multi_Solidifier, + + Casing_Fluid_Solidifier, + Radiator_Fluid_Solidifier, Machine_Multi_IndustrialCompressor, Machine_Multi_HIPCompressor, diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 9949a61cfda..177dc4f589c 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -2276,6 +2276,8 @@ private static void initSubTags() { TengamAttuned, MaterialsUEVplus.Eternity, MaterialsUEVplus.MagMatter, + MaterialsUEVplus.Creon, + MaterialsUEVplus.Mellion, MaterialsUEVplus.HotProtoHalkonite, MaterialsUEVplus.ProtoHalkonite, MaterialsUEVplus.HotExoHalkonite, @@ -2546,6 +2548,10 @@ private static void disableUnusedHotIngots() { OrePrefixes.ingotHot.disableComponent(Materials.EnergeticAlloy); OrePrefixes.ingotHot.disableComponent(Materials.PulsatingIron); OrePrefixes.ingotHot.disableComponent(Materials.CrudeSteel); + OrePrefixes.ingotHot.disableComponent(MaterialsUEVplus.HotProtoHalkonite); + OrePrefixes.ingotHot.disableComponent(MaterialsUEVplus.ProtoHalkonite); + OrePrefixes.ingotHot.disableComponent(MaterialsUEVplus.HotExoHalkonite); + OrePrefixes.ingotHot.disableComponent(MaterialsUEVplus.ExoHalkonite); } /** diff --git a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java index 7dc79d44ca3..12ecb96155e 100644 --- a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java +++ b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java @@ -335,6 +335,7 @@ public enum MetaTileEntityIDs { CENTRIFUGE_HV(363), CENTRIFUGE_EV(364), CENTRIFUGE_IV(365), + MULTI_SOLIDIFIER_CONTROLLER(366), ELECTROLYSER_LV(371), ELECTROLYSER_MV(372), ELECTROLYSER_HV(373), diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 9b621059aa2..bd90cfe8aba 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -331,6 +331,9 @@ public enum BlockIcons implements IIconContainer, Runnable { OVERLAY_FRONT_EMS_GLOW, MACHINE_CASING_EMS, + MACHINE_CASING_MS160, + RADIATOR_MS160, + OVERLAY_FRONT_MULTI_CANNER, OVERLAY_FRONT_MULTI_CANNER_ACTIVE, OVERLAY_FRONT_MULTI_CANNER_ACTIVE_GLOW, diff --git a/src/main/java/gregtech/common/blocks/BlockCasings10.java b/src/main/java/gregtech/common/blocks/BlockCasings10.java index 11c3f81f01c..e5c2e96f32c 100644 --- a/src/main/java/gregtech/common/blocks/BlockCasings10.java +++ b/src/main/java/gregtech/common/blocks/BlockCasings10.java @@ -33,6 +33,9 @@ public BlockCasings10() { GTLanguageManager .addStringLocalization(getUnlocalizedName() + ".12.name", "Background Radiation Absorbent Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Solidifier Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Solidifier Radiator"); + ItemList.Casing_Electromagnetic_Separator.set(new ItemStack(this, 1, 0)); ItemList.Casing_Laser.set(new ItemStack(this, 1, 1)); ItemList.BlockQuarkContainmentCasing.set(new ItemStack(this, 1, 2)); @@ -46,6 +49,8 @@ public BlockCasings10() { ItemList.Heating_Duct_Casing.set(new ItemStack(this, 1, 10)); ItemList.Extreme_Density_Casing.set(new ItemStack(this, 1, 11)); ItemList.Background_Radiation_Casing.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Fluid_Solidifier.set(new ItemStack(this, 1, 13)); + ItemList.Radiator_Fluid_Solidifier.set(new ItemStack(this, 1, 14)); } @Override @@ -70,6 +75,8 @@ public IIcon getIcon(int ordinalSide, int aMeta) { case 10 -> Textures.BlockIcons.MACHINE_CASING_PIPE_BRONZE.getIcon(); case 11 -> Textures.BlockIcons.EXTREME_DENSITY_CASING.getIcon(); case 12 -> Textures.BlockIcons.RADIATION_ABSORBENT_CASING.getIcon(); + case 13 -> Textures.BlockIcons.MACHINE_CASING_MS160.getIcon(); + case 14 -> Textures.BlockIcons.RADIATOR_MS160.getIcon(); default -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); }; } diff --git a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java index b17ad3e32ef..ab9917435cc 100644 --- a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java +++ b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java @@ -584,7 +584,6 @@ public MetaGeneratedItem01() { OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.plateDense, - OrePrefixes.plateSuperdense, OrePrefixes.stick, OrePrefixes.lens, OrePrefixes.round, diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java index 5d10d552778..65d4bc93d37 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java @@ -201,7 +201,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("Needs a minimum of 128 Pressure Containment Casings.") .addInfo(AuthorVolence) .addSeparator() - .beginStructureBlock(7, 5, 5, true) + .beginStructureBlock(7, 7, 9, true) .addController("Front Center") .addCasingInfoMin("Pressure Containment Casings", 128, false) .addCasingInfoExactly("Item Pipe Casings", 7, true) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java index e0c8e354447..3b01d0ec1e1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java @@ -73,6 +73,9 @@ public MTEMultiLathe(String aName) { public enum PipeTiers { + Tin(1, 0.75F), + Brass(1, 0.8F), + Electrum(2, 0.9F), Platinum(4, 1F), Osmium(8, 1.25F), Quantium(12, 1.5F), @@ -91,19 +94,22 @@ public enum PipeTiers { private PipeTiers getPipeData() { pipeTier = getPipeTier(); return switch (pipeTier) { - case 2 -> PipeTiers.Osmium; - case 3 -> PipeTiers.Quantium; - case 4 -> PipeTiers.FluxedElectrum; - case 5 -> PipeTiers.BlackPlutonium; - default -> PipeTiers.Platinum; + case 2 -> PipeTiers.Brass; + case 3 -> PipeTiers.Electrum; + case 4 -> PipeTiers.Platinum; + case 5 -> PipeTiers.Osmium; + case 6 -> PipeTiers.Quantium; + case 7 -> PipeTiers.FluxedElectrum; + case 8 -> PipeTiers.BlackPlutonium; + default -> PipeTiers.Tin; }; } // get tier from block meta private static Integer getTierFromMeta(Block block, Integer metaID) { if (block != GregTechAPI.sBlockCasings11) return -1; - if (metaID < 3 || metaID > 7) return -1; - return (metaID - 2); + if (metaID < 0 || metaID > 7) return -1; + return metaID + 1; } private void setPipeTier(int tier) { @@ -150,6 +156,9 @@ private int getPipeTier() { ofBlocksTiered( MTEMultiLathe::getTierFromMeta, ImmutableList.of( + Pair.of(GregTechAPI.sBlockCasings11, 0), + Pair.of(GregTechAPI.sBlockCasings11, 1), + Pair.of(GregTechAPI.sBlockCasings11, 2), Pair.of(GregTechAPI.sBlockCasings11, 3), Pair.of(GregTechAPI.sBlockCasings11, 4), Pair.of(GregTechAPI.sBlockCasings11, 5), @@ -220,8 +229,8 @@ protected MultiblockTooltipBuilder createTooltip() { tt.addMachineType("Lathe") .addInfo("Controller Block for the Industrial Precision Lathe") .addInfo("Gains 2 parallels per voltage tier,") - .addInfo("and 4 parallels per pipe casing tier (16 for Black Plutonium)") - .addInfo("Better pipe casings increase speed") + .addInfo("and 4 parallels per pipe casing tier starting at Platinum, 16 for Black Plutonium") + .addInfo("Better item pipe casings increase speed") .addInfo("Only uses 80% of the recipe's required energy") .addInfo(AuthorVolence) .addSeparator() @@ -270,9 +279,8 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a getBaseMetaTileEntity().sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, getUpdateData()); if (!checkPiece(STRUCTURE_PIECE_BODY, 3, 4, -1) && !checkPiece(STRUCTURE_PIECE_BODY_ALT, 3, 4, -1)) return false; - return this.mMaintenanceHatches.size() == 1 && pipeTier >= -1 + return this.mMaintenanceHatches.size() == 1 && pipeTier > 0 && mEnergyHatches.size() >= 1 - && mInputBusses.size() >= 1 && mMufflerHatches.size() == 1; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java new file mode 100644 index 00000000000..471815f1f97 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java @@ -0,0 +1,692 @@ +package gregtech.common.tileentities.machines.multi; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.withChannel; +import static gregtech.api.enums.GTValues.AuthorFourIsTheNumber; +import static gregtech.api.enums.GTValues.AuthorOmdaCZ; +import static gregtech.api.enums.GTValues.authorBaps; +import static gregtech.api.enums.HatchElement.Energy; +import static gregtech.api.enums.HatchElement.InputBus; +import static gregtech.api.enums.HatchElement.InputHatch; +import static gregtech.api.enums.HatchElement.Maintenance; +import static gregtech.api.enums.HatchElement.OutputBus; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_CANNER; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_CANNER_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_CANNER_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_CANNER_GLOW; +import static gregtech.api.util.GTUtility.filterValidMTEs; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; + +import org.apache.commons.lang3.tuple.Pair; +import org.jetbrains.annotations.NotNull; + +import com.google.common.collect.ImmutableList; +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.GregTechAPI; +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.GregTechTileClientEvents; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatch; +import gregtech.api.metatileentity.implementations.MTEHatchEnergy; +import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.metatileentity.implementations.MTEHatchInputBus; +import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; +import gregtech.api.metatileentity.implementations.MTEHatchMuffler; +import gregtech.api.metatileentity.implementations.MTEHatchOutput; +import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; +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.render.TextureFactory; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; +import gregtech.api.util.HatchElementBuilder; +import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.common.blocks.BlockCasings1; +import gregtech.common.blocks.BlockCasings10; +import gregtech.common.tileentities.machines.IDualInputHatch; +import gregtech.common.tileentities.machines.IDualInputInventory; +import gregtech.common.tileentities.machines.MTEHatchCraftingInputME; +import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.MTEHatchSolidifier; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; +import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; + +public class MTEMultiSolidifier extends MTEExtendedPowerMultiBlockBase + implements ISurvivalConstructable { + + protected final String MS_LEFT_MID = mName + "leftmid"; + protected final String MS_RIGHT_MID = mName + "rightmid"; + protected final String MS_END = mName + "end"; + + protected int casingAmount = 0; + protected int pipeCasingAmount = 0; + protected int Width = 0; + protected int eV = 0, mCeil = 0, mFloor = 0; + private int casingTier = -1; + private int pipeCasingTier = -1; + private int pipeMeta = -1; + private int machineTier = 0; + private static final int SOLIDIFIER_CASING_INDEX = ((BlockCasings10) GregTechAPI.sBlockCasings10) + .getTextureIndex(13); + private static final int DTPF_CASING_INDEX = ((BlockCasings1) GregTechAPI.sBlockCasings1).getTextureIndex(12); + + private final Map> tieredFluidSolidifierCasings = new HashMap<>() { + + { + // Solidifier Casing + put(13, Pair.of(GregTechAPI.sBlockCasings10, 0)); + // Laurenium Casing + put(2, Pair.of(ModBlocks.blockCustomMachineCasings, 1)); + // Dimensionally Transcendent Casing + put(12, Pair.of(GregTechAPI.sBlockCasings1, 2)); + + } + }; + + private final Map> tieredPipeCasings = new HashMap<>() { + + { + // Solidifier Radiator + put(14, Pair.of(GregTechAPI.sBlockCasings10, 0)); + // Cinobite Pipe Casing + put(13, Pair.of(ModBlocks.blockCustomPipeGearCasings, 1)); + // Abyssal Pipe Casing + put(15, Pair.of(ModBlocks.blockCustomPipeGearCasings, 2)); + + } + }; + + private final List casingIndices = new ArrayList<>( + Arrays.asList(SOLIDIFIER_CASING_INDEX, 84, DTPF_CASING_INDEX)); + + private final String STRUCTURE_PIECE_MAIN = "main"; + private final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .builder() + .addShape( + MS_LEFT_MID, + (transpose( + new String[][] { { " ", "BB", "BB", "BB", }, { " ", "AA", "D ", "AA", }, { " ", "AA", " ", "AA", }, + { " ", "CC", "FC", "CC", }, { " ", "BB", "BB", "BB", } }))) + .addShape( + MS_RIGHT_MID, + (transpose( + new String[][] { { " ", "BB", "BB", "BB" }, { " ", "AA", " D", "AA" }, { " ", "AA", " ", "AA" }, + { " ", "CC", "CF", "CC" }, { " ", "BB", "BB", "BB" } }))) + .addShape( + MS_END, + (transpose( + new String[][] { { "B", "B", "B", "B", "B" }, { "B", "B", "B", "B", "B" }, { "B", "B", "B", "B", "B" }, + { "B", "B", "B", "B", "B" }, { "B", "B", "B", "B", "B" } }))) + .addShape( + STRUCTURE_PIECE_MAIN, + (transpose( + new String[][] { { " ", "BBBBBBB", "BBBBBBB", "BBBBBBB", " " }, + { "BBBBBBB", " ", "D D D D", " ", "AAAAAAA" }, + { "AAAAAAA", " ", " ", " ", "AAAAAAA" }, + { "CCCBCCC", " ", "F F F F", " ", "CCCCCCC" }, + { "BBB~BBB", "BBBBBBB", "BBBBBBB", "BBBBBBB", "BBBBBBB" } }))) + .addElement('A', Glasses.chainAllGlasses()) + .addElement( + 'B', + HatchElementBuilder.builder() + .atLeast(InputBus, OutputBus, Maintenance, Energy, InputHatch) + .adder(MTEMultiSolidifier::addToSolidifierList) + .casingIndex(SOLIDIFIER_CASING_INDEX) + .dot(1) + .buildAndChain( + withChannel( + "casing", + onElementPass( + x -> x.casingAmount++, + ofBlocksTiered( + this::casingTierExtractor, + ImmutableList.of( + Pair.of(GregTechAPI.sBlockCasings10, 13), + Pair.of(ModBlocks.blockCustomMachineCasings, 2), + Pair.of(GregTechAPI.sBlockCasings1, 12)), + -1, + MTEMultiSolidifier::setCasingTier, + MTEMultiSolidifier::getCasingTier))))) + .addElement( + 'C', + onElementPass( + x -> x.pipeCasingAmount++, + ofBlocksTiered( + this::pipeTierExtractor, + ImmutableList.of( + Pair.of(GregTechAPI.sBlockCasings10, 14), + Pair.of(ModBlocks.blockCustomPipeGearCasings, 13), + Pair.of(ModBlocks.blockCustomPipeGearCasings, 15)), + -1, + MTEMultiSolidifier::setPipeCasingTier, + MTEMultiSolidifier::getPipeCasingTier))) + .addElement('F', ofBlock(GregTechAPI.sBlockCasings1, 11)) + /* + * TinkerConstruct.isModLoaded()// maybe temporary if someone makes textures for new special decorative block + * ? ofChain(ofBlock(Block.getBlockFromName("TConstruct:SearedBlock"), 0)) + * : ofChain(ofBlock(Blocks.cauldron, 0))) + */ + .addElement('D', ofBlock(GregTechAPI.sBlockCasings4, 1)) + /* + * BuildCraftFactory.isModLoaded()// maybe temporary if someone makes textures for new special decorative block + * ? ofChain(ofBlock(Block.getBlockFromName("BuildCraft|Factory:blockHopper"), 10)) + * : ofChain(ofBlock(Blocks.hopper, 0))) + */ + .build(); + + public MTEMultiSolidifier(final int aID, final String aName, final String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public MTEMultiSolidifier(String aName) { + super(aName); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new MTEMultiSolidifier(this.mName); + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return true; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirection side, ForgeDirection aFacing, + int colorIndex, boolean aActive, boolean redstoneLevel) { + ITexture[] rTexture; + int casingIndex = casingTier > -1 ? casingIndices.get(casingTier) : SOLIDIFIER_CASING_INDEX; + if (side == aFacing) { + if (aActive) { + rTexture = new ITexture[] { Textures.BlockIcons.getCasingTextureForId(casingIndex), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_CANNER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_CANNER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() }; + } else { + rTexture = new ITexture[] { Textures.BlockIcons.getCasingTextureForId(casingIndex), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_CANNER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_MULTI_CANNER_GLOW) + .extFacing() + .glow() + .build() }; + } + } else { + rTexture = new ITexture[] { Textures.BlockIcons + .getCasingTextureForId(GTUtility.getCasingTextureIndex(GregTechAPI.sBlockCasings10, 13)) }; + } + return rTexture; + } + + @Override + protected MultiblockTooltipBuilder createTooltip() { + MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); + tt.addMachineType("Fluid Solidifier") + .addInfo("Controller Block for the Fluid Shaper") + .addInfo("Speeds up to a maximum of 300% faster than singleblock machines while running") + .addInfo("Has 4 parallels by default") + .addInfo("Gains an additional 10 parallels per width expansion") + .addInfo(EnumChatFormatting.BLUE + "Pretty Ⱄⱁⰾⰻⰴ, isn't it") + .addInfo( + AuthorOmdaCZ + " with help of " + + AuthorFourIsTheNumber + + EnumChatFormatting.AQUA + + ", GDCloud " + + "& " + + authorBaps) + .addSeparator() + .beginVariableStructureBlock(17, 33, 5, 5, 5, 5, true) + .addController("Front Center bottom") + .addCasingInfoMin("Tier 1: Solidifier Casing", 146, true) + .addCasingInfoMin("Tier 2: Laurenium Casing", 146, true) + .addCasingInfoMin("Tier 3: DTPF Casing", 146, true) + .addCasingInfoMin("Tier 1: Radiator Casing", 18, true) + .addCasingInfoMin("Tier 2: Cinobite Pipe Casing", 18, true) + .addCasingInfoMin("Tier 3: Abyssal Alloy Pipe Casing", 18, true) + .addCasingInfoMin("Heat Proof Casing", 4, false) + .addCasingInfoMin("Solid Steel Casing", 4, false) + .addInfo("Tier limits maximal width 2; 4; 6") + .addInputBus("Any Tiered Casing", 1) + .addOutputBus("Any Tiered Casing", 1) + .addInputHatch("Any Tiered Casing", 1) + .addEnergyHatch("Any Tiered Casing", 1) + .addMaintenanceHatch("Any Tiered Casing", 1) + .toolTipFinisher("GregTech"); + return tt; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 3, 4, 0); + // max Width, minimal mid pieces to build on each side + int tTotalWidth = Math.min(6, stackSize.stackSize + 3); + for (int i = 1; i < tTotalWidth - 1; i++) { + // horizontal offset 3 from controller and number of pieces times width of each piece + buildPiece(MS_LEFT_MID, stackSize, hintsOnly, 3 + 2 * i, 4, 0); + // the same but on other side of controller, for some reason -2 works right but -3 is weird + buildPiece(MS_RIGHT_MID, stackSize, hintsOnly, -2 - 2 * i, 4, 0); + } + // trial and error numbers that work + buildPiece(MS_END, stackSize, hintsOnly, (tTotalWidth + 2) * 2 - 4, 4, 0); + buildPiece(MS_END, stackSize, hintsOnly, (-tTotalWidth - 2) * 2 + 4, 4, 0); + } + + protected final List> mOutputHatchesByLayer = new ArrayList<>(); + protected int mWidth; + protected int nWidth; + + @Override + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { + if (mMachine) return -1; + mWidth = 0; + nWidth = 0; + int built = survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 3, 4, 0, elementBudget, env, false, true); + if (built >= 0) return built; + int tTotalWidth = Math.min(3 + machineTier, stackSize.stackSize + 3); + for (int i = 1; i < tTotalWidth - 1; i++) { + mWidth = i; + nWidth = i; + built = survivialBuildPiece(MS_LEFT_MID, stackSize, 3 + 2 * i, 4, 0, elementBudget, env, false, true); + if (built >= 0) return built; + built = survivialBuildPiece(MS_RIGHT_MID, stackSize, -2 - 2 * i, 4, 0, elementBudget, env, false, true); + if (built >= 0) return built; + } + if (mWidth == tTotalWidth - 2) return survivialBuildPiece( + MS_END, + stackSize, + (2 + tTotalWidth) * 2 - 4, + 4, + 0, + elementBudget, + env, + false, + true); + else return survivialBuildPiece( + MS_END, + stackSize, + (-2 - tTotalWidth) * 2 + 4, + 4, + 0, + elementBudget, + env, + false, + true); + } + + private int mCasingAmount; + + int mTier; + { + if (casingTier > pipeCasingTier) { + mTier = pipeCasingTier; + } else if (casingTier <= pipeCasingTier) { + mTier = casingTier; + } + + } + + private void onCasingAdded() { + mCasingAmount++; + } + + @Override + public IStructureDefinition getStructureDefinition() { + return STRUCTURE_DEFINITION; + } + + protected boolean mTopLayerFound; + protected int mCasing; + + protected void onCasingFound() { + mCasing++; + } + + protected void onTopLayerFound(boolean aIsCasing) { + mTopLayerFound = true; + if (aIsCasing) onCasingFound(); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mWidth = 0; + casingTier = -1; + pipeCasingTier = -1; + if (checkPiece(STRUCTURE_PIECE_MAIN, 3, 4, 0)) { + while (mWidth < (6)) { + if (checkPiece(MS_RIGHT_MID, (-2 * (mWidth + 1)) - 2, 4, 0) + && checkPiece(MS_LEFT_MID, (2 * (mWidth + 1)) + 3, 4, 0)) { + mWidth++; + } else break; + } + } else return false; + if (!checkPiece(MS_END, (-2 * mWidth) - 4, 4, 0) || !checkPiece(MS_END, (mWidth * 2) + 4, 4, 0)) { + return false; + } + if (casingAmount < (100 + mWidth * 23)) { + casingAmount = 0; + return false; + } else casingAmount = 0; + machineTier = Math.min(pipeCasingTier, casingTier); + if (mWidth > (2 * (machineTier + 1))) { + return false; + } + if (casingTier > -1) { + updateHatchTextures(casingIndices.get(casingTier)); + getBaseMetaTileEntity().sendBlockEvent(GregTechTileClientEvents.CHANGE_CUSTOM_DATA, getUpdateData()); + } + return true; + + } + + @Override + protected ProcessingLogic createProcessingLogic() { + return new ProcessingLogic() { + + @NotNull + @Override + protected CheckRecipeResult validateRecipe(@NotNull GTRecipe recipe) { + setSpeedBonus(1F / speedup); + return super.validateRecipe(recipe); + } + }.setMaxParallelSupplier(this::getMaxParallelRecipes); + } + + private float speedup = 1; + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aTick % 20 == 0) { + if (this.maxProgresstime() != 0 && speedup <= 3) { + speedup += 0.2F; + } else speedup = 1; + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + public int getMaxParallelRecipes() { + return 4 + (mWidth * 10); + } + + private void setCasingTier(int tier) { + casingTier = tier; + } + + private int getCasingTier() { + return casingTier; + } + + private void setPipeCasingTier(int tier) { + pipeCasingTier = tier; + } + + private int getPipeCasingTier() { + return pipeCasingTier; + } + + @Override + public byte getUpdateData() { + return (byte) casingTier; + } + + @Override + public void receiveClientEvent(byte aEventID, byte aValue) { + super.receiveClientEvent(aEventID, aValue); + if (aEventID == GregTechTileClientEvents.CHANGE_CUSTOM_DATA) { + casingTier = aValue; + } + } + + private int casingTierExtractor(Block block, int meta) { + if (!tieredFluidSolidifierCasings.containsKey(meta) || !(tieredFluidSolidifierCasings.get(meta) + .getLeft() == block)) { + return -1; + } + return tieredFluidSolidifierCasings.get(meta) + .getRight(); + } + + private int pipeTierExtractor(Block block, int meta) { + if (!tieredPipeCasings.containsKey(meta) || !(tieredPipeCasings.get(meta) + .getLeft() == block)) { + return -1; + } + return tieredPipeCasings.get(meta) + .getRight(); + } + + private boolean addToSolidifierList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof MTEHatchInput hatch) { + return mInputHatches.add(hatch); + } + if (aMetaTileEntity instanceof IDualInputHatch hatch) { + return mDualInputHatches.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchInputBus hatch) { + return mInputBusses.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchOutput hatch) { + return mOutputHatches.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchOutputBus hatch) { + return mOutputBusses.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchEnergy hatch) { + return mEnergyHatches.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchMaintenance hatch) { + return mMaintenanceHatches.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchMuffler hatch) { + return mMufflerHatches.add(hatch); + } + if (aMetaTileEntity instanceof MTEHatchEnergyMulti hatch) { + return mExoticEnergyHatches.add(hatch); + } + return false; + } + + private void updateHatchTextures(int texture) { + for (IDualInputHatch hatch : mDualInputHatches) { + if (((MetaTileEntity) hatch).isValid()) { + hatch.updateTexture(texture); + } + } + for (MTEHatch hatch : filterValidMTEs(mInputHatches)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mInputBusses)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mOutputHatches)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mOutputBusses)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mEnergyHatches)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mMaintenanceHatches)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mMufflerHatches)) { + hatch.updateTexture(texture); + } + for (MTEHatch hatch : filterValidMTEs(mExoticEnergyHatches)) { + hatch.updateTexture(texture); + } + } + + @Override + public RecipeMap getRecipeMap() { + return RecipeMaps.fluidSolidifierRecipes; + } + + @Override + public int getRecipeCatalystPriority() { + return -10; + } + + @Override + public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, + IWailaConfigHandler config) { + super.getWailaBody(itemStack, currentTip, accessor, config); + final NBTTagCompound tag = accessor.getNBTData(); + } + + @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; + } + + @NotNull + @Override + protected CheckRecipeResult doCheckRecipe() { + CheckRecipeResult result = CheckRecipeResultRegistry.NO_RECIPE; + + // Copied all of this from LPF. Surely it works fine + // check crafting input hatches first + if (supportsCraftingMEBuffer()) { + for (IDualInputHatch dualInputHatch : mDualInputHatches) { + for (var it = dualInputHatch.inventories(); it.hasNext();) { + IDualInputInventory slot = it.next(); + processingLogic.setInputItems(slot.getItemInputs()); + processingLogic.setInputFluids(slot.getFluidInputs()); + CheckRecipeResult foundResult = processingLogic.process(); + if (foundResult.wasSuccessful()) { + return foundResult; + } + if (foundResult != CheckRecipeResultRegistry.NO_RECIPE) { + // Recipe failed in interesting way, so remember that and continue searching + result = foundResult; + } + } + } + } + + // Logic for GT_MetaTileEntity_Hatch_Solidifier + for (MTEHatchInput solidifierHatch : mInputHatches) { + if (solidifierHatch instanceof MTEHatchSolidifier hatch) { + ItemStack mold = hatch.getMold(); + FluidStack fluid = solidifierHatch.getFluid(); + + if (mold != null && fluid != null) { + List inputItems = new ArrayList<>(); + inputItems.add(mold); + + processingLogic.setInputItems(inputItems.toArray(new ItemStack[0])); + processingLogic.setInputFluids(fluid); + + CheckRecipeResult foundResult = processingLogic.process(); + if (foundResult.wasSuccessful()) { + return foundResult; + } + if (foundResult != CheckRecipeResultRegistry.NO_RECIPE) { + // Recipe failed in interesting way, so remember that and continue searching + result = foundResult; + } + } + } + } + processingLogic.clear(); + processingLogic.setInputFluids(getStoredFluids()); + // Default logic + for (MTEHatchInputBus bus : mInputBusses) { + if (bus instanceof MTEHatchCraftingInputME) { + continue; + } + List inputItems = new ArrayList<>(); + for (int i = bus.getSizeInventory() - 1; i >= 0; i--) { + ItemStack stored = bus.getStackInSlot(i); + if (stored != null) { + inputItems.add(stored); + } + } + if (canUseControllerSlotForRecipe() && getControllerSlot() != null) { + inputItems.add(getControllerSlot()); + } + processingLogic.setInputItems(inputItems.toArray(new ItemStack[0])); + CheckRecipeResult foundResult = processingLogic.process(); + if (foundResult.wasSuccessful()) { + return foundResult; + } + if (foundResult != CheckRecipeResultRegistry.NO_RECIPE) { + // Recipe failed in interesting way, so remember that and continue searching + result = foundResult; + } + } + return result; + } + + @Override + public boolean isInputSeparationEnabled() { + return true; + } + + @Override + public boolean supportsSingleRecipeLocking() { + return true; + } +} diff --git a/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java index 1b889f2f376..ee5e1d83168 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ChemicalBathRecipes.java @@ -421,6 +421,7 @@ private void protoHalkoniteRecipes() { this.addProtoHalkonitePartRecipe(OrePrefixes.frameGt, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.ingot, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.plate, 1); + this.addProtoHalkonitePartRecipe(OrePrefixes.plateDouble, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.plateDense, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.stick, 2); this.addProtoHalkonitePartRecipe(OrePrefixes.round, 8); diff --git a/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java index 8f6ba3729d5..67719803d5a 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/CompressorRecipes.java @@ -276,6 +276,26 @@ public void run() { .eut(TierEU.RECIPE_UIV) .addTo(compressorRecipes); + GTValues.RA.stdBuilder() + .itemInputs(GTOreDictUnificator.get(OrePrefixes.plateSuperdense, MaterialsUEVplus.Creon, 1)) + .fluidInputs(MaterialsUEVplus.MoltenProtoHalkoniteBase.getFluid(32 * 144)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.plateSuperdense, MaterialsUEVplus.HotProtoHalkonite, 1)) + // Require stabilized black hole + .metadata(CompressionTierKey.INSTANCE, 2) + .duration(45 * SECONDS / 4) + .eut(TierEU.RECIPE_UIV) + .addTo(compressorRecipes); + + GTValues.RA.stdBuilder() + .itemInputs(GTOreDictUnificator.get(OrePrefixes.plateSuperdense, MaterialsUEVplus.Mellion, 1)) + .fluidInputs(MaterialsUEVplus.MoltenProtoHalkoniteBase.getFluid(32 * 144)) + .itemOutputs(GTOreDictUnificator.get(OrePrefixes.plateSuperdense, MaterialsUEVplus.HotProtoHalkonite, 1)) + // Require stabilized black hole + .metadata(CompressionTierKey.INSTANCE, 2) + .duration(45 * SECONDS / 4) + .eut(TierEU.RECIPE_UIV) + .addTo(compressorRecipes); + GTValues.RA.stdBuilder() .itemInputs(WerkstoffLoader.MagnetoResonaticDust.get(OrePrefixes.gem, 9)) .itemOutputs(WerkstoffLoader.MagnetoResonaticDust.get(OrePrefixes.block, 1)) diff --git a/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java index 89a1aefa89f..813897b3cd5 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/VacuumFreezerRecipes.java @@ -415,6 +415,7 @@ public void run() { this.addProtoHalkonitePartRecipe(OrePrefixes.frameGt, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.ingot, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.plate, 1); + this.addProtoHalkonitePartRecipe(OrePrefixes.plateDouble, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.plateDense, 1); this.addProtoHalkonitePartRecipe(OrePrefixes.stick, 2); this.addProtoHalkonitePartRecipe(OrePrefixes.round, 8); diff --git a/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java b/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java index b462e065cdc..71a9750c612 100644 --- a/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java @@ -1058,6 +1058,7 @@ import gregtech.common.tileentities.machines.multi.MTEMultiCanner; import gregtech.common.tileentities.machines.multi.MTEMultiFurnace; import gregtech.common.tileentities.machines.multi.MTEMultiLathe; +import gregtech.common.tileentities.machines.multi.MTEMultiSolidifier; import gregtech.common.tileentities.machines.multi.MTENanoForge; import gregtech.common.tileentities.machines.multi.MTEOilCracker; import gregtech.common.tileentities.machines.multi.MTEOilDrill1; @@ -1570,9 +1571,14 @@ private static void registerMultiblockControllers() { INDUSTRIAL_ELECTROMAGNETIC_SEPARATOR_CONTROLLER.ID, "multimachine.electromagneticseparator", "Magnetic Flux Exhibitor").getStackForm(1)); + ItemList.Machine_Multi_Canner .set(new MTEMultiCanner(MULTI_CANNER_CONTROLLER.ID, "multimachine.canner", "TurboCan Pro").getStackForm(1)); + ItemList.Machine_Multi_Solidifier.set( + new MTEMultiSolidifier(MULTI_SOLIDIFIER_CONTROLLER.ID, "multimachine.solidifier", "Fluid Shaper") + .getStackForm(1)); + ItemList.WormholeGenerator.set( new MTEWormholeGenerator( WORMHOLE_GENERATOR_CONTROLLER.ID, diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java index 0c819212ca6..ec616b9d10a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCentrifuge.java @@ -328,9 +328,8 @@ protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(getMachineType()) .addInfo("Controller Block for the Steam Centrifuge") - .addInfo("33.3% faster than a single block steam machine would run.") - .addInfo( - "On Tier 1, it uses only 66.6% of the steam/s required compared to what a single block steam machine would use.") + .addInfo("33.3% faster than a single block steam machine would run") + .addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use") .addInfo("Bronze tier runs recipes up to LV tier") .addInfo("Steel tier runs recipes up to MV tier") .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java index d924f13f493..6db6175896a 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamCompressor.java @@ -269,8 +269,8 @@ protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(getMachineType()) .addInfo("Controller Block for the Steam Compressor") - .addInfo("33.3% faster than using a single block Steam Compressor.") - .addInfo("Uses only 66.6% of the steam/s compared to a single block Steam Compressor.") + .addInfo("33.3% faster than the single block Steam Compressor") + .addInfo("Uses only 66.6% of the steam/s that the single block Steam Compressor uses") .addInfo("Bronze tier runs recipes up to LV tier") .addInfo("Steel tier runs recipes up to MV tier") .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java index 128a0218261..74a1c649c39 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamForgeHammer.java @@ -322,9 +322,8 @@ protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(getMachineType()) .addInfo("Controller Block for the Steam Forge Hammer") - .addInfo("33.3% faster than a single block steam machine would run.") - .addInfo( - "On Tier 1, it uses only 66.6% of the steam/s required compared to what a single block steam machine would use.") + .addInfo("33.3% faster than the single block Steam Forge Hammer") + .addInfo("Uses only 66.6% of the steam/s that the single block Forge Hammer uses") .addInfo("Bronze tier runs recipes up to LV tier") .addInfo("Steel tier runs recipes up to MV tier") .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java index 2c9c64be28a..753628caf5c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMacerator.java @@ -271,8 +271,8 @@ protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(getMachineType()) .addInfo("Controller Block for the Steam Macerator") - .addInfo("33.3% faster than using a single block Steam Macerator.") - .addInfo("Uses only 66.6% of the steam/s required compared to a single block Steam Macerator on Tier 1.") + .addInfo("33.3% faster than the single block Steam Macerator") + .addInfo("Uses only 66.6% of the steam/s that the single block Steam Macerator uses") .addInfo("Bronze tier runs recipes up to LV tier") .addInfo("Steel tier runs recipes up to MV tier") .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java index 9fa16b0f658..7c5cdb543b5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamMixer.java @@ -369,6 +369,8 @@ protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(getMachineType()) .addInfo("Controller Block for the Steam Mixer") + .addInfo("33.3% faster than a single block steam machine would run") + .addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use") .addInfo("Bronze tier runs recipes up to LV tier") .addInfo("Steel tier runs recipes up to MV tier") .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java index c1b1b8dcb63..21ac06bc889 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWasher.java @@ -347,9 +347,8 @@ protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType(getMachineType()) .addInfo("Controller Block for the Steam Washer") - .addInfo("33.3% faster than a single block steam machine would run.") - .addInfo( - "On Tier 1, it uses only 66.6% of the steam/s required compared to what a single block steam machine would use.") + .addInfo("33.3% faster than a single block steam machine would run") + .addInfo("Uses only 66.6% of the steam/s that a single block steam machine would use") .addInfo("Bronze tier runs recipes up to LV tier") .addInfo("Steel tier runs recipes up to MV tier") .addInfo("Processes 8x parallel Bronze tier and 16x parallel Steel tier") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java index 8b11690673a..a397a80974e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/MTESteamWaterPump.java @@ -257,7 +257,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.RESET) .addSeparator() .beginStructureBlock(3, 3, 5, false) - .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1) + .addOutputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Any casing", 1) .addStructureInfo( EnumChatFormatting.WHITE + "Steam Input Hatch " + EnumChatFormatting.GOLD diff --git a/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java b/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java index 2672d0e994e..e39a0b74eb1 100644 --- a/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java +++ b/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java @@ -74,6 +74,7 @@ import gregtech.api.util.IGTHatchAdder; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.common.misc.WirelessNetworkManager; +import gregtech.common.misc.spaceprojects.SpaceProjectManager; import kekztech.client.gui.KTUITextures; import kekztech.common.Blocks; import kekztech.common.itemBlocks.ItemBlockLapotronicEnergyUnit; @@ -93,7 +94,6 @@ private enum TopState { private boolean canUseWireless = false; private boolean wireless_mode = false; - private boolean not_processed_lsc = true; private int counter = 1; private boolean balanced = false; @@ -511,19 +511,13 @@ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirec private UUID global_energy_user_uuid; @Override - public void onPreTick(IGregTechTileEntity tileEntity, long aTick) { - super.onPreTick(tileEntity, aTick); + public void onFirstTick(IGregTechTileEntity tileEntity) { + super.onFirstTick(tileEntity); - // On first tick (aTick restarts from 0 upon world reload). - if (not_processed_lsc && tileEntity.isServerSide()) { - // Add user to wireless network. - WirelessNetworkManager.strongCheckOrAddUser(tileEntity.getOwnerUuid()); + if (!tileEntity.isServerSide()) return; - // Get team UUID. - global_energy_user_uuid = tileEntity.getOwnerUuid(); - - not_processed_lsc = false; - } + global_energy_user_uuid = tileEntity.getOwnerUuid(); + SpaceProjectManager.checkOrCreateTeam(global_energy_user_uuid); } @Override @@ -542,8 +536,6 @@ public boolean checkRecipe(ItemStack stack) { @Override public boolean checkMachine(IGregTechTileEntity thisController, ItemStack guiSlotItem) { - WirelessNetworkManager.strongCheckOrAddUser(thisController.getOwnerUuid()); - // Reset capacitor counts Arrays.fill(capacitors, 0); // Clear TT hatches diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MS160.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MS160.png new file mode 100644 index 00000000000..06a828a66f4 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_MS160.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/RADIATOR_MS160.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/RADIATOR_MS160.png new file mode 100644 index 00000000000..432fc4a0218 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/RADIATOR_MS160.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/materialicons/CUSTOM/spacetime/plateSuperdense.png.mcmeta b/src/main/resources/assets/gregtech/textures/items/materialicons/CUSTOM/spacetime/plateSuperdense.png.mcmeta index 0936e9caba3..6575dfcc65a 100644 --- a/src/main/resources/assets/gregtech/textures/items/materialicons/CUSTOM/spacetime/plateSuperdense.png.mcmeta +++ b/src/main/resources/assets/gregtech/textures/items/materialicons/CUSTOM/spacetime/plateSuperdense.png.mcmeta @@ -1 +1 @@ -{ "animation": { "interpolate": false, "frametime": 1 } } \ No newline at end of file +{"animation": {"frametime": 3}}