Skip to content

Commit f995b20

Browse files
committed
HOTFIX: bump version, fix another crash (and a structure issue)
1 parent f8735d2 commit f995b20

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

changelog.md

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

3-
1.1.0 added PTERB
4-
5-
HOTFIX: prevent crashing when Quantum Coolant is disabled
3+
HOTFIX: fix yet another PTERB crash, sorry

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-1.20.1
1212

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

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ public static MachineDefinition[] registerTieredMachines(String name,
153153
.where('#', air())
154154
.where('X',
155155
blocks(CASING_PALLADIUM_SUBSTATION.get())
156-
.or(PTERBMachine.getEnergyHatchPredicates())
157-
.or(abilities(PartAbility.IMPORT_FLUIDS_1X)
158-
.setExactLimit(UtilConfig.coolantEnabled() ? 1 : 0)))
156+
.or(PTERBMachine.getHatchPredicates()))
159157
.where('H', blocks(HIGH_POWER_CASING.get()))
160158
.where('C', controller(blocks(definition.getBlock())))
161159
.where('F', frames(GTMaterials.Neutronium))

src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,20 @@ public void onStructureInvalid() {
273273
converterSubscription.unsubscribe();
274274
}
275275

276-
public static TraceabilityPredicate getEnergyHatchPredicates() {
277-
return abilities(PartAbility.INPUT_ENERGY).setPreviewCount(1)
276+
public static TraceabilityPredicate getHatchPredicates() {
277+
return UtilConfig.coolantEnabled() ? abilities(PartAbility.INPUT_ENERGY).setPreviewCount(1)
278278
.or(abilities(PartAbility.OUTPUT_ENERGY).setPreviewCount(2))
279279
.or(abilities(PartAbility.SUBSTATION_INPUT_ENERGY).setPreviewCount(1))
280280
.or(abilities(PartAbility.SUBSTATION_OUTPUT_ENERGY).setPreviewCount(1))
281281
.or(abilities(PartAbility.INPUT_LASER).setPreviewCount(1))
282-
.or(abilities(PartAbility.OUTPUT_LASER).setPreviewCount(1));
282+
.or(abilities(PartAbility.OUTPUT_LASER).setPreviewCount(1))
283+
.or(abilities(PartAbility.IMPORT_FLUIDS).setMinGlobalLimited(1)) :
284+
abilities(PartAbility.INPUT_ENERGY).setPreviewCount(1)
285+
.or(abilities(PartAbility.OUTPUT_ENERGY).setPreviewCount(2))
286+
.or(abilities(PartAbility.SUBSTATION_INPUT_ENERGY).setPreviewCount(1))
287+
.or(abilities(PartAbility.SUBSTATION_OUTPUT_ENERGY).setPreviewCount(1))
288+
.or(abilities(PartAbility.INPUT_LASER).setPreviewCount(1))
289+
.or(abilities(PartAbility.OUTPUT_LASER).setPreviewCount(1));
283290
}
284291

285292
@Override
@@ -326,11 +333,12 @@ public void addDisplayText(@NotNull List<Component> textList) {
326333
FormattingUtil.formatNumbers(
327334
Math.abs(outputTotal))));
328335
}
329-
330-
textList.add(Component
331-
.translatable("gtmutils.multiblock.pterb_machine.coolant_usage",
332-
FormattingUtil.formatNumbers(coolantDrain),
333-
UtilMaterials.QuantumCoolant.getLocalizedName()));
336+
if (UtilConfig.coolantEnabled()) {
337+
textList.add(Component
338+
.translatable("gtmutils.multiblock.pterb_machine.coolant_usage",
339+
FormattingUtil.formatNumbers(coolantDrain),
340+
UtilMaterials.QuantumCoolant.getLocalizedName()));
341+
}
334342
if (!ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) {
335343
textList.add(Component
336344
.translatable("gtceu.multiblock.active_transformer.danger_enabled"));

0 commit comments

Comments
 (0)