Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Tier formula #2297

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3f05440
Fix MuTE structure check and power intake (#1975)
minecraft7771 May 11, 2023
5ad1703
ACP Structure - Rebased (#1978)
minecraft7771 May 12, 2023
2240c55
Add autopush functionality to MuTE (#1976)
minecraft7771 May 12, 2023
87b4f47
Minor MuTE fixes - Rebased (#1983)
minecraft7771 May 13, 2023
c5e06d3
Fix Structure not forming (#1984)
BlueWeabo May 13, 2023
c07cb63
Add missing tooltips (#1981)
POPlol333 May 13, 2023
7654956
Distillation MuTE (#1989)
minecraft7771 May 14, 2023
ab2e9a8
MuTE Upgrade Casings - Rebased (#1988)
minecraft7771 May 14, 2023
4f98894
MuTE fixes (#1991)
minecraft7771 May 14, 2023
b1da642
Fix running in obf
mitchej123 May 14, 2023
eb713dd
fix for real yo
mitchej123 May 14, 2023
605b031
Add a Generic Processing Logic and extract methods - Rebased (#1992)
BlueWeabo May 14, 2023
25d58fc
Add Layered Coke Foundry (#1995)
Steelux8 May 16, 2023
3503146
MuTE inventory upgrade logic (#2082)
minecraft7771 Jun 14, 2023
0a9efa9
fixed layeredCokeBattery checkMachine to prevent 'already in building…
kstvr32 Jun 27, 2023
515b31c
MuTE casing structure element (#2105)
minecraft7771 Jun 29, 2023
7be316a
Cache MuTEs for non-instance specific actions (#2109)
minecraft7771 Jul 1, 2023
6a9889c
First Modular Upgrade Casings Implementation (#2142)
Steelux8 Jul 23, 2023
0123d6c
More Additions to MUCs and the LCB (#2215)
Steelux8 Aug 8, 2023
bc30e8b
Refactor Item and Fluid to be in separate logic classes (#2178)
BlueWeabo Aug 8, 2023
a480d8d
remove accidentally added methods
BlueWeabo Aug 8, 2023
7513736
fix missed return
BlueWeabo Aug 8, 2023
b2e6aa0
fixes after rebase
BlueWeabo Aug 8, 2023
f4ceb07
Laser Engraver Multi. (#2223)
TheEpicGamer274 Aug 20, 2023
55f8f2c
Add TickableTask (#2216)
miozune Sep 4, 2023
fda9b73
Rework a bit of ProcessingLogic to fit MuTEs (#2283)
BlueWeabo Sep 9, 2023
2c99473
address minecraft's reviews from #2283
BlueWeabo Sep 11, 2023
551fd45
implement weighted average tier formula
BlueWeabo Sep 18, 2023
5e91078
set temporary weight multipliers
BlueWeabo Sep 18, 2023
f16bab0
actually divide by the weightSum
BlueWeabo Sep 18, 2023
493ab00
address formula being wrong for voltage
BlueWeabo Sep 19, 2023
ce26555
Refactor MuTE processing logic (#2301)
miozune Sep 22, 2023
360a84b
Fix void protection for mutes (#2298)
BlueWeabo Sep 25, 2023
804d950
Adds a Simple PowerOutput task and cleans up some of the code. (#2303)
BlueWeabo Sep 25, 2023
f8f0659
Merge branch 'feature/MuTEMaster' into implementTierFormula
BlueWeabo Sep 25, 2023
ebb2ee0
Cleanup MuTEMaster code (#2282)
boubou19 Sep 25, 2023
baa4650
Clean up a lil bit and fix some issues with MuTEs (#2316)
BlueWeabo Sep 29, 2023
8628776
Merge branch 'feature/MuTEMaster' into implementTierFormula
BlueWeabo Oct 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addon.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ minecraft {
def err = "Cannot automatically determine NBT version. Using defaults hardcoded in buildscript. This could break your world!"
project.logger.error(err)
vMajor = 509
vMinor = 42
vPatch = 55
vMinor = 44
vPatch = 0
logLevel = LogLevel.WARN
}
}
Expand Down
30 changes: 17 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1690104383
//version: 1692122114
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -69,7 +69,7 @@ plugins {
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.21'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
}

print("You might want to check out './gradlew :faq' if your build fails.\n")
Expand Down Expand Up @@ -401,9 +401,13 @@ if (identifiedVersion == versionOverride) {

group = "com.github.GTNewHorizons"
if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
archivesBaseName = customArchiveBaseName
base {
archivesName = customArchiveBaseName
}
} else {
archivesBaseName = modId
base {
archivesName = modId
}
}


Expand Down Expand Up @@ -558,9 +562,6 @@ repositories {
maven {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
mavenContent {
excludeGroup("net.minecraftforge") // missing the `universal` artefact
}
}
maven {
name = "GTNH Maven"
Expand Down Expand Up @@ -627,6 +628,8 @@ def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
ext.mixinProviderSpec = mixinProviderSpec

def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'

dependencies {
if (usesMixins.toBoolean()) {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
Expand All @@ -638,7 +641,7 @@ dependencies {
}
}
if (usesMixins.toBoolean()) {
implementation(modUtils.enableMixins(mixinProviderSpec))
implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap))
} else if (forceEnableMixins.toBoolean()) {
runtimeOnlyNonPublishable(mixinProviderSpec)
}
Expand Down Expand Up @@ -691,8 +694,6 @@ if (file('dependencies.gradle.kts').exists()) {
throw new RuntimeException("Missing dependencies.gradle[.kts]")
}

def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'

tasks.register('generateAssets') {
group = "GTNH Buildscript"
description = "Generates a mixin config file at /src/main/resources/mixins.modid.json if needed"
Expand Down Expand Up @@ -775,10 +776,10 @@ dependencies {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.19')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.26')
}

java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
java17PatchDependencies('net.minecraft:launchwrapper:1.17.2') {transitive = false}
java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
Expand Down Expand Up @@ -1148,7 +1149,10 @@ tasks.named("processIdeaSettings").configure {

tasks.named("ideVirtualMainClasses").configure {
// Make IntelliJ "Build project" build the mod jars
dependsOn("jar", "reobfJar", "spotlessCheck")
dependsOn("jar", "reobfJar")
if (!disableSpotless) {
dependsOn("spotlessCheck")
}
}

// workaround variable hiding in pom processing
Expand Down
34 changes: 17 additions & 17 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,33 @@
* 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.2.7:dev")
api("com.github.GTNewHorizons:StructureLib:1.2.8:dev")
api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.3.70-GTNH:dev")
api("com.github.GTNewHorizons:NotEnoughItems:2.3.83-GTNH:dev")
api("com.github.GTNewHorizons:GTNHLib:0.0.13:dev")
api("com.github.GTNewHorizons:ModularUI:1.1.16:dev")
api("com.github.GTNewHorizons:waila:1.6.0:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-235-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.29-gtnh-pre:dev")
implementation("com.github.GTNewHorizons:Eternal-Singularity:1.1.0:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-252-GTNH:dev")
api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.1.42-gtnh:dev")
implementation("com.github.GTNewHorizons:Eternal-Singularity:1.1.2:dev")

compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.2.10:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.34:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.4.21:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.6.10:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.7.10-GTNH:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.14.5:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.2.11:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.36:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.4.24:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.6.14:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.7.12-GTNH:dev") { transitive = false }
compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.14.9:dev") { transitive = false }

compileOnly("com.github.GTNewHorizons:EnderCore:0.2.16:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Galacticraft:3.0.71-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.9.38-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.11.3-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:EnderCore:0.2.17:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Galacticraft:3.0.73-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.9.39-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Chisel:2.11.4-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Translocators:1.1.2.21:dev") { transitive = false }
compileOnly("curse.maven:cofh-core-69162:2388751") { transitive = false }
compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.4.19:dev") { transitive = false }
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.2.23:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:Botania:1.9.23-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.2.31:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:Botania:1.9.24-GTNH:dev') { transitive = false }

compileOnly("com.google.auto.value:auto-value-annotations:1.10.1") { transitive = false }
annotationProcessor("com.google.auto.value:auto-value:1.10.1")
Expand Down
15 changes: 8 additions & 7 deletions docs/ResourcePacks_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ This is a guide for resource packs to set up advanced configurations for GUI.

## Override text color with mcmeta files

You might want to change color of text if your texture has similar color to text. You can place mcmeta files at the following locations:
- `gregtech/textures/gui/background/singleblock_default.mcmeta` (most of the machines)
- `gregtech/textures/gui/background/bronze.mcmeta` (steam bronze machines)
- `gregtech/textures/gui/background/steel.mcmeta` (steam steel machines)
- `gregtech/textures/gui/background/primitive.mcmeta` (steam primitive machines)
- `gregtech/textures/gui/background/fusion_computer.mcmeta` (fusion reactor controller)
- `modularui/textures/gui/background/vanilla_background.mcmeta` (NEI)
You might want to change color of text displayed on GUI. You can place mcmeta files at the following locations:
- `gregtech/textures/gui/background/singleblock_default.png.mcmeta` (most of the machines)
- `gregtech/textures/gui/background/bronze.png.mcmeta` (steam bronze machines)
- `gregtech/textures/gui/background/steel.png.mcmeta` (steam steel machines)
- `gregtech/textures/gui/background/primitive.png.mcmeta` (steam primitive machines)
- `gregtech/textures/gui/background/fusion_computer.png.mcmeta` (fusion reactor controller)
- `modularui/textures/gui/background/vanilla_background.png.mcmeta` (NEI)

(and there might be more in the future, but currently these are exhaustive.)
You also need to place png file corresponding to mcmeta file, even if it's unchanged from the mod's default one.

Here is an example of the file:
```json
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/gregtech/GT_Mod.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.google.common.base.Stopwatch;

import appeng.api.AEApi;
import appeng.helpers.InterfaceTerminalSupportedClassProvider;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
Expand Down Expand Up @@ -60,7 +61,6 @@
import gregtech.api.gui.modularui.GT_UIInfos;
import gregtech.api.interfaces.internal.IGT_Mod;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.ItemData;
import gregtech.api.objects.XSTR;
import gregtech.api.threads.GT_Runnable_MachineBlockUpdate;
Expand All @@ -74,6 +74,7 @@
import gregtech.api.util.GT_RecipeRegistrator;
import gregtech.api.util.GT_SpawnEventHandler;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.item.ItemHolder;
import gregtech.common.GT_DummyWorld;
import gregtech.common.GT_Network;
import gregtech.common.GT_Proxy;
Expand All @@ -84,6 +85,7 @@
import gregtech.common.misc.GT_Command;
import gregtech.common.misc.spaceprojects.commands.SPM_Command;
import gregtech.common.misc.spaceprojects.commands.SP_Command;
import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_CraftingInput_ME;
import gregtech.common.tileentities.storage.GT_MetaTileEntity_DigitalChestBase;
import gregtech.crossmod.Waila;
import gregtech.loaders.load.GT_CoverBehaviorLoader;
Expand Down Expand Up @@ -272,6 +274,7 @@ public void onPreLoad(FMLPreInitializationEvent aEvent) {
EntityRegistry.registerModEntity(GT_Entity_Arrow.class, "GT_Entity_Arrow", 1, GT_Values.GT, 160, 1, true);
EntityRegistry
.registerModEntity(GT_Entity_Arrow_Potion.class, "GT_Entity_Arrow_Potion", 2, GT_Values.GT, 160, 1, true);
InterfaceTerminalSupportedClassProvider.register(GT_MetaTileEntity_Hatch_CraftingInput_ME.class);

GT_PreLoad.runMineTweakerCompat();

Expand Down Expand Up @@ -804,7 +807,7 @@ public void onIDChangingEvent(FMLModIdMappingEvent aEvent) {
GT_Utility.reInit();
GT_Recipe.reInit();
try {
for (Map<? extends GT_ItemStack, ?> gt_itemStackMap : GregTech_API.sItemStackMappings) {
for (Map<? extends ItemHolder, ?> gt_itemStackMap : GregTech_API.sItemStackMappings) {
GT_Utility.reMap(gt_itemStackMap);
}
} catch (Throwable e) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/gregtech/api/GregTech_API.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.item.ItemHolder;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.GT_DummyWorld;
import gregtech.common.items.GT_IntegratedCircuit_Item;
Expand Down Expand Up @@ -106,7 +107,7 @@ public class GregTech_API {
/**
* Fixes the HashMap Mappings for ItemStacks once the Server started
*/
public static final Collection<Map<? extends GT_ItemStack, ?>> sItemStackMappings = new ArrayList<>();
public static final Collection<Map<? extends ItemHolder, ?>> sItemStackMappings = new ArrayList<>();

/**
* The MetaTileEntity-ID-List-Length
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/gregtech/api/enums/GT_Values.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public static final class NBT {
public static final String COLOR = "gt.color", // Integer
COVERS = "gt.covers", // String
CUSTOM_NAME = "name", // String
DISPAY = "gt.display", // String
DISPLAY = "gt.display", // String
TIER = "gt.tier", // Number
FACING = "gt.facing", // Byte
LOCK_UPGRADE = "gt.locked", // Boolean
Expand Down Expand Up @@ -322,6 +322,7 @@ public static final class NBT {
BURN_TIME_LEFT = "gt.burn.time.left", // Number
TOTAL_BURN_TIME = "gt.total.burn.time", // Number
ALLOWED_WORK = "gt.allowed.work", // Boolean
TASKS = "gt.tasks", // Compound

// MultiBlock
STRUCTURE_OK = "gt.structure.ok", ROTATION = "gt.eRotation", FLIP = "gt.eFlip", TARGET = "gt.target", // Boolean
Expand All @@ -337,13 +338,14 @@ public static final class NBT {
UPGRADE_INVENTORIES_INPUT = "gt.invlist.upg.in", // NBT List
UPGRADE_INVENTORIES_OUTPUT = "gt.invlist.upg.out", // NBT List
UPGRADE_TANK_CAPACITY = "gt.tank.cap.upg", // Long
UPGRADE_TANK_COUNT = "gt.tank.ct.upg", // Int
UPGRADE_TANK_CAPACITY_MULTIPLIER = "gt.tank.cap.mult.upg", // Long
UPGRADE_TANK_UUID = "gt.tankuuid.upg", // String
UPGRADE_TANK_NAME = "gt.tankname.upg", // String
UPGRADE_TANKS_INPUT = "gt.tanklist.upg.in", // NBT List
UPGRADE_TANKS_OUTPUT = "gt.tanklist.upg.out", // NBT List
UPGRADE_TANKS_COUNT = "gt.tankcount.upg", // Int
UPGRADE_TANKS_PREFIX = "gt.tank.upg", // NBT Tag
UPGRADE_AMPERAGE = "gt.amp.upg", // Long
SEPARATE_INPUTS = "gt.separate.inputs", // Boolean
VOIDING_MODE = "gt.voiding.mode", // String
BATCH_MODE = "gt.batch.mode", // Boolean
Expand Down Expand Up @@ -605,6 +607,8 @@ public static final class NBT {
+ EnumChatFormatting.LIGHT_PURPLE
+ "minecraft7771";

public static final String AuthorTheEpicGamer274 = "Author: " + "TheEpicGamer274";

// 7.5F comes from GT_Tool_Turbine_Large#getBaseDamage() given huge turbines are the most efficient now.
public static double getMaxPlasmaTurbineEfficiencyFromMaterial(Materials material) {
return (5F + (7.5F + material.mToolQuality)) / 10.0;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/gregtech/api/enums/InventoryType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package gregtech.api.enums;

public enum InventoryType {
Input,
Output,
Both;
}
Loading