Skip to content

Commit

Permalink
Merge branch 'master' into fix_stocking_dupes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master authored Jan 4, 2025
2 parents 6f17355 + 3c1861b commit d3c8136
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 110 deletions.
48 changes: 24 additions & 24 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api("com.github.GTNewHorizons:StructureLib:1.4.0:dev")
api("com.github.GTNewHorizons:StructureLib:1.4.2:dev")
api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.7.8-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.7.13-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughIds:2.1.6:dev")
api("com.github.GTNewHorizons:GTNHLib:0.6.0:dev")
api("com.github.GTNewHorizons:ModularUI:1.2.17:dev")
api("com.github.GTNewHorizons:ModularUI2:2.2.0-1.7.10:dev")
api("com.github.GTNewHorizons:waila:1.8.2:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-516-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.6-gtnh:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-518-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.10-gtnh:dev")
api('com.github.GTNewHorizons:Yamcl:0.6.0:dev')
api("com.github.GTNewHorizons:Postea:1.0.13:dev")

compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.11.0:dev')
compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.11.1:dev')
compileOnlyApi("com.github.GTNewHorizons:Mobs-Info:0.5.0-GTNH:dev")
compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.15:dev")
implementation('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false}
Expand All @@ -60,41 +60,41 @@ dependencies {

compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta28:api') { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.3.4:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.39:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.9.1:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.10.0:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.10.5-GTNH:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.16.0:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.41:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.9.2:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.10.1:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.11.0-GTNH:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.16.1:dev") { transitive = false }

compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.27:deobf") {transitive = false}
compileOnly("com.github.GTNewHorizons:ThaumicBases:1.8.0:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:ThaumicBases:1.8.2:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.28:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.105-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.106-GTNH:dev") { transitive = false }

compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.2.8-GTNH:dev") { transitive = false }
implementation("com.github.GTNewHorizons:TinkersConstruct:1.13.1-GTNH:dev")
compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.3.0-GTNH:dev") { transitive = false }
implementation("com.github.GTNewHorizons:TinkersConstruct:1.13.2-GTNH:dev")

compileOnly("com.github.GTNewHorizons:Chisel:2.16.0-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Translocators:1.2.1:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.16.1-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Translocators:1.3.0:dev") { transitive = false }
compileOnly rfg.deobf("curse.maven:cofh-core-69162:2388751")
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 }
implementation("com.github.GTNewHorizons:Hodgepodge:2.6.11:dev")
implementation("com.github.GTNewHorizons:Hodgepodge:2.6.13:dev")
compileOnly('com.github.GTNewHorizons:Botania:1.12.3-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:HoloInventory:2.4.13-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:HoloInventory:2.5.0-GTNH:dev') { transitive = false }
compileOnly rfg.deobf("curse.maven:extra-utilities-225561:2264384")
compileOnly rfg.deobf('curse.maven:minefactory-reloaded-66672:2366150')
compileOnly("com.github.GTNewHorizons:OpenComputers:1.11.1-GTNH:dev") {transitive = false}
compileOnly("com.github.GTNewHorizons:OpenComputers:1.11.2-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.7.0-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.2-GTNH:dev') {transitive = false}
compileOnly("com.github.GTNewHorizons:BloodMagic:1.7.0: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:SC2:2.3.0:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:Binnie:2.5.2:dev') {transitive = false}
compileOnly('curse.maven:PlayerAPI-228969:2248928') {transitive=false}
devOnlyNonPublishable('com.github.GTNewHorizons:BlockRenderer6343:1.3.0:dev'){transitive=false}
Expand All @@ -103,9 +103,9 @@ dependencies {
annotationProcessor("com.google.auto.value:auto-value:1.10.1")

// For testing forestry integration (iApiary, combs, tree growth simulator)
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:ForestryMC:4.10.0:dev")
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:ForestryMC:4.10.1:dev")
// runtimeOnlyNonPublishable('com.github.GTNewHorizons:neiaddons:1.16.0:dev')
// runtimeOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.8.5-GTNH:dev')
// runtimeOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.9.0-GTNH:dev')
// runtimeOnlyNonPublishable('com.github.GTNewHorizons:Binnie:2.5.2:dev')

testImplementation(platform('org.junit:junit-bom:5.9.2'))
Expand All @@ -119,7 +119,7 @@ dependencies {
functionalTestImplementation('org.junit.platform:junit-platform-reporting')

runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.4:dev")
runtimeOnlyNonPublishable('com.github.GTNewHorizons:EnderIO:2.9.1:dev')
runtimeOnlyNonPublishable('com.github.GTNewHorizons:EnderIO:2.9.2:dev')

// For testing
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:TCNEIAdditions:1.4.2:dev')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void run() {
WerkstoffLoader.LuVTierMaterial.get(OrePrefixes.plate, 8))
.fluidInputs(new FluidStack(solderIndalloy, 1440))
.itemOutputs(ItemRegistry.cal.copy())
.eut(TierEU.RECIPE_LuV)
.duration(20 * MINUTES)
.eut(TierEU.RECIPE_ZPM)
.duration(60 * SECONDS)
.addTo(AssemblyLine);
}
}
5 changes: 3 additions & 2 deletions src/main/java/gregtech/common/GTProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -1627,8 +1627,9 @@ public void registerOre(OreDictionary.OreRegisterEvent aEvent) {
try {
aEvent.Ore.stackSize = 1;

// skipping TinkerConstruct ore registration
if (this.mIgnoreTcon && aOriginalMod.equals(TinkerConstruct.ID)) {
// skipping TinkerConstruct ore registration except for blocks
if (this.mIgnoreTcon && aOriginalMod.equals(TinkerConstruct.ID)
&& !(aEvent.Ore.getItem() instanceof ItemBlock)) {
return;
}
String tModToName = aMod + " -> " + aEvent.Name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import gregtech.api.util.IGTHatchAdder;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.OverclockCalculator;
import gregtech.api.util.ParallelHelper;
import gregtech.api.util.VoidProtectionHelper;

public class MTEAssemblyLine extends MTEExtendedPowerMultiBlockBase<MTEAssemblyLine> implements ISurvivalConstructable {
Expand Down Expand Up @@ -358,8 +359,9 @@ public CheckRecipeResult checkProcessing() {
GT_FML_LOGGER.info("Find available recipe");
}
result = CheckRecipeResultRegistry.SUCCESSFUL;
mOutputItems = new ItemStack[] { tRecipe.mOutput.copy() };
mOutputItems[0].stackSize *= maxParallelBeforeBatchMode * batchMultiplierMax;
ArrayList<ItemStack> outputs = new ArrayList<>();
ParallelHelper.addItemsLong(outputs, tRecipe.mOutput, (long) tRecipe.mOutput.stackSize * maxParallel);
mOutputItems = outputs.toArray(new ItemStack[0]);
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_LATHE_GLOW;
import static gregtech.api.util.GTStructureUtility.buildHatchAdder;
import static gregtech.api.util.GTStructureUtility.chainAllGlasses;
import static net.minecraft.util.EnumChatFormatting.BLUE;
import static net.minecraft.util.EnumChatFormatting.DARK_AQUA;

import java.text.DecimalFormat;
import java.util.List;
Expand All @@ -33,7 +31,6 @@
import net.minecraftforge.common.util.ForgeDirection;

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;
Expand All @@ -54,7 +51,6 @@
import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase;
import gregtech.api.recipe.RecipeMap;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
Expand All @@ -78,40 +74,6 @@ public MTEMultiLathe(String aName) {

protected int pipeTier = 0;

public enum PipeTiers {

Tin(1, 0.75F),
Brass(1, 0.8F),
Electrum(2, 0.9F),
Platinum(4, 1F),
Osmium(8, 1.5F),
Quantium(12, 2F),
FluxedElectrum(16, 3F),
BlackPlutonium(32, 4F);

final int maxParallel;
final float speedBoost;

PipeTiers(int maxParallel, float speedBoost) {
this.maxParallel = maxParallel;
this.speedBoost = speedBoost;
}
}

private PipeTiers getPipeData() {
pipeTier = getPipeTier();
return switch (pipeTier) {
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;
Expand Down Expand Up @@ -228,16 +190,9 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect
protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Lathe")
.addInfo(BLUE + "Allows more parallel recipes based on item pipe casing parallel and voltage.")
.addInfo("Max Parallel Recipes = Item Pipe Casing Parallel + (Voltage Tier * 2).")
.addInfo(BLUE + "Increases processing speed based on item pipe casing speed and voltage.")
.addInfo("Time Reduction = 1 / (Item Pipe Casing Speed Boost + Voltage Tier / 4).")
.addInfo("Speed Increase = (100 / Time Reduction).")
.addInfo(
DARK_AQUA
+ "For example, using Black Plutonium item pipe casings (boost of 4) and Tier 3 voltage (HV) ")
.addInfo(DARK_AQUA + "reduces processing time to 57% of the recipe time, making the machine 175% faster.")
.addInfo(BLUE + "Only uses 80% of the EU/T normally required.")
.addInfo("300% faster than using single block machines of the same voltage")
.addInfo("Gains 8 parallel per Pipe Casing Tier")
.addInfo("Only uses 80% of the EU/t normally required.")
.beginStructureBlock(7, 5, 5, true)
.addController("Front Center")
.addCasingInfoMin("Solid Steel Machine Casing", 42, false)
Expand Down Expand Up @@ -293,36 +248,24 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a
return this.mMaintenanceHatches.size() == 1 && pipeTier > 0 && !mEnergyHatches.isEmpty() && mCasingAmount >= 42;
}

public float speedBoost(float speedBoost, byte voltageTier) {
return 1F / ((speedBoost + voltageTier) / 4F);
}

@Override
protected ProcessingLogic createProcessingLogic() {
return new ProcessingLogic() {

@NotNull
@Override
public CheckRecipeResult process() {
speedBoost = (speedBoost(getPipeData().speedBoost, GTUtility.getTier(getMaxInputVoltage())));
return super.process();
}
}.setEuModifier(0.8F)
return new ProcessingLogic().setSpeedBonus(1F / 4F)
.setEuModifier(0.8F)
.setMaxParallelSupplier(this::getMaxParallelRecipes);
}

public int getMaxParallelRecipes() {
return getPipeData().maxParallel + (GTUtility.getTier(this.getMaxInputVoltage()) * 2);
return (getPipeTier() * 8);
}

@Override
public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y,
int z) {
super.getWailaNBTData(player, tile, tag, world, x, y, z);
tag.setInteger("itemPipeTier", Math.max(0, pipeTier));
tag.setFloat("speedBonus", getPipeData().speedBoost);
tag.setInteger("itemPipeTier", Math.max(0, getPipeTier()));
tag.setFloat("speedBonus", 400);
tag.setFloat("getMaxParallelRecipes", Math.max(0, getMaxParallelRecipes()));
tag.setByte("voltageTier", GTUtility.getTier(this.getMaxInputVoltage()));
}

private static final DecimalFormat dfNone = new DecimalFormat("#");
Expand All @@ -343,7 +286,7 @@ public void getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDat
currenttip.add(
StatCollector.translateToLocal("GT5U.multiblock.speed") + ": "
+ EnumChatFormatting.WHITE
+ dfNone.format(Math.max(0, 100 / speedBoost(tag.getFloat("speedBonus"), tag.getByte("voltageTier"))))
+ dfNone.format((Math.max(0, tag.getInteger("speedBonus"))))
+ "%");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ protected MultiblockTooltipBuilder createTooltip() {
+ "1"
+ EnumChatFormatting.GRAY
+ " parallels per voltage tier")
.beginStructureBlock(7, 5, 7, true)
.beginStructureBlock(15, 8, 7, false)
.addController("Front Center")
.addCasingInfoMin("Electric Compressor Casing", 95, false)
.addCasingInfoMin("Compressor Pipe Casing", 60, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected MultiblockTooltipBuilder createTooltip() {
.addInfo("100% faster than singleblock machines of the same voltage")
.addInfo("Only uses 90% of the EU/t normally required")
.addInfo("Gains 2 parallels per voltage tier")
.beginStructureBlock(7, 5, 7, true)
.beginStructureBlock(7, 8, 7, true)
.addController("Front Center")
.addCasingInfoMin("Electric Compressor Casing", 95, false)
.addCasingInfoMin("Compressor Pipe Casing", 45, false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ public float calculateFinalSuccessChance() {
if (overflow > 0) {
float overflowPct = (float) overflow / INPUT_CHEMICAL_PER_LEVEL;
float penaltyMultiplier = (float) Math.pow(2.0f, overflowPct * -10.0);
return Math.max(0.0f, (this.currentRecipeChance + boost) * penaltyMultiplier);
// First cap to 100%, then apply penalty
return Math.max(0.0f, Math.min(100.0f, this.currentRecipeChance + boost) * penaltyMultiplier);
} else {
return Math.min(100.0f, this.currentRecipeChance + boost);
}
Expand Down
Loading

0 comments on commit d3c8136

Please sign in to comment.