From f334a9198f6a70a688452f8318a9d8bd9e46203b Mon Sep 17 00:00:00 2001 From: "Apop T. Osis" Date: Sat, 30 May 2026 21:44:52 -0400 Subject: [PATCH 1/5] Added {name tbd}, a multiblock to act as a receiver, PTERB has been relegated to a wireless energy hub, accepting energy inputs --- .../common/machine/UtilMachines.java | 42 ++ .../machine/multiblock/PTERBMachine.java | 42 +- .../common/machine/multiblock/WEBMachine.java | 457 ++++++++++++++++++ .../datagen/lang/UtilLangHandler.java | 8 +- .../gtutilities/saveddata/PTERBSavedData.java | 1 + 5 files changed, 512 insertions(+), 38 deletions(-) create mode 100644 src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java diff --git a/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java b/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java index 9d0a619..8a059db 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java @@ -28,6 +28,7 @@ import net.minecraft.network.chat.Component; import net.neganote.gtutilities.GregTechModernUtilities; import net.neganote.gtutilities.common.machine.multiblock.PTERBMachine; +import net.neganote.gtutilities.common.machine.multiblock.WEBMachine; import net.neganote.gtutilities.common.machine.singleblock.AutoChargerMachine; import net.neganote.gtutilities.common.materials.UtilMaterials; import net.neganote.gtutilities.config.UtilConfig; @@ -159,6 +160,7 @@ public static MachineDefinition[] registerTieredMachines(String name, } public static MultiblockMachineDefinition PTERB_MACHINE = null; + public static MultiblockMachineDefinition WEB_MACHINE = null; static { if (UtilConfig.INSTANCE.features.pterbEnabled || GTCEu.isDataGen()) { @@ -208,8 +210,48 @@ public static MachineDefinition[] registerTieredMachines(String name, .allowExtendedFacing(true) .hasBER(true) .register(); + + WEB_MACHINE = REGISTRATE + .multiblock("web_machine", WEBMachine::new) + .langValue("Wireless Energy Bridge") + .rotationState(RotationState.ALL) + .recipeType(GTRecipeTypes.DUMMY_RECIPES) + .appearanceBlock(HIGH_POWER_CASING) + .tooltips(Component.translatable("tooltip.web_machine.purpose"), + Component.translatable("gtceu.machine.active_transformer.tooltip.1"), + Component.translatable("tooltip.web_machine.frequencies") + .withStyle(ChatFormatting.GRAY)) + .conditionalTooltip( + Component + .translatable("tooltip.pterb_machine.uses_coolant", + UtilMaterials.QuantumCoolant != + null ? UtilMaterials.QuantumCoolant.getLocalizedName() + .withStyle(ChatFormatting.AQUA) : "") + .withStyle(ChatFormatting.DARK_RED), + UtilConfig.coolantEnabled()) + .conditionalTooltip(Component.translatable("tooltip.pterb_machine.input_coolant_before_use") + .withStyle(ChatFormatting.DARK_RED), UtilConfig.coolantEnabled()) + .pattern((multiblockMachineDefinition -> FactoryBlockPattern.start() + .aisle("abbba", "aabaa", "aaaaa", "aaaaa", "aaaaa", "aacaa", "aacaa", "aadaa") + .aisle("bbbbb", "abdba", "aacaa", "aaaaa", "aaaaa", "aacaa", "aaaaa", "aaaaa") + .aisle("bbbbb", "bdddb", "acdca", "aadaa", "aadaa", "ccdcc", "cadac", "daaad") + .aisle("bbbbb", "abdba", "aacaa", "aaaaa", "aaaaa", "aacaa", "aaaaa", "aaaaa") + .aisle("abeba", "aabaa", "aaaaa", "aaaaa", "aaaaa", "aacaa", "aacaa", "aadaa") + .where("e", controller(blocks(multiblockMachineDefinition.getBlock()))) + .where('b', blocks(HIGH_POWER_CASING.get()).setMinGlobalLimited(12).or(WEBMachine.getHatchPredicates())) + .where("d", blocks(SUPERCONDUCTING_COIL.get())) + .where("c", frames(GTMaterials.NaquadahAlloy)) + .where("a", air()) + .build())) + .workableCasingModel(GTCEu.id("block/casings/hpca/high_power_casing"), + GTCEu.id("block/multiblock/data_bank")) + .allowExtendedFacing(true) + .hasBER(true) + .register(); } + } + public static void init() {} } diff --git a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java index f29820f..c2eccdd 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java @@ -42,6 +42,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.dimension.DimensionType; import net.neganote.gtutilities.common.materials.UtilMaterials; import net.neganote.gtutilities.config.UtilConfig; import net.neganote.gtutilities.saveddata.PTERBSavedData; @@ -96,19 +97,13 @@ public void explode() { removeWirelessEnergy(); long inputVoltage = 0; - long outputVoltage = 0; if (!localPowerInput.isEmpty()) { EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); inputVoltage = localInputs.getInputVoltage(); } - if (!localPowerOutput.isEmpty()) { - EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); - outputVoltage = localOutputs.getOutputVoltage(); - } - - long tier = Math.max(GTUtil.getFloorTierByVoltage(inputVoltage), GTUtil.getFloorTierByVoltage(outputVoltage)); + long tier = GTUtil.getFloorTierByVoltage(inputVoltage); doExplosion(15f + tier); } @@ -169,8 +164,6 @@ public void convertEnergyTick() { private int calculateCoolantDrain() { long inputAmperage = 0; long inputVoltage = 0; - long outputAmperage = 0; - long outputVoltage = 0; if (!localPowerInput.isEmpty()) { EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); @@ -178,13 +171,8 @@ private int calculateCoolantDrain() { inputVoltage = localInputs.getInputVoltage(); } - if (!localPowerOutput.isEmpty()) { - EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); - outputAmperage = localOutputs.getOutputAmperage(); - outputVoltage = localOutputs.getOutputVoltage(); - } - long scalingFactor = Math.max(inputAmperage * inputVoltage, outputAmperage * outputVoltage); + long scalingFactor = inputAmperage * inputVoltage; int coolantDrain = UtilConfig.INSTANCE.features.pterbCoolantBaseDrain + (int) (scalingFactor * UtilConfig.INSTANCE.features.pterbCoolantIOMultiplier); @@ -306,7 +294,6 @@ private void removeWirelessEnergy() { if (getLevel() instanceof ServerLevel serverLevel) { PTERBSavedData savedData = PTERBSavedData.getOrCreate(serverLevel.getServer().overworld()); savedData.removeEnergyInputs(frequency, localPowerInput); - savedData.removeEnergyOutputs(frequency, localPowerOutput); savedData.saveDataToCache(); } } @@ -315,18 +302,14 @@ private void addWirelessEnergy() { if (getLevel() instanceof ServerLevel serverLevel) { PTERBSavedData savedData = PTERBSavedData.getOrCreate(serverLevel.getServer().overworld()); savedData.addEnergyInputs(frequency, localPowerInput); - savedData.addEnergyOutputs(frequency, localPowerOutput); savedData.saveDataToCache(); } } public static TraceabilityPredicate getHatchPredicates() { var predicate = abilities(PartAbility.INPUT_ENERGY).setPreviewCount(1) - .or(abilities(PartAbility.OUTPUT_ENERGY).setPreviewCount(2)) .or(abilities(PartAbility.SUBSTATION_INPUT_ENERGY).setPreviewCount(1)) - .or(abilities(PartAbility.SUBSTATION_OUTPUT_ENERGY).setPreviewCount(1)) - .or(abilities(PartAbility.INPUT_LASER).setPreviewCount(1)) - .or(abilities(PartAbility.OUTPUT_LASER).setPreviewCount(1)); + .or(abilities(PartAbility.INPUT_LASER).setPreviewCount(1)); if (UtilConfig.coolantEnabled()) { predicate = predicate.or(abilities(PartAbility.IMPORT_FLUIDS).setExactLimit(1)); } @@ -335,7 +318,7 @@ public static TraceabilityPredicate getHatchPredicates() { @Override public void addDisplayText(@NotNull List textList) { - if (isFormed()) { + if (isFormed() && getLevel() instanceof ServerLevel serverLevel) { if (frequency == 0) { textList.add(Component.translatable("gtmutils.pterb_machine.invalid_frequency") .withStyle(ChatFormatting.RED)); @@ -346,8 +329,6 @@ public void addDisplayText(@NotNull List textList) { } else if (isActive()) { long inputAmperage = 0; long inputVoltage = 0; - long outputAmperage = 0; - long outputVoltage = 0; if (!localPowerInput.isEmpty()) { EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); @@ -355,14 +336,7 @@ public void addDisplayText(@NotNull List textList) { inputVoltage = localInputs.getInputVoltage(); } - if (!localPowerOutput.isEmpty()) { - EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); - outputAmperage = localOutputs.getOutputAmperage(); - outputVoltage = localOutputs.getOutputVoltage(); - } - long inputTotal = inputVoltage * inputAmperage; - long outputTotal = outputVoltage * outputAmperage; textList.add(Component.translatable("gtceu.multiblock.running")); if (inputTotal > 0) { @@ -371,12 +345,6 @@ public void addDisplayText(@NotNull List textList) { FormattingUtil.formatNumbers( Math.abs(inputTotal)))); } - if (outputTotal > 0) { - textList.add(Component - .translatable("gtceu.multiblock.active_transformer.max_output", - FormattingUtil.formatNumbers( - Math.abs(outputTotal)))); - } if (UtilConfig.coolantEnabled()) { textList.add(Component .translatable("gtmutils.multiblock.pterb_machine.coolant_usage", diff --git a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java new file mode 100644 index 0000000..16ebdc4 --- /dev/null +++ b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java @@ -0,0 +1,457 @@ +package net.neganote.gtutilities.common.machine.multiblock; + +import com.gregtechceu.gtceu.api.capability.IControllable; +import com.gregtechceu.gtceu.api.capability.IEnergyContainer; +import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability; +import com.gregtechceu.gtceu.api.capability.recipe.IO; +import com.gregtechceu.gtceu.api.gui.GuiTextures; +import com.gregtechceu.gtceu.api.gui.fancy.ConfiguratorPanel; +import com.gregtechceu.gtceu.api.gui.fancy.FancyMachineUIWidget; +import com.gregtechceu.gtceu.api.gui.fancy.IFancyConfigurator; +import com.gregtechceu.gtceu.api.machine.ConditionalSubscriptionHandler; +import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; +import com.gregtechceu.gtceu.api.machine.MetaMachine; +import com.gregtechceu.gtceu.api.machine.feature.IExplosionMachine; +import com.gregtechceu.gtceu.api.machine.feature.IFancyUIMachine; +import com.gregtechceu.gtceu.api.machine.feature.multiblock.IDisplayUIMachine; +import com.gregtechceu.gtceu.api.machine.feature.multiblock.IMultiPart; +import com.gregtechceu.gtceu.api.machine.multiblock.PartAbility; +import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine; +import com.gregtechceu.gtceu.api.machine.trait.NotifiableFluidTank; +import com.gregtechceu.gtceu.api.machine.trait.RecipeLogic; +import com.gregtechceu.gtceu.api.misc.EnergyContainerList; +import com.gregtechceu.gtceu.api.pattern.TraceabilityPredicate; +import com.gregtechceu.gtceu.api.pattern.error.PatternError; +import com.gregtechceu.gtceu.api.recipe.ingredient.FluidIngredient; +import com.gregtechceu.gtceu.common.data.GTItems; +import com.gregtechceu.gtceu.common.data.GTRecipeCapabilities; +import com.gregtechceu.gtceu.config.ConfigHolder; +import com.gregtechceu.gtceu.utils.FormattingUtil; +import com.gregtechceu.gtceu.utils.GTUtil; +import com.lowdragmc.lowdraglib.gui.modular.ModularUI; +import com.lowdragmc.lowdraglib.gui.texture.IGuiTexture; +import com.lowdragmc.lowdraglib.gui.texture.ItemStackTexture; +import com.lowdragmc.lowdraglib.gui.widget.*; +import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced; +import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; +import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; +import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; +import lombok.Getter; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.block.Block; +import net.neganote.gtutilities.GregTechModernUtilities; +import net.neganote.gtutilities.common.materials.UtilMaterials; +import net.neganote.gtutilities.config.UtilConfig; +import net.neganote.gtutilities.saveddata.PTERBSavedData; +import net.neganote.gtutilities.utils.EnergyUtils; +import org.apache.logging.log4j.Level; +import org.jetbrains.annotations.NotNull; + +import java.util.*; + +import static com.gregtechceu.gtceu.api.pattern.Predicates.abilities; + +// A lot of this is copied from the Active Transformer +public class WEBMachine extends WorkableElectricMultiblockMachine + implements IControllable, IExplosionMachine, IFancyUIMachine, + IDisplayUIMachine { + + protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder( + WEBMachine.class, WorkableElectricMultiblockMachine.MANAGED_FIELD_HOLDER); + + private List localPowerOutput; + + private List localPowerInput; + + protected ConditionalSubscriptionHandler converterSubscription; + + @Getter + private int coolantDrain; + + @Persisted + @DescSynced + @Getter + private int frequency; + + @Persisted + @DescSynced + private int coolantTimer = 0; + + public WEBMachine(IMachineBlockEntity holder) { + super(holder); + this.localPowerOutput = new ArrayList<>(); + this.localPowerInput = new ArrayList<>(); + + this.converterSubscription = new ConditionalSubscriptionHandler(this, this::convertEnergyTick, + this::isSubscriptionActive); + + this.frequency = 0; + } + + public void explode() { + removeWirelessEnergy(); + + long outputVoltage = 0; + + if (!localPowerOutput.isEmpty()) { + EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); + outputVoltage = localOutputs.getOutputVoltage(); + } + + long tier = GTUtil.getFloorTierByVoltage(outputVoltage); + + doExplosion(15f + tier); + } + + public void convertEnergyTick() { + if (frequency == 0) { + getRecipeLogic().setStatus(RecipeLogic.Status.SUSPEND); + return; + } + if (isWorkingEnabled()) { + getRecipeLogic() + .setStatus(isSubscriptionActive() ? RecipeLogic.Status.WORKING : RecipeLogic.Status.SUSPEND); + } + if (isWorkingEnabled() && getRecipeLogic().getStatus() == RecipeLogic.Status.WORKING && + UtilConfig.coolantEnabled() && coolantTimer == 0 && frequency != 0) { + + var coolantTanks = getCapabilitiesFlat(IO.IN, GTRecipeCapabilities.FLUID).stream() + .map(NotifiableFluidTank.class::cast).toList(); + + List left = List + .of(FluidIngredient.of(UtilMaterials.QuantumCoolant.getFluid(), coolantDrain)); + + for (var tank : coolantTanks) { + left = tank.handleRecipe(IO.IN, null, left, false); + if (left == null) { + break; + } + } + + if (left != null && !left.isEmpty()) { + if (!ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) { + explode(); + } else { + coolantTimer = 0; + getRecipeLogic().setStatus(RecipeLogic.Status.SUSPEND); + converterSubscription.updateSubscription(); + return; + } + } + } + if (isWorkingEnabled() && getRecipeLogic().getStatus() == RecipeLogic.Status.WORKING) { + coolantTimer = (coolantTimer + 1) % 20; + } + if (isWorkingEnabled() && frequency != 0) { + if (getLevel() instanceof ServerLevel serverLevel) { + PTERBSavedData savedData = PTERBSavedData.getOrCreate(serverLevel); + EnergyContainerList powerInput = savedData.getWirelessEnergyInputs(frequency); + EnergyContainerList powerOutput = savedData.getWirelessEnergyOutputs(frequency); + long canDrain = powerInput.getEnergyStored(); + long totalDrained = powerOutput.changeEnergy(canDrain); + powerInput.removeEnergy(totalDrained); + } + } + + converterSubscription.updateSubscription(); + } + + private int calculateCoolantDrain() { + long inputAmperage = 0; + long inputVoltage = 0; + long outputAmperage = 0; + long outputVoltage = 0; + + if (!localPowerInput.isEmpty()) { + EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); + inputAmperage = localInputs.getInputAmperage(); + inputVoltage = localInputs.getInputVoltage(); + } + + if (!localPowerOutput.isEmpty()) { + EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); + outputAmperage = localOutputs.getOutputAmperage(); + outputVoltage = localOutputs.getOutputVoltage(); + } + + long scalingFactor = Math.max(inputAmperage * inputVoltage, outputAmperage * outputVoltage); + + int coolantDrain = UtilConfig.INSTANCE.features.pterbCoolantBaseDrain + + (int) (scalingFactor * UtilConfig.INSTANCE.features.pterbCoolantIOMultiplier); + if (coolantDrain <= 0) { + coolantDrain = 1; + } + return coolantDrain / 4; + } + + @SuppressWarnings("RedundantIfStatement") // It is cleaner to have the final return true separate. + protected boolean isSubscriptionActive() { + if (!isFormed()) return false; + + if (localPowerInput == null) return false; + if (localPowerOutput == null) return false; + + return true; + } + + @Override + public boolean onWorking() { + return super.onWorking(); + } + + @Override + public void onStructureFormed() { + super.onStructureFormed(); + + if (frequency == 0) { + setWorkingEnabled(false); + } + + // capture all energy containers + List localPowerInput = new ArrayList<>(); + List localPowerOutput = new ArrayList<>(); + Map ioMap = getMultiblockState().getMatchContext().getOrCreate("ioMap", Long2ObjectMaps::emptyMap); + + for (IMultiPart part : getPrioritySortedParts()) { + IO io = ioMap.getOrDefault(part.self().getPos().asLong(), IO.BOTH); + if (io == IO.NONE) continue; + for (var handlerList : part.getRecipeHandlers()) { + var handlerIO = handlerList.getHandlerIO(); + // If IO not compatible + if (io != IO.BOTH && handlerIO != IO.BOTH && io != handlerIO) continue; + var energyContainers = handlerList.getCapability(EURecipeCapability.CAP).stream() + .filter(IEnergyContainer.class::isInstance) + .map(IEnergyContainer.class::cast) + .toList(); + if (!energyContainers.isEmpty()) { + if (handlerIO == IO.IN) { + localPowerInput.add(part); + } else if (handlerIO == IO.OUT) { + localPowerOutput.add(part); + } + } + } + } + + // Invalidate the structure if there is not at least one output or one input + if (localPowerInput.isEmpty() && localPowerOutput.isEmpty()) { + this.onStructureInvalid(); + getMultiblockState().setError(new PatternError()); + return; + } + + this.localPowerInput = localPowerInput; + this.localPowerOutput = localPowerOutput; + + this.coolantDrain = calculateCoolantDrain(); + + if (frequency != 0 && isActive()) { + addWirelessEnergy(); + } + + converterSubscription.updateSubscription(); + } + + @NotNull + private List getPrioritySortedParts() { + return getParts().stream().sorted(Comparator.comparing(part -> { + if (part instanceof MetaMachine partMachine) { + Block partBlock = partMachine.getBlockState().getBlock(); + + if (PartAbility.OUTPUT_ENERGY.isApplicable(partBlock)) + return 1; + + if (PartAbility.SUBSTATION_OUTPUT_ENERGY.isApplicable(partBlock)) + return 2; + + if (PartAbility.OUTPUT_LASER.isApplicable(partBlock)) + return 3; + } + + return 4; + })).toList(); + } + + @Override + public @NotNull ManagedFieldHolder getFieldHolder() { + return MANAGED_FIELD_HOLDER; + } + + @Override + public void onStructureInvalid() { + coolantTimer = 0; + removeWirelessEnergy(); + if ((isWorkingEnabled() && recipeLogic.getStatus() == RecipeLogic.Status.WORKING) && + !ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) { + explode(); + } + super.onStructureInvalid(); + this.localPowerOutput = new ArrayList<>(); + this.localPowerInput = new ArrayList<>(); + setWorkingEnabled(false); + converterSubscription.unsubscribe(); + } + + private void removeWirelessEnergy() { + if (getLevel() instanceof ServerLevel serverLevel) { + PTERBSavedData savedData = PTERBSavedData.getOrCreate(serverLevel.getServer().overworld()); + savedData.removeEnergyOutputs(frequency, localPowerOutput); + savedData.saveDataToCache(); + } + } + + private void addWirelessEnergy() { + if (getLevel() instanceof ServerLevel serverLevel) { + PTERBSavedData savedData = PTERBSavedData.getOrCreate(serverLevel.getServer().overworld()); + savedData.addEnergyOutputs(frequency, localPowerOutput); + savedData.saveDataToCache(); + } + } + + public static TraceabilityPredicate getHatchPredicates() { + var predicate = abilities(PartAbility.OUTPUT_ENERGY).setPreviewCount(2) + .or(abilities(PartAbility.SUBSTATION_OUTPUT_ENERGY).setPreviewCount(1)) + .or(abilities(PartAbility.OUTPUT_LASER).setPreviewCount(1)); + if (UtilConfig.coolantEnabled()) { + predicate = predicate.or(abilities(PartAbility.IMPORT_FLUIDS).setExactLimit(1)); + } + return predicate; + } + + @Override + public void addDisplayText(@NotNull List textList) { + if (frequency == 0) { + textList.add(Component.translatable("gtmutils.pterb_machine.invalid_frequency") + .withStyle(ChatFormatting.RED)); + return; + } + if (!isWorkingEnabled()) { + textList.add(Component.translatable("gtceu.multiblock.work_paused")); + } else if (isActive()) { + long inputAmperage = 0; + long inputVoltage = 0; + long outputAmperage = 0; + long outputVoltage = 0; + + if (!localPowerInput.isEmpty()) { + EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); + inputAmperage = localInputs.getInputAmperage(); + inputVoltage = localInputs.getInputVoltage(); + } + + if (!localPowerOutput.isEmpty()) { + EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); + outputAmperage = localOutputs.getOutputAmperage(); + outputVoltage = localOutputs.getOutputVoltage(); + } + + long inputTotal = inputVoltage * inputAmperage; + long outputTotal = outputVoltage * outputAmperage; + + textList.add(Component.translatable("gtceu.multiblock.running")); + if (inputTotal > 0) { + textList.add(Component + .translatable("gtceu.multiblock.active_transformer.max_input", + FormattingUtil.formatNumbers( + Math.abs(inputTotal)))); + } + if (outputTotal > 0) { + textList.add(Component + .translatable("gtceu.multiblock.active_transformer.max_output", + FormattingUtil.formatNumbers( + Math.abs(outputTotal)))); + } + if (UtilConfig.coolantEnabled()) { + textList.add(Component + .translatable("gtmutils.multiblock.pterb_machine.coolant_usage", + FormattingUtil.formatNumbers(coolantDrain), + UtilMaterials.QuantumCoolant.getLocalizedName())); + } + if (!ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) { + textList.add(Component + .translatable("gtceu.multiblock.active_transformer.danger_enabled")); + } + } else { + textList.add(Component.translatable("gtceu.multiblock.idling")); + } + } + + public void setFrequencyFromString(String str) { + removeWirelessEnergy(); + frequency = Integer.parseInt(str); + if (frequency == 0) { + setWorkingEnabled(false); + } + if (frequency != 0) { + addWirelessEnergy(); + } + } + + public String getFrequencyString() { + return Integer.valueOf(frequency).toString(); + } + + @Override + public void setWorkingEnabled(boolean isWorkingAllowed) { + if (frequency == 0) { + super.setWorkingEnabled(false); + return; + } + super.setWorkingEnabled(isWorkingAllowed); + if (frequency != 0) { + if (isWorkingAllowed) { + addWirelessEnergy(); + } else { + removeWirelessEnergy(); + } + } + if (!isWorkingAllowed) { + coolantTimer = 0; + } + } + + @Override + public void attachConfigurators(@NotNull ConfiguratorPanel configuratorPanel) { + super.attachConfigurators(configuratorPanel); + configuratorPanel.attachConfigurators(new IFancyConfigurator() { + + @Override + public Component getTitle() { + return Component.translatable("gtmutils.gui.pterb.wireless_configurator.title"); + } + + @Override + public IGuiTexture getIcon() { + return new ItemStackTexture(GTItems.SENSOR_UV.asItem()); + } + + @Override + public Widget createConfigurator() { + return new WidgetGroup(0, 0, 130, 25) + .addWidget(new TextFieldWidget().setNumbersOnly(0, Integer.MAX_VALUE) + .setTextResponder(WEBMachine.this::setFrequencyFromString) + .setTextSupplier(WEBMachine.this::getFrequencyString)); + } + }); + } + + @Override + public @NotNull Widget createUIWidget() { + var group = new WidgetGroup(0, 0, 182 + 8, 117 + 8); + group.addWidget(new DraggableScrollableWidgetGroup(4, 4, 182, 117).setBackground(getScreenTexture()) + .addWidget(new LabelWidget(4, 5, self().getBlockState().getBlock().getDescriptionId())) + .addWidget(new ComponentPanelWidget(4, 17, this::addDisplayText) + .setMaxWidthLimit(150) + .clickHandler(this::handleDisplayClick))); + group.setBackground(GuiTextures.BACKGROUND_INVERSE); + return group; + } + + @Override + public @NotNull ModularUI createUI(@NotNull Player entityPlayer) { + return new ModularUI(198, 208, this, entityPlayer).widget(new FancyMachineUIWidget(this, 198, 208)); + } +} diff --git a/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java b/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java index 3396ad6..18cb298 100644 --- a/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java +++ b/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java @@ -69,9 +69,15 @@ public static void init(RegistrateLangProvider provider) { provider.add("tooltip.pterb_machine.purpose", "Power Transfer Einstein-Rosen Bridge (PTERB)"); provider.add("tooltip.pterb_machine.frequencies", - "All WATs with the same frequency will wirelessly transfer energy between each other like a single Active Transformer."); + "The {name tbd} is the energy input of a wireless energy network, it shares a frequency with a {name tbd} and inputs energy into it"); provider.add("gtmutils.pterb.current_frequency", "Current frequency: %s"); + provider.add("tooltip.web_machine.purpose", "{name tbd}"); + provider.add("tooltip.web_machine.frequencies", + "The {name tbd} is the energy output of a wireless energy network, it shares a frequency with a {name tbd} and outputs energy from it"); + provider.add("tooltip.web_machine.only_output", "Receives energy from a {name tbd}"); + + provider.add("config.jade.plugin_gtmutils.pterb_info", "WAT Info"); multiLang(provider, "gtceu.placeholder_info.watfrequency", diff --git a/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java b/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java index a11415e..86ed87b 100644 --- a/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java +++ b/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java @@ -37,6 +37,7 @@ public class PTERBSavedData extends SavedData { private final ServerLevel serverLevel; + private PTERBSavedData(ServerLevel serverLevel) { energyInputs = new HashMap<>(); energyOutputs = new HashMap<>(); From 8d43695662f1bcd1c9443524b423286c751a8aeb Mon Sep 17 00:00:00 2001 From: "Apop T. Osis" Date: Sat, 30 May 2026 21:46:16 -0400 Subject: [PATCH 2/5] Gave {name tbd} a recipe, cheaper than old PTERB, PTERB recipe has been nerfed and made more expensive, requiring a {name tbd} controller plus more emitters and circuits and other components --- .../gtutilities/recipe/UtilRecipes.java | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java b/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java index 63a3e8e..6a88744 100644 --- a/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java +++ b/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java @@ -53,23 +53,42 @@ public static void init(Consumer provider) { if (UtilConfig.INSTANCE.features.pterbEnabled) { ASSEMBLY_LINE_RECIPES.recipeBuilder("pterb") - .inputItems(GTMultiMachines.ACTIVE_TRANSFORMER) + .inputItems(UtilMachines.WEB_MACHINE) .inputItems(TagPrefix.plate, GTMaterials.Neutronium, 32) - .inputItems(SENSOR.get(GTValues.UV), 8) - .inputItems(EMITTER.get(GTValues.UV), 8) - .inputItems(FIELD_GENERATOR.get(GTValues.UV), 4) - .inputItems(CustomTags.UHV_CIRCUITS, 2) + .inputItems(SENSOR.get(GTValues.UV), 2) + .inputItems(EMITTER.get(GTValues.UV), 16) + .inputItems(FIELD_GENERATOR.get(GTValues.UV), 8) + .inputItems(CustomTags.UHV_CIRCUITS, 4) .inputItems(TagPrefix.pipeLargeFluid, GTMaterials.Neutronium, 4) - .inputItems(CABLE_QUAD.get(GTValues.UV), 8) + .inputItems(CABLE_QUAD.get(GTValues.UV), 16) .inputItems(LASER_PIPES[0], 8) .inputFluids(GTMaterials.SolderingAlloy.getFluid(GTValues.L * 32)) .EUt(1_600_000L) .duration(1200) .outputItems(UtilMachines.PTERB_MACHINE) .addMaterialInfo(true) + .stationResearch(b -> b + .researchStack(UtilMachines.WEB_MACHINE.asStack()).CWUt(16)) + .save(provider); + + ASSEMBLY_LINE_RECIPES.recipeBuilder("web") + .inputItems(GTMultiMachines.ACTIVE_TRANSFORMER) + .inputItems(TagPrefix.plate, NaquadahAlloy, 8) + .inputItems(SENSOR.get(UV), 8) + .inputItems(EMITTER.get(UV), 1) + .inputItems(CustomTags.UV_CIRCUITS, 1) + .inputItems(TagPrefix.pipeLargeFluid, Naquadah, 1) + .inputItems(CABLE_QUAD.get(GTValues.UV), 4) + .inputItems(LASER_PIPES[0], 8) + .inputFluids(GTMaterials.SolderingAlloy.getFluid(GTValues.L * 8)) + .EUt(1_600_000L) + .duration(250) + .outputItems(UtilMachines.WEB_MACHINE) + .addMaterialInfo(true) .stationResearch(b -> b .researchStack(GTMultiMachines.ACTIVE_TRANSFORMER.asStack()).CWUt(16)) .save(provider); + } if (UtilConfig.INSTANCE.features.expandedBuffersEnabled && GTCEu.Mods.isAE2Loaded()) { From 955463881066e2a751662af5678c141dce5ed5f0 Mon Sep 17 00:00:00 2001 From: "Apop T. Osis" Date: Sat, 30 May 2026 23:35:43 -0400 Subject: [PATCH 3/5] Removed redundant coolant calculations since the unnamed receiver won't use coolant. --- .../common/machine/UtilMachines.java | 7 +- .../machine/multiblock/PTERBMachine.java | 2 - .../common/machine/multiblock/WEBMachine.java | 105 ++---------------- .../datagen/lang/UtilLangHandler.java | 1 - .../gtutilities/saveddata/PTERBSavedData.java | 1 - 5 files changed, 12 insertions(+), 104 deletions(-) diff --git a/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java b/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java index 8a059db..f020562 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java @@ -226,7 +226,7 @@ public static MachineDefinition[] registerTieredMachines(String name, .translatable("tooltip.pterb_machine.uses_coolant", UtilMaterials.QuantumCoolant != null ? UtilMaterials.QuantumCoolant.getLocalizedName() - .withStyle(ChatFormatting.AQUA) : "") + .withStyle(ChatFormatting.AQUA) : "") .withStyle(ChatFormatting.DARK_RED), UtilConfig.coolantEnabled()) .conditionalTooltip(Component.translatable("tooltip.pterb_machine.input_coolant_before_use") @@ -238,7 +238,9 @@ public static MachineDefinition[] registerTieredMachines(String name, .aisle("bbbbb", "abdba", "aacaa", "aaaaa", "aaaaa", "aacaa", "aaaaa", "aaaaa") .aisle("abeba", "aabaa", "aaaaa", "aaaaa", "aaaaa", "aacaa", "aacaa", "aadaa") .where("e", controller(blocks(multiblockMachineDefinition.getBlock()))) - .where('b', blocks(HIGH_POWER_CASING.get()).setMinGlobalLimited(12).or(WEBMachine.getHatchPredicates())) + .where('b', + blocks(HIGH_POWER_CASING.get()).setMinGlobalLimited(12) + .or(WEBMachine.getHatchPredicates())) .where("d", blocks(SUPERCONDUCTING_COIL.get())) .where("c", frames(GTMaterials.NaquadahAlloy)) .where("a", air()) @@ -252,6 +254,5 @@ public static MachineDefinition[] registerTieredMachines(String name, } - public static void init() {} } diff --git a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java index c2eccdd..425b3a7 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java @@ -42,7 +42,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.dimension.DimensionType; import net.neganote.gtutilities.common.materials.UtilMaterials; import net.neganote.gtutilities.config.UtilConfig; import net.neganote.gtutilities.saveddata.PTERBSavedData; @@ -171,7 +170,6 @@ private int calculateCoolantDrain() { inputVoltage = localInputs.getInputVoltage(); } - long scalingFactor = inputAmperage * inputVoltage; int coolantDrain = UtilConfig.INSTANCE.features.pterbCoolantBaseDrain + diff --git a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java index 16ebdc4..39ad0f7 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/WEBMachine.java @@ -17,17 +17,15 @@ import com.gregtechceu.gtceu.api.machine.feature.multiblock.IMultiPart; import com.gregtechceu.gtceu.api.machine.multiblock.PartAbility; import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine; -import com.gregtechceu.gtceu.api.machine.trait.NotifiableFluidTank; import com.gregtechceu.gtceu.api.machine.trait.RecipeLogic; import com.gregtechceu.gtceu.api.misc.EnergyContainerList; import com.gregtechceu.gtceu.api.pattern.TraceabilityPredicate; import com.gregtechceu.gtceu.api.pattern.error.PatternError; -import com.gregtechceu.gtceu.api.recipe.ingredient.FluidIngredient; import com.gregtechceu.gtceu.common.data.GTItems; -import com.gregtechceu.gtceu.common.data.GTRecipeCapabilities; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.utils.FormattingUtil; import com.gregtechceu.gtceu.utils.GTUtil; + import com.lowdragmc.lowdraglib.gui.modular.ModularUI; import com.lowdragmc.lowdraglib.gui.texture.IGuiTexture; import com.lowdragmc.lowdraglib.gui.texture.ItemStackTexture; @@ -35,19 +33,17 @@ import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced; import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; -import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; -import lombok.Getter; + import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.block.Block; -import net.neganote.gtutilities.GregTechModernUtilities; -import net.neganote.gtutilities.common.materials.UtilMaterials; -import net.neganote.gtutilities.config.UtilConfig; import net.neganote.gtutilities.saveddata.PTERBSavedData; import net.neganote.gtutilities.utils.EnergyUtils; -import org.apache.logging.log4j.Level; + +import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; +import lombok.Getter; import org.jetbrains.annotations.NotNull; import java.util.*; @@ -56,8 +52,8 @@ // A lot of this is copied from the Active Transformer public class WEBMachine extends WorkableElectricMultiblockMachine - implements IControllable, IExplosionMachine, IFancyUIMachine, - IDisplayUIMachine { + implements IControllable, IExplosionMachine, IFancyUIMachine, + IDisplayUIMachine { protected static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder( WEBMachine.class, WorkableElectricMultiblockMachine.MANAGED_FIELD_HOLDER); @@ -68,9 +64,6 @@ public class WEBMachine extends WorkableElectricMultiblockMachine protected ConditionalSubscriptionHandler converterSubscription; - @Getter - private int coolantDrain; - @Persisted @DescSynced @Getter @@ -115,33 +108,7 @@ public void convertEnergyTick() { getRecipeLogic() .setStatus(isSubscriptionActive() ? RecipeLogic.Status.WORKING : RecipeLogic.Status.SUSPEND); } - if (isWorkingEnabled() && getRecipeLogic().getStatus() == RecipeLogic.Status.WORKING && - UtilConfig.coolantEnabled() && coolantTimer == 0 && frequency != 0) { - - var coolantTanks = getCapabilitiesFlat(IO.IN, GTRecipeCapabilities.FLUID).stream() - .map(NotifiableFluidTank.class::cast).toList(); - List left = List - .of(FluidIngredient.of(UtilMaterials.QuantumCoolant.getFluid(), coolantDrain)); - - for (var tank : coolantTanks) { - left = tank.handleRecipe(IO.IN, null, left, false); - if (left == null) { - break; - } - } - - if (left != null && !left.isEmpty()) { - if (!ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) { - explode(); - } else { - coolantTimer = 0; - getRecipeLogic().setStatus(RecipeLogic.Status.SUSPEND); - converterSubscription.updateSubscription(); - return; - } - } - } if (isWorkingEnabled() && getRecipeLogic().getStatus() == RecipeLogic.Status.WORKING) { coolantTimer = (coolantTimer + 1) % 20; } @@ -159,34 +126,6 @@ public void convertEnergyTick() { converterSubscription.updateSubscription(); } - private int calculateCoolantDrain() { - long inputAmperage = 0; - long inputVoltage = 0; - long outputAmperage = 0; - long outputVoltage = 0; - - if (!localPowerInput.isEmpty()) { - EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); - inputAmperage = localInputs.getInputAmperage(); - inputVoltage = localInputs.getInputVoltage(); - } - - if (!localPowerOutput.isEmpty()) { - EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); - outputAmperage = localOutputs.getOutputAmperage(); - outputVoltage = localOutputs.getOutputVoltage(); - } - - long scalingFactor = Math.max(inputAmperage * inputVoltage, outputAmperage * outputVoltage); - - int coolantDrain = UtilConfig.INSTANCE.features.pterbCoolantBaseDrain + - (int) (scalingFactor * UtilConfig.INSTANCE.features.pterbCoolantIOMultiplier); - if (coolantDrain <= 0) { - coolantDrain = 1; - } - return coolantDrain / 4; - } - @SuppressWarnings("RedundantIfStatement") // It is cleaner to have the final return true separate. protected boolean isSubscriptionActive() { if (!isFormed()) return false; @@ -243,11 +182,8 @@ public void onStructureFormed() { return; } - this.localPowerInput = localPowerInput; this.localPowerOutput = localPowerOutput; - this.coolantDrain = calculateCoolantDrain(); - if (frequency != 0 && isActive()) { addWirelessEnergy(); } @@ -312,13 +248,9 @@ private void addWirelessEnergy() { } public static TraceabilityPredicate getHatchPredicates() { - var predicate = abilities(PartAbility.OUTPUT_ENERGY).setPreviewCount(2) + return abilities(PartAbility.OUTPUT_ENERGY).setPreviewCount(2) .or(abilities(PartAbility.SUBSTATION_OUTPUT_ENERGY).setPreviewCount(1)) .or(abilities(PartAbility.OUTPUT_LASER).setPreviewCount(1)); - if (UtilConfig.coolantEnabled()) { - predicate = predicate.or(abilities(PartAbility.IMPORT_FLUIDS).setExactLimit(1)); - } - return predicate; } @Override @@ -331,45 +263,24 @@ public void addDisplayText(@NotNull List textList) { if (!isWorkingEnabled()) { textList.add(Component.translatable("gtceu.multiblock.work_paused")); } else if (isActive()) { - long inputAmperage = 0; - long inputVoltage = 0; long outputAmperage = 0; long outputVoltage = 0; - if (!localPowerInput.isEmpty()) { - EnergyContainerList localInputs = EnergyUtils.getEnergyListFromMultiParts(localPowerInput); - inputAmperage = localInputs.getInputAmperage(); - inputVoltage = localInputs.getInputVoltage(); - } - if (!localPowerOutput.isEmpty()) { EnergyContainerList localOutputs = EnergyUtils.getEnergyListFromMultiParts(localPowerOutput); outputAmperage = localOutputs.getOutputAmperage(); outputVoltage = localOutputs.getOutputVoltage(); } - long inputTotal = inputVoltage * inputAmperage; long outputTotal = outputVoltage * outputAmperage; textList.add(Component.translatable("gtceu.multiblock.running")); - if (inputTotal > 0) { - textList.add(Component - .translatable("gtceu.multiblock.active_transformer.max_input", - FormattingUtil.formatNumbers( - Math.abs(inputTotal)))); - } if (outputTotal > 0) { textList.add(Component .translatable("gtceu.multiblock.active_transformer.max_output", FormattingUtil.formatNumbers( Math.abs(outputTotal)))); } - if (UtilConfig.coolantEnabled()) { - textList.add(Component - .translatable("gtmutils.multiblock.pterb_machine.coolant_usage", - FormattingUtil.formatNumbers(coolantDrain), - UtilMaterials.QuantumCoolant.getLocalizedName())); - } if (!ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) { textList.add(Component .translatable("gtceu.multiblock.active_transformer.danger_enabled")); diff --git a/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java b/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java index 18cb298..d9046ee 100644 --- a/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java +++ b/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java @@ -77,7 +77,6 @@ public static void init(RegistrateLangProvider provider) { "The {name tbd} is the energy output of a wireless energy network, it shares a frequency with a {name tbd} and outputs energy from it"); provider.add("tooltip.web_machine.only_output", "Receives energy from a {name tbd}"); - provider.add("config.jade.plugin_gtmutils.pterb_info", "WAT Info"); multiLang(provider, "gtceu.placeholder_info.watfrequency", diff --git a/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java b/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java index 86ed87b..a11415e 100644 --- a/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java +++ b/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java @@ -37,7 +37,6 @@ public class PTERBSavedData extends SavedData { private final ServerLevel serverLevel; - private PTERBSavedData(ServerLevel serverLevel) { energyInputs = new HashMap<>(); energyOutputs = new HashMap<>(); From 5a6c803f0f4df8418069f447637c9e0cafd87289 Mon Sep 17 00:00:00 2001 From: "Apop T. Osis" Date: Sun, 31 May 2026 20:08:27 -0400 Subject: [PATCH 4/5] Implemented new names, WEB Hub and WEB Reciever --- .../neganote/gtutilities/common/machine/UtilMachines.java | 4 ++-- .../gtutilities/datagen/lang/UtilLangHandler.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java b/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java index f020562..23c3a9c 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/UtilMachines.java @@ -166,7 +166,7 @@ public static MachineDefinition[] registerTieredMachines(String name, if (UtilConfig.INSTANCE.features.pterbEnabled || GTCEu.isDataGen()) { PTERB_MACHINE = REGISTRATE .multiblock("pterb_machine", PTERBMachine::new) - .langValue("Wireless Active Transformer") + .langValue("Wireless Energy Bridge Hub") .rotationState(RotationState.ALL) .recipeType(GTRecipeTypes.DUMMY_RECIPES) .appearanceBlock(CASING_PALLADIUM_SUBSTATION) @@ -213,7 +213,7 @@ public static MachineDefinition[] registerTieredMachines(String name, WEB_MACHINE = REGISTRATE .multiblock("web_machine", WEBMachine::new) - .langValue("Wireless Energy Bridge") + .langValue("Wireless Energy Bridge Reciever") .rotationState(RotationState.ALL) .recipeType(GTRecipeTypes.DUMMY_RECIPES) .appearanceBlock(HIGH_POWER_CASING) diff --git a/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java b/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java index d9046ee..a5f9698 100644 --- a/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java +++ b/src/main/java/net/neganote/gtutilities/datagen/lang/UtilLangHandler.java @@ -69,13 +69,13 @@ public static void init(RegistrateLangProvider provider) { provider.add("tooltip.pterb_machine.purpose", "Power Transfer Einstein-Rosen Bridge (PTERB)"); provider.add("tooltip.pterb_machine.frequencies", - "The {name tbd} is the energy input of a wireless energy network, it shares a frequency with a {name tbd} and inputs energy into it"); + "The PTERB is the energy input of a wireless energy network, it shares a frequency with a ERAP and inputs energy into the wireless network"); provider.add("gtmutils.pterb.current_frequency", "Current frequency: %s"); - provider.add("tooltip.web_machine.purpose", "{name tbd}"); + provider.add("tooltip.web_machine.purpose", "Einstein-Rosen Anchor Point (ERAP)"); provider.add("tooltip.web_machine.frequencies", - "The {name tbd} is the energy output of a wireless energy network, it shares a frequency with a {name tbd} and outputs energy from it"); - provider.add("tooltip.web_machine.only_output", "Receives energy from a {name tbd}"); + "The ERAP is the energy output of a wireless energy network, it shares a frequency with a PTERB, it takes and outputs energy from the wireless network"); + provider.add("tooltip.web_machine.only_output", "Receives energy from a PTERB"); provider.add("config.jade.plugin_gtmutils.pterb_info", "WAT Info"); From b180f86b337e42c571f30183a9eb4667c0f22536 Mon Sep 17 00:00:00 2001 From: "Apop T. Osis" Date: Sun, 31 May 2026 20:08:44 -0400 Subject: [PATCH 5/5] Made Hub and Reciever controllers cheaper --- .../java/net/neganote/gtutilities/recipe/UtilRecipes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java b/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java index 6a88744..3bccab7 100644 --- a/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java +++ b/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java @@ -56,8 +56,8 @@ public static void init(Consumer provider) { .inputItems(UtilMachines.WEB_MACHINE) .inputItems(TagPrefix.plate, GTMaterials.Neutronium, 32) .inputItems(SENSOR.get(GTValues.UV), 2) - .inputItems(EMITTER.get(GTValues.UV), 16) - .inputItems(FIELD_GENERATOR.get(GTValues.UV), 8) + .inputItems(EMITTER.get(GTValues.UV), 8) + .inputItems(FIELD_GENERATOR.get(GTValues.UV), 4) .inputItems(CustomTags.UHV_CIRCUITS, 4) .inputItems(TagPrefix.pipeLargeFluid, GTMaterials.Neutronium, 4) .inputItems(CABLE_QUAD.get(GTValues.UV), 16) @@ -74,7 +74,7 @@ public static void init(Consumer provider) { ASSEMBLY_LINE_RECIPES.recipeBuilder("web") .inputItems(GTMultiMachines.ACTIVE_TRANSFORMER) .inputItems(TagPrefix.plate, NaquadahAlloy, 8) - .inputItems(SENSOR.get(UV), 8) + .inputItems(SENSOR.get(UV), 4) .inputItems(EMITTER.get(UV), 1) .inputItems(CustomTags.UV_CIRCUITS, 1) .inputItems(TagPrefix.pipeLargeFluid, Naquadah, 1)