Skip to content

Commit db10b20

Browse files
committed
Bump version to 1.1.5
* Fix various PTERB issues
1 parent 3f722b8 commit db10b20

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
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.4
1+
# GregTech Modern Utilities version 1.1.5
22

3-
* Fix PTERB coolant not being re-enabled if only one of the coolant vars was zero
4-
* Add more Jade integration, putting the PTERB's coolant drain in the hover info
5-
* Add tool tags to Omni-breaker, update tooltip
3+
* Fix various PTERB issues

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.4
14+
mod_version=1.1.5
1515
maven_group=net.neganote.gtmutils
1616
archives_base_name=gtmutils
1717
mod_id=gtmutils

src/generated/resources/assets/gtmutils/lang/en_ud.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"tooltip.omnibreaker.modern_vajra": "ɐɹظɐΛ uɹǝpoW Ɐ",
3939
"tooltip.omnibreaker.right_click_function": "¡ʞɔıןɔ-ʇɥbıɹ ɥʇıʍ sʞɔoןq ןɐnpıʌıpuı ʞɐǝɹᗺ",
4040
"tooltip.pterb_machine.frequencies": "˙ɹǝɯɹoɟsuɐɹ⟘ ǝʌıʇɔⱯ ǝןbuıs ɐ ǝʞıן ʇɔɐ ʎɔuǝnbǝɹɟ ǝɯɐs ǝɥʇ ɥʇıʍ sᗺᴚƎ⟘Ԁ ןןⱯ",
41+
"tooltip.pterb_machine.input_coolant_before_use": "¡ʎɔuǝnbǝɹɟ oɹǝz-uou ɐ oʇ ᗺᴚƎ⟘Ԁ ǝɥʇ buıʇʇǝs ǝɹoɟǝq ʇuɐןooɔ ʇnduı sʎɐʍןⱯ",
4142
"tooltip.pterb_machine.purpose": ")ᗺᴚƎ⟘Ԁ( ɹǝɯɹoɟsuɐɹ⟘ ǝʌıʇɔⱯ ssǝןǝɹıM",
4243
"tooltip.pterb_machine.uses_coolant": "¡uoıʇɔunɟ oʇ %s suıɐɹᗡ"
4344
}

src/generated/resources/assets/gtmutils/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"tooltip.omnibreaker.modern_vajra": "A Modern Vajra",
3939
"tooltip.omnibreaker.right_click_function": "Break individual blocks with right-click!",
4040
"tooltip.pterb_machine.frequencies": "All PTERBs with the same frequency act like a single Active Transformer.",
41+
"tooltip.pterb_machine.input_coolant_before_use": "Always input coolant before setting the PTERB to a non-zero frequency!",
4142
"tooltip.pterb_machine.purpose": "Wireless Active Transformer (PTERB)",
4243
"tooltip.pterb_machine.uses_coolant": "Drains %s to function!"
4344
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ public static MachineDefinition[] registerTieredMachines(String name,
137137
.withStyle(ChatFormatting.AQUA) : "")
138138
.withStyle(ChatFormatting.DARK_RED),
139139
UtilConfig.coolantEnabled())
140+
.conditionalTooltip(Component.translatable("tooltip.pterb_machine.input_coolant_before_use")
141+
.withStyle(ChatFormatting.DARK_RED), UtilConfig.coolantEnabled())
140142
.pattern((definition) -> FactoryBlockPattern.start()
141143
// spotless:off
142144
.aisle(" XXX ", " F ", " ", " H ", " H ", " H ", " H ", " H ")

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,13 @@ private int calculateCoolantDrain() {
158158
}
159159

160160
long scalingFactor = Math.max(inputAmperage * inputVoltage, outputAmperage * outputVoltage);
161-
return UtilConfig.INSTANCE.features.pterbCoolantBaseDrain +
161+
162+
int coolantDrain = UtilConfig.INSTANCE.features.pterbCoolantBaseDrain +
162163
(int) (scalingFactor * UtilConfig.INSTANCE.features.pterbCoolantIOMultiplier);
164+
if (coolantDrain <= 0) {
165+
coolantDrain = 1;
166+
}
167+
return coolantDrain;
163168
}
164169

165170
@SuppressWarnings("RedundantIfStatement") // It is cleaner to have the final return true separate.
@@ -180,6 +185,12 @@ public boolean onWorking() {
180185
@Override
181186
public void onStructureFormed() {
182187
super.onStructureFormed();
188+
189+
if (frequency == 0) {
190+
getRecipeLogic().setStatus(RecipeLogic.Status.SUSPEND);
191+
return;
192+
}
193+
183194
// capture all energy containers
184195
List<IMultiPart> localPowerInput = new ArrayList<>();
185196
List<IMultiPart> localPowerOutput = new ArrayList<>();

src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public static void init(RegistrateLangProvider provider) {
2020
provider.add("tooltip.omnibreaker.modern_vajra", "A Modern Vajra");
2121

2222
provider.add("tooltip.pterb_machine.uses_coolant", "Drains %s to function!");
23+
provider.add("tooltip.pterb_machine.input_coolant_before_use",
24+
"Always input coolant before setting the PTERB to a non-zero frequency!");
2325

2426
provider.add("gtmutils.multiblock.pterb_machine.coolant_usage", "§cDrains %sL of %s per second");
2527
provider.add("gtmutils.pterb_machine.invalid_frequency", "PTERBs will not work on frequency 0!");

0 commit comments

Comments
 (0)