Skip to content

Commit bff95c1

Browse files
Merge remote-tracking branch 'origin/main'
2 parents fc6338b + 12b0396 commit bff95c1

13 files changed

Lines changed: 80 additions & 66 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Current features:
88
* 64A Energy Converters
99
* The Wireless Active Transformer (WAT)
1010
* Has an opt-in coolant system, where the WAT requires coolant to be used, or it'll explode (or just stop if GTm is set to have harmless active transformers)
11+
* Automatically set placed Parallel Hatches to their maximum parallels
1112

1213
All features can be enabled or disabled in the config.
1314

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ sourceSets {
1414
}
1515
}
1616

17+
mixin {
18+
add sourceSets.main, "mixins.${mod_id}.refmap.json"
19+
config "${mod_id}.mixins.json"
20+
}
21+
1722
repositories {
1823
mavenLocal()
1924
mavenCentral()
@@ -138,6 +143,9 @@ apply from: "$rootDir/gradle/scripts/spotless.gradle"
138143
dependencies {
139144
compileOnly("org.jetbrains:annotations:26.0.1")
140145

146+
// Apply Mixin AP
147+
annotationProcessor('org.spongepowered:mixin:0.8.5:processor')
148+
141149
// JEI, EMI, Jade
142150
modCompileOnly("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}")
143151
modCompileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")

changelog.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# GregTech Modern Utilities version 2.2.3
1+
# GregTech Modern Utilities version 2.3.2
22

3-
* Update to GTm version 7.1.4
4-
* Add forgotten lang for the new "watfrequency" placeholder (hotfix to add missing newline from 2.2.2)
3+
* add option to make parallel hatches start at max parallels, courtesy of iluha

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ org.gradle.jvmargs=-Xmx1G
1111
mapping_version=2023.09.03
1212

1313
# Mod Properties
14-
mod_version=2.2.3
14+
mod_version=2.3.2
1515
maven_group=net.neganote.gtmutils
1616
archives_base_name=gtmutils
1717
mod_id=gtmutils

run/config/gtmutils.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/generated/resources/assets/gtmutils/models/block/machine/sterile_cleaning_maintenance_hatch.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88
"side"
99
],
1010
"variants": {
11-
"": {
11+
"is_formed=false": {
12+
"model": {
13+
"parent": "gtmutils:block/machine/part/sterile_cleaning_maintenance_hatch",
14+
"textures": {
15+
"bottom": "gtceu:block/casings/voltage/uhv/bottom",
16+
"side": "gtceu:block/casings/voltage/uhv/side",
17+
"top": "gtceu:block/casings/voltage/uhv/top"
18+
}
19+
}
20+
},
21+
"is_formed=true": {
1222
"model": {
1323
"parent": "gtmutils:block/machine/part/sterile_cleaning_maintenance_hatch",
1424
"textures": {

src/main/java/net/neganote/gtutilities/common/item/UtilItems.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.neganote.gtutilities.common.item;
22

3+
import com.gregtechceu.gtceu.GTCEu;
34
import com.gregtechceu.gtceu.api.item.IComponentItem;
45
import com.gregtechceu.gtceu.api.item.component.ElectricStats;
56
import com.gregtechceu.gtceu.api.item.component.IItemComponent;
@@ -38,7 +39,7 @@ public class UtilItems {
3839
public static ItemEntry<Item> SILVER_CREDIT = null;
3940

4041
static {
41-
if (UtilConfig.INSTANCE.features.omnibreakerEnabled) {
42+
if (UtilConfig.INSTANCE.features.omnibreakerEnabled || GTCEu.isDataGen()) {
4243
OMNIBREAKER = REGISTRATE
4344
.item("omnibreaker", (p) -> OmniBreakerItem.create(p, OMNIBREAKER_TIER))
4445
.lang("Omni-breaker")
@@ -65,7 +66,7 @@ public class UtilItems {
6566
.register();
6667
}
6768

68-
if (UtilConfig.INSTANCE.features.coinsEnabled) {
69+
if (UtilConfig.INSTANCE.features.coinsEnabled || GTCEu.isDataGen()) {
6970
ANCIENT_GOLD_COIN = registerBasicItem("ancient_gold_coin");
7071
CHOCOLATE_COIN = registerBasicItem("chocolate_coin");
7172
COPPER_CREDIT = registerBasicItem("copper_credit");

src/main/java/net/neganote/gtutilities/common/item/UtilToolItems.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.neganote.gtutilities.common.item;
22

3+
import com.gregtechceu.gtceu.GTCEu;
34
import com.gregtechceu.gtceu.api.GTValues;
45
import com.gregtechceu.gtceu.api.item.ComponentItem;
56
import com.gregtechceu.gtceu.api.item.component.ElectricStats;
@@ -20,7 +21,7 @@ public class UtilToolItems {
2021

2122
static {
2223

23-
if (UtilConfig.INSTANCE.features.customLuVToolsEnabled) {
24+
if (UtilConfig.INSTANCE.features.customLuVToolsEnabled || GTCEu.isDataGen()) {
2425
POWER_UNIT_LUV = REGISTRATE.item("luv_power_unit", ComponentItem::create)
2526
.lang("LuV Power Unit")
2627
.properties(p -> p.stacksTo(8))
@@ -29,7 +30,7 @@ public class UtilToolItems {
2930
.register();
3031
}
3132

32-
if (UtilConfig.INSTANCE.features.customZPMToolsEnabled) {
33+
if (UtilConfig.INSTANCE.features.customZPMToolsEnabled || GTCEu.isDataGen()) {
3334
POWER_UNIT_ZPM = REGISTRATE.item("zpm_power_unit", ComponentItem::create)
3435
.lang("ZPM Power Unit")
3536
.properties(p -> p.stacksTo(8))

src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.gregtechceu.gtceu.api.machine.MultiblockMachineDefinition;
1111
import com.gregtechceu.gtceu.api.machine.multiblock.CleanroomType;
1212
import com.gregtechceu.gtceu.api.machine.multiblock.PartAbility;
13+
import com.gregtechceu.gtceu.api.machine.property.GTMachineModelProperties;
1314
import com.gregtechceu.gtceu.api.pattern.FactoryBlockPattern;
1415
import com.gregtechceu.gtceu.api.registry.registrate.MachineBuilder;
1516
import com.gregtechceu.gtceu.common.data.GTMaterials;
@@ -47,7 +48,7 @@ public class UtilMachines {
4748
public static MachineDefinition STERILE_CLEANING_MAINTENANCE_HATCH = null;
4849

4950
static {
50-
if (UtilConfig.INSTANCE.features.sterileHatchEnabled) {
51+
if (UtilConfig.INSTANCE.features.sterileHatchEnabled || GTCEu.isDataGen()) {
5152
STERILE_CLEANING_MAINTENANCE_HATCH = REGISTRATE
5253
.machine("sterile_cleaning_maintenance_hatch",
5354
holder -> new CleaningMaintenanceHatchPartMachine(holder, CleanroomType.STERILE_CLEANROOM))
@@ -61,6 +62,7 @@ public class UtilMachines {
6162
.translatable(CleanroomType.STERILE_CLEANROOM.getTranslationKey())
6263
.withStyle(ChatFormatting.GREEN))))
6364
.tier(UHV)
65+
.modelProperty(GTMachineModelProperties.IS_FORMED, false)
6466
.overlayTieredHullModel(
6567
GregTechModernUtilities.id("block/machine/part/sterile_cleaning_maintenance_hatch"))
6668
// Tier can always be changed later
@@ -111,16 +113,16 @@ public static MachineDefinition[] registerTieredMachines(String name,
111113
public static MachineDefinition[] ENERGY_CONVERTER_64A = null;
112114

113115
static {
114-
if (UtilConfig.INSTANCE.features.converters64aEnabled &&
115-
ConfigHolder.INSTANCE.compat.energy.enableFEConverters) {
116+
if ((UtilConfig.INSTANCE.features.converters64aEnabled &&
117+
ConfigHolder.INSTANCE.compat.energy.enableFEConverters) || GTCEu.isDataGen()) {
116118
ENERGY_CONVERTER_64A = registerConverter(64);
117119
}
118120
}
119121

120122
public static MultiblockMachineDefinition PTERB_MACHINE = null;
121123

122124
static {
123-
if (UtilConfig.INSTANCE.features.pterbEnabled) {
125+
if (UtilConfig.INSTANCE.features.pterbEnabled || GTCEu.isDataGen()) {
124126
PTERB_MACHINE = REGISTRATE
125127
.multiblock("pterb_machine", PTERBMachine::new)
126128
.langValue("Wireless Active Transformer")

src/main/java/net/neganote/gtutilities/config/UtilConfig.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.neganote.gtutilities.config;
22

3+
import com.gregtechceu.gtceu.GTCEu;
34
import com.gregtechceu.gtceu.api.GTValues;
45

56
import net.neganote.gtutilities.GregTechModernUtilities;
@@ -48,6 +49,11 @@ public static class FeatureConfigs {
4849
@Configurable.Comment({ "Whether the Wireless Active Transformer is enabled." })
4950
public boolean pterbEnabled = true;
5051

52+
@Configurable
53+
@Configurable.Comment({
54+
"Whether placed Parallel Hatches should be automatically set to their maximum parallels." })
55+
public boolean parallelHatchAutoConfigure = false;
56+
5157
@Configurable
5258
@Configurable.Comment({ "Base amount of WAT coolant to drain every second.",
5359
"(Setting both this amount and the IO multiplier to 0 disables the coolant mechanic.)" })
@@ -89,6 +95,6 @@ public static class FeatureConfigs {
8995

9096
public static boolean coolantEnabled() {
9197
return UtilConfig.INSTANCE.features.pterbCoolantBaseDrain != 0 ||
92-
UtilConfig.INSTANCE.features.pterbCoolantIOMultiplier != 0.0f;
98+
UtilConfig.INSTANCE.features.pterbCoolantIOMultiplier != 0.0f || GTCEu.isDataGen();
9399
}
94100
}

0 commit comments

Comments
 (0)