Skip to content

Commit 4e642ef

Browse files
committed
make omnibreaker teleport drops to player on right click
1 parent d862a6e commit 4e642ef

7 files changed

Lines changed: 23 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
curseforge-id: ${{ vars.CURSE_ID }}
5757
curseforge-token: ${{ secrets.CURSE_TOKEN }}
5858

59+
modrinth-id: ${{ vars.MODRINTH_ID }}
60+
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
61+
5962
github-token: ${{ secrets.GITHUB_TOKEN }}
6063
github-generate-changelog: true
6164
github-tag: "1.20.1-${{ steps.gradle_properties.outputs.mod_version }}"

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# GregTech Modern Utilities version 1.1.11
1+
# GregTech Modern Utilities version 2.0.0
22

33
* Fix terminal problems (as much as possible) and remove warning about building PTERB with terminal

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
"config.gtmutils.option.pterbCoolantIOMultiplier": "ɹǝıןdıʇןnWOIʇuɐןooƆqɹǝʇd",
2626
"config.gtmutils.option.pterbEnabled": "pǝןqɐuƎqɹǝʇd",
2727
"config.gtmutils.option.sterileHatchEnabled": "pǝןqɐuƎɥɔʇɐHǝןıɹǝʇs",
28-
"config.jade.plugin_gtmutils.pterb_info": "oɟuI ᗺᴚƎ⟘Ԁ",
28+
"config.jade.plugin_gtmutils.pterb_info": "oɟuI ⟘ⱯM",
2929
"gtmutils.gui.pterb.wireless_configurator.title": "ʎɔuǝnbǝɹɟ ssǝןǝɹıM",
3030
"gtmutils.machine.64a_energy_converter.tooltip_tool_usage": "ǝbuɐɥɔ oʇ ʇǝןןɐW ʇɟoS ǝsn 'ㄥ§ɹǝʇɹǝʌuoƆ ∩Ǝɟ§ sɐ sʇɹɐʇS",
3131
"gtmutils.multiblock.pterb_machine.coolant_usage": "puoɔǝs ɹǝd %s ɟo Ꞁ%s suıɐɹᗡɔ§",
3232
"gtmutils.pterb.current_frequency": "%s :ʎɔuǝnbǝɹɟ ʇuǝɹɹnƆ",
33-
"gtmutils.pterb_machine.invalid_frequency": "¡0 ʎɔuǝnbǝɹɟ uo ʞɹoʍ ʇou ןןıʍ sᗺᴚƎ⟘Ԁ",
33+
"gtmutils.pterb_machine.invalid_frequency": "¡0 ʎɔuǝnbǝɹɟ uo ʞɹoʍ ʇou ןןıʍ s⟘ⱯM",
3434
"item.gtmutils.omnibreaker": "ɹǝʞɐǝɹq-ıuɯO",
3535
"itemGroup.gtmutils.creative_tab": "sǝıʇıןıʇ∩ uɹǝpoW ɥɔǝ⟘bǝɹ⅁",
3636
"material.gtmutils.quantum_coolant": "ʇuɐןooƆ ɯnʇuɐnὉ",
@@ -45,7 +45,7 @@
4545
"tooltip.omnibreaker.tool_mode_2": "ɹǝʌıɹpʍǝɹɔS",
4646
"tooltip.omnibreaker.tool_mode_3": "ɹǝʇʇnɔ-ǝɹıM",
4747
"tooltip.omnibreaker.tool_mode_4": "ɹɐqʍoɹƆ",
48-
"tooltip.pterb_machine.frequencies": "˙ɹǝɯɹoɟsuɐɹ⟘ ǝʌıʇɔⱯ ǝןbuıs ɐ ǝʞıן ʇɔɐ ʎɔuǝnbǝɹɟ ǝɯɐs ǝɥʇ ɥʇıʍ sᗺᴚƎ⟘Ԁ ןןⱯ",
48+
"tooltip.pterb_machine.frequencies": "˙ɹǝɯɹoɟsuɐɹ⟘ ǝʌıʇɔⱯ ǝןbuıs ɐ ǝʞıן ʇɔɐ ʎɔuǝnbǝɹɟ ǝɯɐs ǝɥʇ ɥʇıʍ s⟘ⱯM ןןⱯ",
4949
"tooltip.pterb_machine.input_coolant_before_use": "¡uo ʇı buıuɹnʇ ǝɹoɟǝq ʇuɐןooɔ ʇnduı sʎɐʍןⱯ",
5050
"tooltip.pterb_machine.purpose": ")ᗺᴚƎ⟘Ԁ( ǝbpıɹᗺ uǝsoᴚ-uıǝʇsuıƎ ɹǝɟsuɐɹ⟘ ɹǝʍoԀ",
5151
"tooltip.pterb_machine.uses_coolant": "¡uoıʇɔunɟ oʇ %s suıɐɹᗡ"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
"config.gtmutils.option.pterbCoolantIOMultiplier": "pterbCoolantIOMultiplier",
2626
"config.gtmutils.option.pterbEnabled": "pterbEnabled",
2727
"config.gtmutils.option.sterileHatchEnabled": "sterileHatchEnabled",
28-
"config.jade.plugin_gtmutils.pterb_info": "PTERB Info",
28+
"config.jade.plugin_gtmutils.pterb_info": "WAT Info",
2929
"gtmutils.gui.pterb.wireless_configurator.title": "Wireless frequency",
3030
"gtmutils.machine.64a_energy_converter.tooltip_tool_usage": "Starts as §fEU Converter§7, use Soft Mallet to change",
3131
"gtmutils.multiblock.pterb_machine.coolant_usage": "§cDrains %sL of %s per second",
3232
"gtmutils.pterb.current_frequency": "Current frequency: %s",
33-
"gtmutils.pterb_machine.invalid_frequency": "PTERBs will not work on frequency 0!",
33+
"gtmutils.pterb_machine.invalid_frequency": "WATs will not work on frequency 0!",
3434
"item.gtmutils.omnibreaker": "Omni-breaker",
3535
"itemGroup.gtmutils.creative_tab": "GregTech Modern Utilities",
3636
"material.gtmutils.quantum_coolant": "Quantum Coolant",
@@ -45,7 +45,7 @@
4545
"tooltip.omnibreaker.tool_mode_2": "Screwdriver",
4646
"tooltip.omnibreaker.tool_mode_3": "Wire-cutter",
4747
"tooltip.omnibreaker.tool_mode_4": "Crowbar",
48-
"tooltip.pterb_machine.frequencies": "All PTERBs with the same frequency act like a single Active Transformer.",
48+
"tooltip.pterb_machine.frequencies": "All WATs with the same frequency act like a single Active Transformer.",
4949
"tooltip.pterb_machine.input_coolant_before_use": "Always input coolant before turning it on!",
5050
"tooltip.pterb_machine.purpose": "Power Transfer Einstein-Rosen Bridge (PTERB)",
5151
"tooltip.pterb_machine.uses_coolant": "Drains %s to function!"

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.minecraft.core.BlockPos;
1111
import net.minecraft.nbt.CompoundTag;
1212
import net.minecraft.network.chat.Component;
13+
import net.minecraft.server.level.ServerLevel;
1314
import net.minecraft.world.InteractionHand;
1415
import net.minecraft.world.InteractionResult;
1516
import net.minecraft.world.InteractionResultHolder;
@@ -21,6 +22,8 @@
2122
import net.minecraft.world.level.Level;
2223
import net.minecraft.world.level.block.state.BlockState;
2324

