Skip to content

Commit

Permalink
Merge branch 'master' into godforge_finale
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Sep 7, 2024
2 parents 377236a + 187ea09 commit 065398c
Show file tree
Hide file tree
Showing 52 changed files with 388 additions and 1,337 deletions.
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ dependencies {
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 rfg.deobf("curse.maven:biomes-o-plenty-220318:2499612")

compileOnly('com.github.GTNewHorizons:SC2:2.2.0:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:Binnie:2.4.1:dev') {transitive = false}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/bwcrossmod/galacticgreg/MTEVoidMinerBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ private void handleOutputs() {
final List<ItemStack> inputOres = this.getStoredInputs()
.stream()
.filter(GTUtility::isOre)
.collect(Collectors.toList());;
.collect(Collectors.toList());
final ItemStack output = this.nextOre();
output.stackSize = multiplier;
if (inputOres.size() == 0 || this.mBlacklist && inputOres.stream()
if (inputOres.isEmpty() || this.mBlacklist && inputOres.stream()
.noneMatch(is -> GTUtility.areStacksEqual(is, output))
|| !this.mBlacklist && inputOres.stream()
.anyMatch(is -> GTUtility.areStacksEqual(is, output)))
Expand Down
15 changes: 13 additions & 2 deletions src/main/java/ggfab/mte/MTEAdvAssLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static gregtech.api.util.GTStructureUtility.buildHatchAdder;
import static gregtech.api.util.GTStructureUtility.ofHatchAdder;
import static gregtech.api.util.GTUtility.filterValidMTEs;
import static gregtech.api.util.GTUtility.formatNumbers;

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -41,6 +42,7 @@
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StringUtils;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
Expand All @@ -63,6 +65,7 @@
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;

import ggfab.ConfigurationHandler;
import ggfab.GGConstants;
import ggfab.mui.ClickableTextWidget;
import gregtech.api.GregTechAPI;
Expand Down Expand Up @@ -104,6 +107,7 @@
public class MTEAdvAssLine extends MTEExtendedPowerMultiBlockBase<MTEAdvAssLine> implements ISurvivalConstructable {

private static final ItemStack NOT_CHECKED = new ItemStack(Blocks.dirt);
public static final double LASER_OVERCLOCK_PENALTY_FACTOR = ConfigurationHandler.INSTANCE.getLaserOCPenaltyFactor();
private static final String STRUCTURE_PIECE_FIRST = "first";
private static final String STRUCTURE_PIECE_LATER = "later";
private static final String STRUCTURE_PIECE_LAST = "last";
Expand Down Expand Up @@ -305,10 +309,16 @@ protected MultiblockTooltipBuilder createTooltip() {
tt.addMachineType("Assembling Line")
.addInfo("Controller block for the Advanced Assembling Line")
.addInfo("Built exactly the same as standard Assembling Line")
.addInfo("Place in world to get more info. It will be a lengthy read.")
.addInfo("Assembling Line with item pipelining")
.addInfo("All fluids are however consumed at start")
.addInfo("Use voltage of worst energy hatch for overclocking")
.addInfo("Perform normal overclock with given voltage")
.addInfo("Perform laser overclock with extra amperages from multi-amp energy hatches")
.addInfo("Each laser overclock reduces recipe time by 50%")
.addInfo(
"and multiplies power by (4 + " + formatNumbers(LASER_OVERCLOCK_PENALTY_FACTOR)
+ " * total laser overclock count)")
.addInfo(EnumChatFormatting.BOLD + "Will not overclock beyond 1 tick.")
.addInfo("EU/t is (number of slices working) * (overclocked EU/t)")
.addSeparator()
.beginVariableStructureBlock(5, 16, 4, 4, 3, 3, false)
Expand Down Expand Up @@ -768,7 +778,8 @@ public CheckRecipeResult checkProcessing() {

OverclockCalculator laserOCCalculator = new OverclockCalculator().setRecipeEUt(recipe.mEUt)
.setDurationUnderOneTickSupplier(() -> ((double) (recipe.mDuration) / recipe.mInputs.length))
.setEutIncreasePerOCSupplier(overclock -> 4 + 0.3 * Math.max(overclock - normalOverclockCount, 0))
.setEutIncreasePerOCSupplier(
overclock -> 4 + LASER_OVERCLOCK_PENALTY_FACTOR * Math.max(overclock - normalOverclockCount, 0))
.setParallel(originalMaxParallel)
.setEUt(inputEUt / recipe.mInputs.length);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public boolean onRunningTick(ItemStack aStack) {
if (tFluid == null) continue;
if (isFluidLocked) {
if (mLockedFluid != null) {
if (!tFluid.isFluidEqual(mLockedFluid)) continue;;
if (!tFluid.isFluidEqual(mLockedFluid)) continue;
} else {
mLockedFluid = tFluid.copy();
mLockedFluid.amount = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/GTMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public class GTMod implements IGTMod {
clientSide = "gregtech.common.GTClient",
serverSide = "gregtech.common.GTServer")
public static GTProxy gregtechproxy;
public static final boolean DEBUG = Boolean.getBoolean("gt.debug");;
public static final boolean DEBUG = Boolean.getBoolean("gt.debug");

public static int MAX_IC2 = 2147483647;
public static GTAchievements achievements;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/gregtech/api/enums/SoundResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
// UUID of the owner.
owner_uuid = aBaseMetaTileEntity.getOwnerUuid();

SpaceProjectManager.checkOrCreateTeam(owner_uuid);;
SpaceProjectManager.checkOrCreateTeam(owner_uuid);

tryFetchingEnergy();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/common/GTClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ public void onPlayerTickEventClient(TickEvent.PlayerTickEvent aEvent) {

@SubscribeEvent
public void onConfigChange(ConfigChangedEvent.OnConfigChangedEvent e) {
if (GregTech.ID.equals(e.modID) && "kekztech/client".equals(e.configID)) {
if (GregTech.ID.equals(e.modID) && "client".equals(e.configID)) {
// refresh client preference and send to server, since it's the only config we allow changing at runtime.
mPreference = new GTClientPreference();
GTPreLoad.loadClientConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down
Loading

0 comments on commit 065398c

Please sign in to comment.