diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 00000000000..7f64d816241 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,41 @@ +# Credit to TechLord22 for writting this for the GTCEu repo + +# Manages labels on PRs before allowing merging +name: Pull Request Labels + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + - synchronize + +# if a second commit is pushed quickly after the first, cancel the first one's build +concurrency: + group: pr-labels-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + Labels: + runs-on: ubuntu-latest + + permissions: + pull-requests: read # needed to utilize required-labels + + steps: + - name: Check for Merge-Blocking Labels # blocks merge if present + uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 0 + labels: 'ongoing freeze - do not merge' + exit_type: failure + + - name: Check for Required Labels # require at least one of these labels + uses: mheap/github-action-required-labels@v5 + with: + mode: minimum + count: 1 + labels: 'Affects Balance, bug fix, refactor, enhancement, MuTE, new feature, refactor' + exit_type: failure diff --git a/dependencies.gradle b/dependencies.gradle index ea622fd8cdb..686bc508d10 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -42,14 +42,14 @@ dependencies { 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-451-GTNH:dev") + api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-452-GTNH:dev") api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.35-gtnh:dev") api('com.github.GTNewHorizons:Yamcl:0.6.0:dev') api("com.github.GTNewHorizons:Postea:1.0.9:dev") 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.10:dev") + compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.12: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} @@ -67,17 +67,17 @@ dependencies { implementation("com.github.GTNewHorizons:ForestryMC:4.9.10:dev") { transitive = false } compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta5:api') { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.3.0:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.3.1:dev") { transitive = false } compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.39:dev") { transitive = false } compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.8.17:dev") { transitive = false } compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.10.2-GTNH:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.15.12:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.15.14:dev") { transitive = false } compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.27:deobf") {transitive = false} compileOnly("com.github.GTNewHorizons:ThaumicBases:1.7.5:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false } compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.13:dev') { transitive = false } - compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.92-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.93-GTNH:dev") { transitive = false } compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.2.4-GTNH:dev") { transitive = false } implementation("com.github.GTNewHorizons:TinkersConstruct:1.12.9-GTNH:dev") @@ -85,9 +85,9 @@ dependencies { compileOnly("com.github.GTNewHorizons:Chisel:2.15.2-GTNH:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:Translocators:1.2.1:dev") { transitive = false } compileOnly rfg.deobf("curse.maven:cofh-core-69162:2388751") - compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.6.4:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.6.7:dev") { transitive = false } compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.57:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Hodgepodge:2.5.60:dev") { transitive = false } compileOnly('com.github.GTNewHorizons:Botania:1.11.5-GTNH:dev') { transitive = false } compileOnly('com.github.GTNewHorizons:HoloInventory:2.4.12-GTNH:dev') { transitive = false } compileOnly rfg.deobf("curse.maven:extra-utilities-225561:2264384") @@ -95,15 +95,15 @@ dependencies { compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.23-GTNH:dev") {transitive = false} // https://www.curseforge.com/minecraft/mc-mods/advancedsolarpanels compileOnlyApi rfg.deobf('curse.maven:advsolar-362768:2885953') - compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.22-GTNH:dev') {transitive = false} - compileOnly("com.github.GTNewHorizons:BloodMagic:1.6.3:dev") { transitive = false } + compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.6.23-GTNH:dev') {transitive = false} + compileOnly("com.github.GTNewHorizons:BloodMagic:1.6.5:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:BetterLoadingScreen:1.7.0-GTNH:dev") { transitive = false } compileOnly('com.github.GTNewHorizons:SC2:2.2.0:dev') {transitive=false} compileOnly('com.github.GTNewHorizons:Binnie:2.4.1:dev') {transitive = false} compileOnly('curse.maven:PlayerAPI-228969:2248928') {transitive=false} - compileOnly('com.github.GTNewHorizons:BlockRenderer6343:1.2.13:dev'){transitive=false} + compileOnly('com.github.GTNewHorizons:BlockRenderer6343:1.2.14:dev'){transitive=false} shadowImplementation('com.github.GTNewHorizons:AVRcore:1.0.1') diff --git a/src/main/java/goodgenerator/loader/FuelRecipeLoader.java b/src/main/java/goodgenerator/loader/FuelRecipeLoader.java index 120c509d083..0f3ec09d515 100644 --- a/src/main/java/goodgenerator/loader/FuelRecipeLoader.java +++ b/src/main/java/goodgenerator/loader/FuelRecipeLoader.java @@ -111,7 +111,7 @@ public static void RegisterFuel() { GGMaterial.orundum.get(OrePrefixes.dust, 64)) .fluidInputs( GGMaterial.naquadahBasedFuelMkIII.getFluidOrGas(2000), - new FluidStack(FluidRegistry.getFluid("molten.hypogen"), 720)) + new FluidStack(FluidRegistry.getFluid("molten.hypogen"), 240)) .fluidOutputs(GGMaterial.naquadahBasedFuelMkIV.getFluidOrGas(500)) .duration(8 * SECONDS) .eut(75_000_000) @@ -129,7 +129,7 @@ public static void RegisterFuel() { .fluidInputs( GGMaterial.heavyNaquadahFuel.getFluidOrGas(4000), GGMaterial.lightNaquadahFuel.getFluidOrGas(5000), - new FluidStack(FluidRegistry.getFluid("molten.hypogen"), 360), + new FluidStack(FluidRegistry.getFluid("molten.hypogen"), 120), new FluidStack(FluidRegistry.getFluid("molten.chromaticglass"), 6480)) .fluidOutputs(GGMaterial.naquadahBasedFuelMkIV.getFluidOrGas(250)) .duration(10 * TICKS) diff --git a/src/main/java/gregtech/api/enums/SoundResource.java b/src/main/java/gregtech/api/enums/SoundResource.java index e2a6b2630a0..edd8e5c6a34 100644 --- a/src/main/java/gregtech/api/enums/SoundResource.java +++ b/src/main/java/gregtech/api/enums/SoundResource.java @@ -65,11 +65,14 @@ public enum SoundResource { GT_MACHINES_WATER_PUMP_LOOP(234, GregTech.ID, "machines.WaterPumpLoop"), GT_MACHINES_STEAM_CENTRIFUGE_LOOP(235, GregTech.ID, "machines.SteamCentrifugeLoop"), - GT_MACHINES_PURIFICATIONPLANT_LOOP(233, GregTech.ID, "machines.PurificationPlantLoop"), - GT_MACHINES_PURIFICATION_PH_LOOP(234, GregTech.ID, "machines.PurificationPhLoop"), - GT_MACHINES_COAGULATION_LOOP(235, GregTech.ID, "machines.PurificationCoagulationLoop"), - GT_MACHINES_OZONATION_LOOP(236, GregTech.ID, "machines.PurificationOzonationLoop"), - GT_MACHINES_PURIFICATION_PLASMA_LOOP(237, "machines.PurificationPlasmaLoop"), + GT_MACHINES_PURIFICATIONPLANT_LOOP(236, GregTech.ID, "machines.PurificationPlantLoop"), + GT_MACHINES_PURIFICATION_PH_LOOP(237, GregTech.ID, "machines.PurificationPhLoop"), + GT_MACHINES_COAGULATION_LOOP(238, GregTech.ID, "machines.PurificationCoagulationLoop"), + GT_MACHINES_OZONATION_LOOP(239, GregTech.ID, "machines.PurificationOzonationLoop"), + GT_MACHINES_PURIFICATION_PLASMA_LOOP(240, "machines.PurificationPlasmaLoop"), + + GT_MACHINES_MULTI_LATHE_LOOP(241, GregTech.ID, "machines.MultiLatheLoop"), + GT_MACHINES_MULTI_AUTOCLAVE_LOOP(242, GregTech.ID, "machines.MultiAutoclaveLoop"), GUI_BUTTON_DOWN(-1, GregTech.ID, "gui.buttonDown"), GUI_BUTTON_UP(-1, GregTech.ID, "gui.buttonUp"), 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 65d4bc93d37..9dcb7d0ca77 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiAutoclave.java @@ -32,6 +32,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -44,9 +45,12 @@ import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTechAPI; import gregtech.api.enums.HeatingCoilLevel; import gregtech.api.enums.Materials; +import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -289,6 +293,12 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu return build; } + @SideOnly(Side.CLIENT) + @Override + protected ResourceLocation getActivitySoundLoop() { + return SoundResource.GT_MACHINES_MULTI_AUTOCLAVE_LOOP.resourceLocation; + } + @Override public boolean isCorrectMachinePart(ItemStack aStack) { return 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 3b01d0ec1e1..5beda2d038a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java @@ -25,6 +25,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -37,7 +38,10 @@ import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTechAPI; +import gregtech.api.enums.SoundResource; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -265,6 +269,12 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu return build; } + @SideOnly(Side.CLIENT) + @Override + protected ResourceLocation getActivitySoundLoop() { + return SoundResource.GT_MACHINES_MULTI_LATHE_LOOP.resourceLocation; + } + private int mCasingAmount; private void onCasingAdded() { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java index 471815f1f97..d77c6a9e53e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiSolidifier.java @@ -1,10 +1,6 @@ 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 com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.GTValues.AuthorFourIsTheNumber; import static gregtech.api.enums.GTValues.AuthorOmdaCZ; import static gregtech.api.enums.GTValues.authorBaps; @@ -17,48 +13,34 @@ 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 static gregtech.api.util.GTStructureUtility.buildHatchAdder; 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 bartworks.API.BorosilicateGlass; import gregtech.api.GregTechAPI; import gregtech.api.enums.Textures; +import gregtech.api.enums.VoltageIndex; 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; @@ -66,18 +48,14 @@ 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 { @@ -86,46 +64,7 @@ public class MTEMultiSolidifier extends MTEExtendedPowerMultiBlockBase> 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 byte glassTier = 0; private final String STRUCTURE_PIECE_MAIN = "main"; private final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition @@ -153,53 +92,21 @@ public class MTEMultiSolidifier extends MTEExtendedPowerMultiBlockBase te.glassTier = t, te -> te.glassTier)) .addElement( 'B', - HatchElementBuilder.builder() - .atLeast(InputBus, OutputBus, Maintenance, Energy, InputHatch) - .adder(MTEMultiSolidifier::addToSolidifierList) - .casingIndex(SOLIDIFIER_CASING_INDEX) + buildHatchAdder(MTEMultiSolidifier.class).atLeast(InputBus, InputHatch, OutputBus, Maintenance, Energy) + .casingIndex(((BlockCasings10) GregTechAPI.sBlockCasings10).getTextureIndex(13)) .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))) + onElementPass(MTEMultiSolidifier::onCasingAdded, ofBlock(GregTechAPI.sBlockCasings10, 13)))) + + .addElement('C', ofBlock(GregTechAPI.sBlockCasings10, 14)) .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) { @@ -224,10 +131,11 @@ public boolean isCorrectMachinePart(ItemStack aStack) { 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), + rTexture = new ITexture[] { + Textures.BlockIcons + .getCasingTextureForId(GTUtility.getCasingTextureIndex(GregTechAPI.sBlockCasings10, 13)), TextureFactory.builder() .addIcon(OVERLAY_FRONT_MULTI_CANNER_ACTIVE) .extFacing() @@ -238,7 +146,9 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect .glow() .build() }; } else { - rTexture = new ITexture[] { Textures.BlockIcons.getCasingTextureForId(casingIndex), + rTexture = new ITexture[] { + Textures.BlockIcons + .getCasingTextureForId(GTUtility.getCasingTextureIndex(GregTechAPI.sBlockCasings10, 13)), TextureFactory.builder() .addIcon(OVERLAY_FRONT_MULTI_CANNER) .extFacing() @@ -262,8 +172,9 @@ protected MultiblockTooltipBuilder createTooltip() { 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("Starts with 4 Parallels") + .addInfo("Gain 1.5 Parallels per Width Expansion and Multiplied by Voltage Tier") + .addInfo("Energy Hatch Based on Glass Tier, UMV Glass Unlocks all") .addInfo(EnumChatFormatting.BLUE + "Pretty Ⱄⱁⰾⰻⰴ, isn't it") .addInfo( AuthorOmdaCZ + " with help of " @@ -275,20 +186,15 @@ protected MultiblockTooltipBuilder createTooltip() { .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("Solidifier Casing", 146, true) + .addCasingInfoMin("Radiator 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) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) .toolTipFinisher("GregTech"); return tt; } @@ -296,7 +202,7 @@ protected MultiblockTooltipBuilder createTooltip() { @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 + // 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 @@ -309,7 +215,6 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { buildPiece(MS_END, stackSize, hintsOnly, (-tTotalWidth - 2) * 2 + 4, 4, 0); } - protected final List> mOutputHatchesByLayer = new ArrayList<>(); protected int mWidth; protected int nWidth; @@ -320,7 +225,7 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu 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); + int tTotalWidth = Math.min(stackSize.stackSize + 1, 6); for (int i = 1; i < tTotalWidth - 1; i++) { mWidth = i; nWidth = i; @@ -351,44 +256,23 @@ else return survivialBuildPiece( 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; + private int mCasingAmount; - protected void onCasingFound() { - mCasing++; - } - - protected void onTopLayerFound(boolean aIsCasing) { - mTopLayerFound = true; - if (aIsCasing) onCasingFound(); + private void onCasingAdded() { + mCasingAmount++; } @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { mWidth = 0; - casingTier = -1; - pipeCasingTier = -1; + mCasingAmount = 0; + if (checkPiece(STRUCTURE_PIECE_MAIN, 3, 4, 0)) { while (mWidth < (6)) { if (checkPiece(MS_RIGHT_MID, (-2 * (mWidth + 1)) - 2, 4, 0) @@ -400,20 +284,11 @@ && checkPiece(MS_LEFT_MID, (2 * (mWidth + 1)) + 3, 4, 0)) { 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; + if (glassTier >= VoltageIndex.UMV) return true; + for (int i = 0; i < this.mEnergyHatches.size(); ++i) + if (this.mEnergyHatches.get(i).mTier > glassTier) return false; + return mCasingAmount >= (100 + mWidth * 23); } @Override @@ -442,121 +317,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long 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); - } + return 4 + (mWidth * 3 / 2) * GTUtility.getTier(this.getMaxInputVoltage()); } @Override @@ -573,7 +334,6 @@ public int getRecipeCatalystPriority() { public void getWailaBody(ItemStack itemStack, List currentTip, IWailaDataAccessor accessor, IWailaConfigHandler config) { super.getWailaBody(itemStack, currentTip, accessor, config); - final NBTTagCompound tag = accessor.getNBTData(); } @Override diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java b/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java index 2bcd9afb5f0..cacfae76947 100644 --- a/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java +++ b/src/main/java/gtPlusPlus/core/block/machine/BlockDecayablesChest.java @@ -140,7 +140,7 @@ public boolean onBlockActivated(final World world, final int x, final int y, fin final TileEntity te = world.getTileEntity(x, y, z); if (te instanceof TileEntityDecayablesChest) { - TileEntityGuiFactory.open(player, x, y, z); + TileEntityGuiFactory.INSTANCE.open(player, x, y, z); return true; } return false; diff --git a/src/main/resources/assets/gregtech/sounds.json b/src/main/resources/assets/gregtech/sounds.json index 2d33d116da2..c8ea3bc8eea 100644 --- a/src/main/resources/assets/gregtech/sounds.json +++ b/src/main/resources/assets/gregtech/sounds.json @@ -123,5 +123,23 @@ "stream": false } ] + }, + "machines.MultiLatheLoop": { + "category": "block", + "sounds": [ + { + "name": "MultiLatheLoop", + "stream": false + } + ] + }, + "machines.MultiAutoclaveLoop": { + "category": "block", + "sounds": [ + { + "name": "MultiAutoclaveLoop", + "stream": false + } + ] } } diff --git a/src/main/resources/assets/gregtech/sounds/MultiAutoclaveLoop.ogg b/src/main/resources/assets/gregtech/sounds/MultiAutoclaveLoop.ogg new file mode 100644 index 00000000000..035b7c94f81 Binary files /dev/null and b/src/main/resources/assets/gregtech/sounds/MultiAutoclaveLoop.ogg differ diff --git a/src/main/resources/assets/gregtech/sounds/MultiLatheLoop.ogg b/src/main/resources/assets/gregtech/sounds/MultiLatheLoop.ogg new file mode 100644 index 00000000000..cafebe66e49 Binary files /dev/null and b/src/main/resources/assets/gregtech/sounds/MultiLatheLoop.ogg differ