25+
import static net.minecraft.world.level.block.Block.getDrops;
26+
2427
public class PrecisionBreakBehavior implements IInteractionItem {
2528

2629
public int tier;
@@ -107,7 +110,11 @@ public InteractionResult useOn(UseOnContext context) {
107110
}
108111
return toolResult;
109112
} else if (!level.isClientSide()) {
110-
level.destroyBlock(pos, true);
113+
var drops = getDrops(blockState, (ServerLevel) level, pos, level.getBlockEntity(pos));
114+
var player = context.getPlayer();
115+
assert player != null;
116+
drops.forEach(player::addItem);
117+
level.destroyBlock(pos, false);
111118
if (rand <= chance) {
112119
electricItem.discharge(GTValues.V[tier], tier, true, false, false);
113120
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public static class FeatureConfigs {
4545
public long omnibreakerEnergyCapacity = 40_960_000L;
4646

4747
@Configurable
48-
@Configurable.Comment({ "Whether the Power-Transfer Einstein-Rosen Bridge is enabled." })
48+
@Configurable.Comment({ "Whether the Wireless Active Transformer is enabled." })
4949
public boolean pterbEnabled = true;
5050

5151
@Configurable
52-
@Configurable.Comment({ "Base amount of PTERB coolant to drain every second.",
52+
@Configurable.Comment({ "Base amount of WAT coolant to drain every second.",
5353
"(Setting both this amount and the IO multiplier to 0 disables the coolant mechanic.)" })
5454
public int pterbCoolantBaseDrain = 0;
5555

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ public static void init(RegistrateLangProvider provider) {
3333
"Starts as §fEU Converter§7, use Soft Mallet to change");
3434

3535
provider.add("gtmutils.multiblock.pterb_machine.coolant_usage", "§cDrains %sL of %s per second");
36-
provider.add("gtmutils.pterb_machine.invalid_frequency", "PTERBs will not work on frequency 0!");
36+
provider.add("gtmutils.pterb_machine.invalid_frequency", "WATs will not work on frequency 0!");
3737

3838
provider.add("gtmutils.gui.pterb.wireless_configurator.title", "Wireless frequency");
3939

4040
provider.add("tooltip.pterb_machine.purpose", "Power Transfer Einstein-Rosen Bridge (PTERB)");
4141
provider.add("tooltip.pterb_machine.frequencies",
42-
"All PTERBs with the same frequency act like a single Active Transformer.");
42+
"All WATs with the same frequency act like a single Active Transformer.");
4343
provider.add("gtmutils.pterb.current_frequency", "Current frequency: %s");
4444

45-
provider.add("config.jade.plugin_gtmutils.pterb_info", "PTERB Info");
45+
provider.add("config.jade.plugin_gtmutils.pterb_info", "WAT Info");
4646

4747
provider.add("material.gtmutils.quantum_coolant", "Quantum Coolant");
4848

0 commit comments

Comments
 (0)