From a359b964567e4de2b73d629817fbbd1401fdaf0b Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 7 Apr 2024 22:51:17 +0300 Subject: [PATCH 1/7] fix data bank pattern errors, network switch not transmitting data (#1073) --- .../WorkableElectricMultiblockMachine.java | 3 +- .../data/machines/GTResearchMachines.java | 20 ++---- .../electric/research/DataBankMachine.java | 70 +++++-------------- .../research/NetworkSwitchMachine.java | 14 +++- 4 files changed, 35 insertions(+), 72 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/api/machine/multiblock/WorkableElectricMultiblockMachine.java b/src/main/java/com/gregtechceu/gtceu/api/machine/multiblock/WorkableElectricMultiblockMachine.java index 31047b97b4..8d26455f3e 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/machine/multiblock/WorkableElectricMultiblockMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/api/machine/multiblock/WorkableElectricMultiblockMachine.java @@ -27,6 +27,7 @@ import javax.annotation.ParametersAreNonnullByDefault; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Optional; /** @@ -109,7 +110,7 @@ public ModularUI createUI(Player entityPlayer) { @Override public List getSubTabs() { - return getParts().stream().filter(IFancyUIProvider.class::isInstance).map(IFancyUIProvider.class::cast).toList(); + return getParts().stream().filter(Objects::nonNull).map(IFancyUIProvider.class::cast).toList(); } @Override diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/machines/GTResearchMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/machines/GTResearchMachines.java index 1dda15ed18..d398fc944d 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/machines/GTResearchMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/machines/GTResearchMachines.java @@ -25,6 +25,7 @@ import com.gregtechceu.gtceu.common.machine.multiblock.part.ObjectHolderMachine; import com.gregtechceu.gtceu.common.machine.multiblock.part.OpticalComputationHatchMachine; import com.gregtechceu.gtceu.common.machine.multiblock.part.OpticalDataHatchMachine; +import com.gregtechceu.gtceu.common.machine.multiblock.part.hpca.HPCABridgePartMachine; import com.gregtechceu.gtceu.common.machine.multiblock.part.hpca.HPCAComputationPartMachine; import com.gregtechceu.gtceu.common.machine.multiblock.part.hpca.HPCACoolerPartMachine; import com.gregtechceu.gtceu.common.machine.multiblock.part.hpca.HPCAEmptyPartMachine; @@ -132,20 +133,9 @@ public class GTResearchMachines { .where('A', blocks(COMPUTER_CASING.get())) .where('C', blocks(HIGH_POWER_CASING.get()) .setMinGlobalLimited(4) - .or(autoAbilities())) - .build()) - .shapeInfo(definition -> MultiblockShapeInfo.builder() - .aisle("XDDDX", "XDHDX", "XTTTX") - .aisle("XDDDX", "XAAAX", "XRRRX") - .aisle("XCCCX", "XCSCX", "XCCCX") - .where('S', GTResearchMachines.DATA_BANK, Direction.SOUTH) - .where('X', COMPUTER_HEAT_VENT) - .where('D', COMPUTER_CASING) - .where('A', COMPUTER_CASING) - .where('C', HIGH_POWER_CASING) - .where('R', GTResearchMachines.DATA_HATCH_RECEIVER, Direction.UP) - .where('T', GTResearchMachines.DATA_HATCH_TRANSMITTER, Direction.NORTH) - .where('H', GTResearchMachines.ADVANCED_DATA_ACCESS_HATCH, Direction.NORTH) + .or(autoAbilities()) + .or(autoAbilities(true, false, false)) + .or(abilities(PartAbility.INPUT_ENERGY).setMinGlobalLimited(1).setMaxGlobalLimited(2).setPreviewCount(1))) .build()) .workableCasingRenderer(GTCEu.id("block/casings/hpca/high_power_casing"), GTCEu.id("block/multiblock/data_bank"), false) @@ -397,7 +387,7 @@ public class GTResearchMachines { .register(); public static final MachineDefinition HPCA_BRIDGE_COMPONENT = registerHPCAPart( "hpca_bridge_component", "HPCA Bridge Component", - HPCAEmptyPartMachine::new, "bridge", false + HPCABridgePartMachine::new, "bridge", false ).tooltips(Component.translatable("gtceu.machine.hpca.component_type.bridge"), Component.translatable("gtceu.machine.hpca.component_general.max_eut", GTValues.VA[GTValues.IV])) .register(); diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/DataBankMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/DataBankMachine.java index f10d001bd8..9e4ac4460e 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/DataBankMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/DataBankMachine.java @@ -3,7 +3,6 @@ import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.IControllable; import com.gregtechceu.gtceu.api.capability.IEnergyContainer; -import com.gregtechceu.gtceu.api.capability.IWorkable; import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability; import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.gui.GuiTextures; @@ -16,19 +15,16 @@ import com.gregtechceu.gtceu.api.machine.feature.multiblock.IDisplayUIMachine; import com.gregtechceu.gtceu.api.machine.feature.multiblock.IMaintenanceMachine; import com.gregtechceu.gtceu.api.machine.feature.multiblock.IMultiPart; -import com.gregtechceu.gtceu.api.machine.multiblock.MultiblockControllerMachine; import com.gregtechceu.gtceu.api.machine.multiblock.MultiblockDisplayText; import com.gregtechceu.gtceu.api.machine.multiblock.PartAbility; +import com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine; +import com.gregtechceu.gtceu.api.machine.trait.RecipeLogic; import com.gregtechceu.gtceu.api.misc.EnergyContainerList; import com.gregtechceu.gtceu.config.ConfigHolder; import com.lowdragmc.lowdraglib.gui.modular.ModularUI; 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.annotation.RequireRerender; import it.unimi.dsi.fastutil.longs.Long2ObjectMaps; import lombok.Getter; -import lombok.Setter; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.network.chat.Component; import net.minecraft.server.TickTask; @@ -41,10 +37,11 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault -public class DataBankMachine extends MultiblockControllerMachine implements IFancyUIMachine, IDisplayUIMachine, IControllable, IWorkable { +public class DataBankMachine extends WorkableElectricMultiblockMachine implements IFancyUIMachine, IDisplayUIMachine, IControllable { public static final int EUT_PER_HATCH = GTValues.VA[GTValues.EV]; public static final int EUT_PER_HATCH_CHAINED = GTValues.VA[GTValues.LuV]; @@ -52,14 +49,6 @@ public class DataBankMachine extends MultiblockControllerMachine implements IFan private IMaintenanceMachine maintenance; private IEnergyContainer energyContainer; - @Getter @Setter - @Persisted @DescSynced @RequireRerender - private boolean isActive = false; - @Getter @Setter - @Persisted @DescSynced @RequireRerender - private boolean isWorkingEnabled = true; - protected boolean hasNotEnoughEnergy; - @Getter private int energyUsage = 0; @@ -93,6 +82,11 @@ public void onStructureFormed() { this.energyContainer = new EnergyContainerList(energyContainers); this.energyUsage = calculateEnergyUsage(); + if (this.maintenance == null) { + onStructureInvalid(); + return; + } + if (getLevel() instanceof ServerLevel serverLevel) { serverLevel.getServer().tell(new TickTask(0, this::updateTickSubscription)); } @@ -161,23 +155,21 @@ public void tick() { energyToConsume += maintenance.getNumMaintenanceProblems() * energyToConsume / 10; } - if (this.hasNotEnoughEnergy && energyContainer.getInputPerSec() > 19L * energyToConsume) { - this.hasNotEnoughEnergy = false; + if (getRecipeLogic().isWaiting() && energyContainer.getInputPerSec() > 19L * energyToConsume) { + getRecipeLogic().setStatus(RecipeLogic.Status.IDLE); } if (this.energyContainer.getEnergyStored() >= energyToConsume) { - if (!hasNotEnoughEnergy) { + if (!getRecipeLogic().isWaiting()) { long consumed = this.energyContainer.removeEnergy(energyToConsume); - if (consumed == -energyToConsume) { - setActive(true); + if (consumed == energyToConsume) { + getRecipeLogic().setStatus(RecipeLogic.Status.WORKING); } else { - this.hasNotEnoughEnergy = true; - setActive(false); + getRecipeLogic().setWaiting(Component.translatable("gtceu.recipe_logic.insufficient_in").append(": ").append(EURecipeCapability.CAP.getName())); } } } else { - this.hasNotEnoughEnergy = true; - setActive(false); + getRecipeLogic().setWaiting(Component.translatable("gtceu.recipe_logic.insufficient_in").append(": ").append(EURecipeCapability.CAP.getName())); } updateTickSubscription(); } @@ -203,36 +195,6 @@ protected void addWarningText(List textList) { } */ - @Override - public 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) - .textSupplier(this.self().getLevel().isClientSide ? null : this::addDisplayText) - .setMaxWidthLimit(150) - .clickHandler(this::handleDisplayClick))); - group.setBackground(GuiTextures.BACKGROUND_INVERSE); - return group; - } - - @Override - public ModularUI createUI(Player entityPlayer) { - return new ModularUI(198, 208, this, entityPlayer).widget(new FancyMachineUIWidget(this, 198, 208)); - } - - @Override - public List getSubTabs() { - return getParts().stream().filter(IFancyUIProvider.class::isInstance).map(IFancyUIProvider.class::cast).toList(); - } - - @Override - public void attachTooltips(TooltipsPanel tooltipsPanel) { - for (IMultiPart part : getParts()) { - part.attachFancyTooltipsToController(this, tooltipsPanel); - } - } - @Override public int getProgress() { return 0; diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/NetworkSwitchMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/NetworkSwitchMachine.java index 52f473f0ae..ddc6457ca5 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/NetworkSwitchMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/NetworkSwitchMachine.java @@ -65,7 +65,17 @@ public void onStructureFormed() { if (PartAbility.COMPUTATION_DATA_TRANSMISSION.isApplicable(block)) { transmitters.add(hatch); } - + } else if (part.getRecipeHandlers().stream().anyMatch(IOpticalComputationHatch.class::isInstance)) { + var hatch = part.getRecipeHandlers().stream().filter(IOpticalComputationHatch.class::isInstance).map(IOpticalComputationHatch.class::cast).findFirst().orElse(null); + if (hatch != null) { + Block block = part.self().getBlockState().getBlock(); + if (PartAbility.COMPUTATION_DATA_RECEPTION.isApplicable(block)) { + receivers.add(hatch); + } + if (PartAbility.COMPUTATION_DATA_TRANSMISSION.isApplicable(block)) { + transmitters.add(hatch); + } + } } } computationHandler.onStructureForm(receivers, transmitters); @@ -85,7 +95,7 @@ public int getEnergyUsage() { @Override public int requestCWUt(int cwut, boolean simulate, @NotNull Collection seen) { seen.add(this); - return isActive() && !hasNotEnoughEnergy ? computationHandler.requestCWUt(cwut, simulate, seen) : 0; + return isActive() && !getRecipeLogic().isWaiting() ? computationHandler.requestCWUt(cwut, simulate, seen) : 0; } @Override From ea0f7211b019181ee5dcdb2f07b8134f193f363b Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 7 Apr 2024 22:51:34 +0300 Subject: [PATCH 2/7] fix number formatting in recipe widget (#1070) --- .../resources/assets/gtceu/lang/en_ud.json | 16 ++++++++-------- .../resources/assets/gtceu/lang/en_us.json | 16 ++++++++-------- .../gregtechceu/gtceu/data/lang/LangHandler.java | 16 ++++++++-------- src/main/resources/assets/gtceu/lang/ru_ru.json | 6 +++--- src/main/resources/assets/gtceu/lang/zh_cn.json | 14 +++++++------- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index 611a39c1b1..4824e62cab 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -3278,25 +3278,25 @@ "gtceu.polarizer": "ɹǝzıɹɐןoԀ", "gtceu.primitive_blast_furnace": "ǝɔɐuɹnℲ ʇsɐןᗺ ǝʌıʇıɯıɹԀ", "gtceu.pyrolyse_oven": "uǝʌO ǝsʎןoɹʎԀ", - "gtceu.recipe.amperage": "p'% :ǝbɐɹǝdɯⱯ", + "gtceu.recipe.amperage": "%s :ǝbɐɹǝdɯⱯ", "gtceu.recipe.chance": "ɹǝıʇ/%s+ %s :ǝɔuɐɥƆ", "gtceu.recipe.cleanroom": "%s sǝɹınbǝᴚ", "gtceu.recipe.cleanroom.display_name": "ɯooɹuɐǝןƆ", "gtceu.recipe.cleanroom_sterile.display_name": "ɯooɹuɐǝןƆ ǝןıɹǝʇS", - "gtceu.recipe.computation_per_tick": "ʇ/∩MƆ p'% :uoıʇɐʇndɯoƆ ˙uıW", + "gtceu.recipe.computation_per_tick": "ʇ/∩MƆ %s :uoıʇɐʇndɯoƆ ˙uıW", "gtceu.recipe.dimensions": "%s :suoısuǝɯıᗡ", "gtceu.recipe.duration": "sɔǝs ɟᄅ˙'% :uoıʇɐɹnᗡ", - "gtceu.recipe.eu": "ʇ/∩Ǝ p'% :ǝbɐs∩", - "gtceu.recipe.eu_inverted": "ʇ/∩Ǝ p'% :uoıʇɐɹǝuǝ⅁", + "gtceu.recipe.eu": "ʇ/∩Ǝ %s :ǝbɐs∩", + "gtceu.recipe.eu_inverted": "ʇ/∩Ǝ %s :uoıʇɐɹǝuǝ⅁", "gtceu.recipe.eu_to_start": "∩Ǝ%s :ʇɹɐʇS o⟘ ʎbɹǝuƎ", "gtceu.recipe.explosive": "%s :ǝʌısoןdxƎ", - "gtceu.recipe.max_eu": "∩Ǝ p'% :∩Ǝ ˙xɐW", + "gtceu.recipe.max_eu": "∩Ǝ %s :∩Ǝ ˙xɐW", "gtceu.recipe.not_consumed": "ssǝɔoɹd ǝɥʇ uı pǝɯnsuoɔ ʇǝb ʇou sǝoᗡ", "gtceu.recipe.research": "ɥɔɹɐǝsǝᴚ sǝɹınbǝᴚ", "gtceu.recipe.scan_for_research": "ǝuıꞀ ʎןqɯǝssⱯ ɹoɟ uɐɔS", - "gtceu.recipe.temperature": "ʞp'% :ǝɹnʇɐɹǝdɯǝ⟘", - "gtceu.recipe.temperature_and_coil": ")%s( ʞp'% :˙dɯǝ⟘", - "gtceu.recipe.total": "∩Ǝ p'% :ןɐʇo⟘", + "gtceu.recipe.temperature": "ʞ%s :ǝɹnʇɐɹǝdɯǝ⟘", + "gtceu.recipe.temperature_and_coil": ")%s( ʞ%s :˙dɯǝ⟘", + "gtceu.recipe.total": "∩Ǝ %s :ןɐʇo⟘", "gtceu.recipe_logic.condition_fails": "sןıɐℲ uoıʇıpuoƆ", "gtceu.recipe_logic.insufficient_fuel": "ןǝnℲ ʇuǝıɔıɟɟnsuI", "gtceu.recipe_logic.insufficient_in": "sʇnduI ʇuǝıɔıɟɟnsuI", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 923447fd7c..49c06db092 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -3278,25 +3278,25 @@ "gtceu.polarizer": "Polarizer", "gtceu.primitive_blast_furnace": "Primitive Blast Furnace", "gtceu.pyrolyse_oven": "Pyrolyse Oven", - "gtceu.recipe.amperage": "Amperage: %,d", + "gtceu.recipe.amperage": "Amperage: %s", "gtceu.recipe.chance": "Chance: %s +%s/tier", "gtceu.recipe.cleanroom": "Requires %s", "gtceu.recipe.cleanroom.display_name": "Cleanroom", "gtceu.recipe.cleanroom_sterile.display_name": "Sterile Cleanroom", - "gtceu.recipe.computation_per_tick": "Min. Computation: %,d CWU/t", + "gtceu.recipe.computation_per_tick": "Min. Computation: %s CWU/t", "gtceu.recipe.dimensions": "Dimensions: %s", "gtceu.recipe.duration": "Duration: %,.2f secs", - "gtceu.recipe.eu": "Usage: %,d EU/t", - "gtceu.recipe.eu_inverted": "Generation: %,d EU/t", + "gtceu.recipe.eu": "Usage: %s EU/t", + "gtceu.recipe.eu_inverted": "Generation: %s EU/t", "gtceu.recipe.eu_to_start": "Energy To Start: %sEU", "gtceu.recipe.explosive": "Explosive: %s", - "gtceu.recipe.max_eu": "Max. EU: %,d EU", + "gtceu.recipe.max_eu": "Max. EU: %s EU", "gtceu.recipe.not_consumed": "Does not get consumed in the process", "gtceu.recipe.research": "Requires Research", "gtceu.recipe.scan_for_research": "Scan for Assembly Line", - "gtceu.recipe.temperature": "Temperature: %,dK", - "gtceu.recipe.temperature_and_coil": "Temp.: %,dK (%s)", - "gtceu.recipe.total": "Total: %,d EU", + "gtceu.recipe.temperature": "Temperature: %sK", + "gtceu.recipe.temperature_and_coil": "Temp.: %sK (%s)", + "gtceu.recipe.total": "Total: %s EU", "gtceu.recipe_logic.condition_fails": "Condition Fails", "gtceu.recipe_logic.insufficient_fuel": "Insufficient Fuel", "gtceu.recipe_logic.insufficient_in": "Insufficient Inputs", diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java b/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java index 36f3279660..7d9f117d88 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java @@ -766,16 +766,16 @@ public static void init(RegistrateLangProvider provider) { provider.add("gtceu.universal.tooltip.terrain_resist", "This Machine will not explode when exposed to the Elements"); provider.add("gtceu.universal.tooltip.requires_redstone", "§4Requires Redstone power"); provider.add("gtceu.universal.tooltip.deprecated", "§5WARNING: DEPRECATED. WILL BE REMOVED IN A FUTURE VERSION.§r"); - provider.add("gtceu.recipe.total", "Total: %,d EU"); - provider.add("gtceu.recipe.max_eu", "Max. EU: %,d EU"); - provider.add("gtceu.recipe.eu", "Usage: %,d EU/t"); - provider.add("gtceu.recipe.eu_inverted", "Generation: %,d EU/t"); + provider.add("gtceu.recipe.total", "Total: %s EU"); + provider.add("gtceu.recipe.max_eu", "Max. EU: %s EU"); + provider.add("gtceu.recipe.eu", "Usage: %s EU/t"); + provider.add("gtceu.recipe.eu_inverted", "Generation: %s EU/t"); provider.add("gtceu.recipe.duration", "Duration: %,.2f secs"); - provider.add("gtceu.recipe.amperage", "Amperage: %,d"); + provider.add("gtceu.recipe.amperage", "Amperage: %s"); provider.add("gtceu.recipe.not_consumed", "Does not get consumed in the process"); provider.add("gtceu.recipe.chance", "Chance: %s +%s/tier"); - provider.add("gtceu.recipe.temperature", "Temperature: %,dK"); - provider.add("gtceu.recipe.temperature_and_coil", "Temp.: %,dK (%s)"); + provider.add("gtceu.recipe.temperature", "Temperature: %sK"); + provider.add("gtceu.recipe.temperature_and_coil", "Temp.: %sK (%s)"); provider.add("gtceu.recipe.explosive", "Explosive: %s"); provider.add("gtceu.recipe.eu_to_start", "Energy To Start: %sEU"); provider.add("gtceu.recipe.dimensions", "Dimensions: %s"); @@ -784,7 +784,7 @@ public static void init(RegistrateLangProvider provider) { provider.add("gtceu.recipe.cleanroom_sterile.display_name", "Sterile Cleanroom"); provider.add("gtceu.recipe.research", "Requires Research"); provider.add("gtceu.recipe.scan_for_research", "Scan for Assembly Line"); - provider.add("gtceu.recipe.computation_per_tick", "Min. Computation: %,d CWU/t"); + provider.add("gtceu.recipe.computation_per_tick", "Min. Computation: %s CWU/t"); provider.add("gtceu.fluid.click_to_fill", "§7Click with a Fluid Container to §bfill §7the tank (Shift-click for a full stack)."); provider.add("gtceu.fluid.click_combined", "§7Click with a Fluid Container to §cempty §7or §bfill §7the tank (Shift-click for a full stack)."); provider.add("gtceu.fluid.click_to_empty", "§7Click with a Fluid Container to §cempty §7the tank (Shift-click for a full stack)."); diff --git a/src/main/resources/assets/gtceu/lang/ru_ru.json b/src/main/resources/assets/gtceu/lang/ru_ru.json index dd926d428f..e3703a4f99 100644 --- a/src/main/resources/assets/gtceu/lang/ru_ru.json +++ b/src/main/resources/assets/gtceu/lang/ru_ru.json @@ -2755,7 +2755,7 @@ "gtceu.machine.power_substation.tooltip.1": "§fНакопителям§7 не нужно быть одно уровня.", "gtceu.machine.power_substation.tooltip.2": "Позволяет установить до §f%d Слоёв Накопителей§7.", "gtceu.machine.power_substation.tooltip.3": "Теряет §f1%%§7 от общей емкости каждые §f24 часа§7.", - "gtceu.machine.power_substation.tooltip.4": "Ограниченно §f%,d EU/t§7 постоянной потери на Блок Накопителя.", + "gtceu.machine.power_substation.tooltip.4": "Ограниченно §f%s EU/t§7 постоянной потери на Блок Накопителя.", "gtceu.machine.power_substation.tooltip.5": "Может использовать", "gtceu.machine.power_substation.tooltip.6": " Люк для Лазерного Источника§7.", "gtceu.machine.primitive_blast_furnace.bronze.tooltip": "Создает вашу первую Сталь", @@ -3073,7 +3073,7 @@ "gtceu.recipe.eu_to_start": "Энергии для запуска: %sEU", "gtceu.recipe.explosive": "Взрывчатка: %s", "gtceu.recipe.not_consumed": "Не расходуется", - "gtceu.recipe.temperature": "Температура: %,dK", + "gtceu.recipe.temperature": "Температура: %sK", "gtceu.recipe.total": "Всего: %d EU", "gtceu.recipe_logic.condition_fails": "Условие не выполнено", "gtceu.recipe_logic.insufficient_fuel": "Недостаточно топлива", @@ -6408,7 +6408,7 @@ "block.gtceu.hp_steam_solar_boiler": "Солнечный паровой котел высокого давления", "block.gtceu.lp_steam_solar_boiler": "Солнечный паровой котел", "compass.node.gtceu.steam/steam_solar_boiler": "Паровой солнечный котел", - "gtceu.recipe.temperature_and_coil": "Темп.: %,dK (%s)", + "gtceu.recipe.temperature_and_coil": "Темп.: %sK (%s)", "compass.node.gtceu.materials/block": "Блок", "compass.node.gtceu.materials/frame": "Каркас", "compass.node.gtceu.tools/ev_drill": "Бур (§5EV§r)", diff --git a/src/main/resources/assets/gtceu/lang/zh_cn.json b/src/main/resources/assets/gtceu/lang/zh_cn.json index 2f27fe654d..9c856a2726 100644 --- a/src/main/resources/assets/gtceu/lang/zh_cn.json +++ b/src/main/resources/assets/gtceu/lang/zh_cn.json @@ -1978,7 +1978,7 @@ "cover.machine_controller.mode.cover_west":"控制目标:覆盖板(西面)", "cover.machine_controller.mode.machine":"控制目标:机器", "cover.machine_controller.normal":"普通", - "cover.machine_controller.redstone":"最小红石信号强度:%,d", + "cover.machine_controller.redstone":"最小红石信号强度:%s", "cover.machine_controller.title":"机器控制设置", "cover.ore_dictionary_filter.info.0":"§b接受复杂表达式", "cover.ore_dictionary_filter.info.1":"& = 且(AND)", @@ -3126,21 +3126,21 @@ "gtceu.polarizer":"两极磁化机", "gtceu.primitive_blast_furnace":"土高炉", "gtceu.pyrolyse_oven":"热解炉", - "gtceu.recipe.amperage":"电流:%,d", + "gtceu.recipe.amperage":"电流:%s", "gtceu.recipe.chance":"出产概率:%s + %s/电压等级", "gtceu.recipe.cleanroom":"需要%s", "gtceu.recipe.cleanroom.display_name":"超净间", "gtceu.recipe.cleanroom_sterile.display_name":"无菌超净间", "gtceu.recipe.dimensions":"维度:%s", "gtceu.recipe.duration":"耗时:%,.2f秒", - "gtceu.recipe.eu":"耗能功率:%,d EU/t", - "gtceu.recipe.eu_inverted":"产能功率:%,d EU/t", + "gtceu.recipe.eu":"耗能功率:%s EU/t", + "gtceu.recipe.eu_inverted":"产能功率:%s EU/t", "gtceu.recipe.eu_to_start":"启动耗能:%s EU", "gtceu.recipe.explosive":"爆炸物:%s", "gtceu.recipe.not_consumed":"不在加工中消耗", - "gtceu.recipe.temperature":"温度:%,dK", - "gtceu.recipe.temperature_and_coil":"温度:%,dK(%s)", - "gtceu.recipe.total":"总计:%,d EU", + "gtceu.recipe.temperature":"温度:%sK", + "gtceu.recipe.temperature_and_coil":"温度:%sK(%s)", + "gtceu.recipe.total":"总计:%s EU", "gtceu.recipe_logic.condition_fails":"条件不足", "gtceu.recipe_logic.insufficient_fuel":"燃料不足", "gtceu.recipe_logic.insufficient_in":"需要输入", From e78af4d2e5c45b79e946a8899469ee1ae133d745 Mon Sep 17 00:00:00 2001 From: Mikerooni <139889766+mikerooni@users.noreply.github.com> Date: Sun, 7 Apr 2024 23:05:24 +0200 Subject: [PATCH 3/7] Port multiblock fluid tanks (#1072) * feat: add multiblock tanks * feat: add tank valve behavior * fix: tank valve rendering * fix: tank valve rotation * chore: run datagen * refactor: decouple used filter from isMetal in multiblock tanks * feat: add tooltips to multiblock tanks and valves * chore: fix file copy error --- .../compass/nodes/generation/andesite.json | 4 +- .../compass/nodes/generation/basalt.json | 2 +- .../compass/nodes/generation/deepslate.json | 2 +- .../compass/nodes/generation/endstone.json | 2 +- .../compass/nodes/generation/granite.json | 4 +- .../compass/nodes/generation/netherrack.json | 2 +- .../compass/nodes/generation/red_sand.json | 4 +- .../gtceu/compass/nodes/generation/tuff.json | 4 +- .../nodes/multiblock/alloy_blast_smelter.json | 4 +- .../compass/nodes/multiblock/cleanroom.json | 2 +- .../compass/nodes/multiblock/coke_oven.json | 2 +- .../multiblock/electric_blast_furnace.json | 2 +- .../nodes/multiblock/fluid_drilling_rig.json | 2 +- .../multiblock/implosion_compressor.json | 2 +- .../nodes/multiblock/large_arc_smelter.json | 2 +- .../nodes/multiblock/large_assembler.json | 2 +- .../nodes/multiblock/large_autoclave.json | 4 +- .../nodes/multiblock/large_boiler.json | 2 +- .../nodes/multiblock/large_brewer.json | 2 +- .../nodes/multiblock/large_centrifuge.json | 2 +- .../nodes/multiblock/large_chemical_bath.json | 2 +- .../multiblock/large_chemical_reactor.json | 2 +- .../multiblock/large_circuit_assembler.json | 2 +- .../nodes/multiblock/large_combustion.json | 4 +- .../nodes/multiblock/large_cutter.json | 2 +- .../nodes/multiblock/large_distillery.json | 2 +- .../nodes/multiblock/large_electrolyzer.json | 4 +- .../nodes/multiblock/large_electromagnet.json | 4 +- .../multiblock/large_engraving_laser.json | 2 +- .../nodes/multiblock/large_extractor.json | 4 +- .../nodes/multiblock/large_extruder.json | 4 +- .../multiblock/large_maceration_tower.json | 2 +- .../multiblock/large_material_press.json | 2 +- .../compass/nodes/multiblock/large_miner.json | 2 +- .../compass/nodes/multiblock/large_mixer.json | 2 +- .../nodes/multiblock/large_packer.json | 2 +- .../multiblock/large_sifting_funnel.json | 4 +- .../nodes/multiblock/large_solidifier.json | 4 +- .../nodes/multiblock/large_turbine.json | 2 +- .../nodes/multiblock/large_wiremill.json | 4 +- .../nodes/multiblock/luv_fusion_reactor.json | 2 +- .../nodes/multiblock/mega_blast_furnace.json | 2 +- .../nodes/multiblock/mega_vacuum_freezer.json | 2 +- .../nodes/multiblock/multiblock_tank.json | 16 +++ .../multiblock/primitive_blast_furnace.json | 2 +- .../nodes/multiblock/processing_array.json | 2 +- .../nodes/multiblock/pyrolyse_oven.json | 4 +- .../compass/nodes/multiblock/steam_oven.json | 2 +- .../compass/nodes/multiblock/tank_valve.json | 16 +++ .../nodes/multiblock/uv_fusion_reactor.json | 2 +- .../nodes/multiblock/zpm_fusion_reactor.json | 2 +- .../resources/assets/gtceu/lang/en_ud.json | 7 ++ .../resources/assets/gtceu/lang/en_us.json | 7 ++ .../forge/tags/blocks/mineable/wrench.json | 1 + .../gtceu/loot_tables/blocks/wood_wall.json | 21 ++++ .../tags/blocks/mineable/pickaxe.json | 1 + .../gtceu/common/data/GTBlocks.java | 12 ++ .../gtceu/common/data/GTMachines.java | 77 +++++++++++++ .../electric/MultiblockTankMachine.java | 92 +++++++++++++++ .../multiblock/part/TankValvePartMachine.java | 109 ++++++++++++++++++ .../multiblock/tank_valve/overlay_front.png | Bin 0 -> 1863 bytes .../tank_valve/overlay_front_active.png | Bin 0 -> 1863 bytes 62 files changed, 423 insertions(+), 64 deletions(-) create mode 100644 src/generated/resources/assets/gtceu/compass/nodes/multiblock/multiblock_tank.json create mode 100644 src/generated/resources/assets/gtceu/compass/nodes/multiblock/tank_valve.json create mode 100644 src/generated/resources/data/gtceu/loot_tables/blocks/wood_wall.json create mode 100644 src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/MultiblockTankMachine.java create mode 100644 src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/TankValvePartMachine.java create mode 100644 src/main/resources/assets/gtceu/textures/block/multiblock/tank_valve/overlay_front.png create mode 100644 src/main/resources/assets/gtceu/textures/block/multiblock/tank_valve/overlay_front_active.png diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/andesite.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/andesite.json index 04d6ca5cf5..582d2ec438 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/andesite.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/andesite.json @@ -117,8 +117,8 @@ ], "page": "gtceu:generation/andesite", "position": [ - -100, - 100 + -150, + 50 ], "pre_nodes": [ "gtceu:generation/ore" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/basalt.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/basalt.json index 68ab05ead3..7f747eef96 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/basalt.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/basalt.json @@ -117,7 +117,7 @@ ], "page": "gtceu:generation/basalt", "position": [ - -150, + -100, 150 ], "pre_nodes": [ diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/deepslate.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/deepslate.json index 3b154d948e..833b576ec1 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/deepslate.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/deepslate.json @@ -117,7 +117,7 @@ ], "page": "gtceu:generation/deepslate", "position": [ - -100, + -150, 150 ], "pre_nodes": [ diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/endstone.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/endstone.json index 0a006e7f84..f23d44d3f5 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/endstone.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/endstone.json @@ -117,7 +117,7 @@ ], "page": "gtceu:generation/endstone", "position": [ - -200, + -50, 50 ], "pre_nodes": [ diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/granite.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/granite.json index 74152de990..e3004f4c71 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/granite.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/granite.json @@ -117,8 +117,8 @@ ], "page": "gtceu:generation/granite", "position": [ - -150, - 100 + -200, + 50 ], "pre_nodes": [ "gtceu:generation/ore" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/netherrack.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/netherrack.json index 874d515c27..13932e62fd 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/netherrack.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/netherrack.json @@ -117,7 +117,7 @@ ], "page": "gtceu:generation/netherrack", "position": [ - -150, + -100, 50 ], "pre_nodes": [ diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/red_sand.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/red_sand.json index 29349a6d29..4d54d2348f 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/red_sand.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/red_sand.json @@ -117,8 +117,8 @@ ], "page": "gtceu:generation/red_sand", "position": [ - -50, - 150 + -200, + 100 ], "pre_nodes": [ "gtceu:generation/ore" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/generation/tuff.json b/src/generated/resources/assets/gtceu/compass/nodes/generation/tuff.json index 05dfec8ae4..84d455329e 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/generation/tuff.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/generation/tuff.json @@ -117,8 +117,8 @@ ], "page": "gtceu:generation/tuff", "position": [ - -50, - 100 + -200, + 150 ], "pre_nodes": [ "gtceu:generation/ore" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/alloy_blast_smelter.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/alloy_blast_smelter.json index 73beabeb7c..447a56a80f 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/alloy_blast_smelter.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/alloy_blast_smelter.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/alloy_blast_smelter", "position": [ - -300, - 250 + -100, + 200 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/cleanroom.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/cleanroom.json index 75ced94658..6b20ca74d4 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/cleanroom.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/cleanroom.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/cleanroom", "position": [ - -50, + -100, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/coke_oven.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/coke_oven.json index b89051e180..fc217791e8 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/coke_oven.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/coke_oven.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/coke_oven", "position": [ - -300, + -250, 0 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/electric_blast_furnace.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/electric_blast_furnace.json index d907fbca96..94ca0b1f2a 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/electric_blast_furnace.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/electric_blast_furnace.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/electric_blast_furnace", "position": [ - -200, + -150, 0 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/fluid_drilling_rig.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/fluid_drilling_rig.json index 72bd48485b..cd79d51ca0 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/fluid_drilling_rig.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/fluid_drilling_rig.json @@ -10,7 +10,7 @@ ], "page": "gtceu:multiblock/fluid_drilling_rig", "position": [ - -150, + -200, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/implosion_compressor.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/implosion_compressor.json index fd9aa870de..240980fb8d 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/implosion_compressor.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/implosion_compressor.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/implosion_compressor", "position": [ - -100, + -50, 0 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_arc_smelter.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_arc_smelter.json index a16df779f0..80153aa476 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_arc_smelter.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_arc_smelter.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_arc_smelter", "position": [ - -100, + -250, 200 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_assembler.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_assembler.json index 65d967266b..25b5f96b81 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_assembler.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_assembler.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_assembler", "position": [ - -200, + -350, 200 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_autoclave.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_autoclave.json index b0b37661e7..24694a83e3 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_autoclave.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_autoclave.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_autoclave", "position": [ - -250, - 250 + -50, + 200 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_boiler.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_boiler.json index 371d9393ce..d06895595a 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_boiler.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_boiler.json @@ -11,7 +11,7 @@ ], "page": "gtceu:multiblock/large_boiler", "position": [ - -350, + -300, 0 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_brewer.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_brewer.json index cbc1c8f1ec..e81354979e 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_brewer.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_brewer.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_brewer", "position": [ - -150, + -350, 250 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_centrifuge.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_centrifuge.json index ad0e09cf0e..dff8bbe014 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_centrifuge.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_centrifuge.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_centrifuge", "position": [ - -100, + -200, 150 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_bath.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_bath.json index cdc124349d..57565b7108 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_bath.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_bath.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_chemical_bath", "position": [ - -150, + -250, 150 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_reactor.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_reactor.json index 5589d335a3..26bed4f225 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_reactor.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_chemical_reactor.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_chemical_reactor", "position": [ - -150, + -100, 0 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_circuit_assembler.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_circuit_assembler.json index eadb35f6ef..af06dd9b97 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_circuit_assembler.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_circuit_assembler.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_circuit_assembler", "position": [ - -150, + -300, 200 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_combustion.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_combustion.json index 2d606036ec..c078ae0b76 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_combustion.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_combustion.json @@ -9,8 +9,8 @@ ], "page": "gtceu:multiblock/large_combustion", "position": [ - -350, - 150 + -50, + 100 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_cutter.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_cutter.json index d95584fbfe..fb2cd50e50 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_cutter.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_cutter.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_cutter", "position": [ - -100, + -300, 250 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_distillery.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_distillery.json index 23ec2a346e..97ae54b848 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_distillery.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_distillery.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_distillery", "position": [ - -50, + -250, 250 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electrolyzer.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electrolyzer.json index d74e274e84..07fe0faeef 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electrolyzer.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electrolyzer.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_electrolyzer", "position": [ - -350, - 200 + -100, + 150 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electromagnet.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electromagnet.json index 1f2b189148..0b134308b3 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electromagnet.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_electromagnet.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_electromagnet", "position": [ - -300, - 200 + -50, + 150 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_engraving_laser.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_engraving_laser.json index 44797cd0dc..f27357a48b 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_engraving_laser.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_engraving_laser.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_engraving_laser", "position": [ - -50, + -200, 200 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extractor.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extractor.json index 8c0608dff8..4064fffb6b 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extractor.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extractor.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_extractor", "position": [ - -350, - 300 + -200, + 250 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extruder.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extruder.json index 4e58524703..dc5a5ec70d 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extruder.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_extruder.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_extruder", "position": [ - -300, - 300 + -150, + 250 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_maceration_tower.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_maceration_tower.json index 446fc647c6..e3ffcdb819 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_maceration_tower.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_maceration_tower.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_maceration_tower", "position": [ - -200, + -300, 150 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_material_press.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_material_press.json index 607136d12b..51567443da 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_material_press.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_material_press.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_material_press", "position": [ - -200, + -400, 250 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_miner.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_miner.json index 595bc96c8d..eda6cac9ed 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_miner.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_miner.json @@ -10,7 +10,7 @@ ], "page": "gtceu:multiblock/large_miner", "position": [ - -100, + -150, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_mixer.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_mixer.json index 032911bf99..d4acf81cea 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_mixer.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_mixer.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_mixer", "position": [ - -50, + -150, 150 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_packer.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_packer.json index cc48962333..7a7987d942 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_packer.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_packer.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/large_packer", "position": [ - -250, + -400, 200 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_sifting_funnel.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_sifting_funnel.json index 4050b9d792..04dbb55065 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_sifting_funnel.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_sifting_funnel.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_sifting_funnel", "position": [ - -350, - 250 + -150, + 200 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_solidifier.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_solidifier.json index 52d3335d9c..79de255929 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_solidifier.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_solidifier.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_solidifier", "position": [ - -250, - 300 + -100, + 250 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_turbine.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_turbine.json index ad4ba1a4a6..c2d0a5827e 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_turbine.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_turbine.json @@ -10,7 +10,7 @@ ], "page": "gtceu:multiblock/large_turbine", "position": [ - -300, + -400, 150 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_wiremill.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_wiremill.json index d423c04e8d..df3341750c 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_wiremill.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/large_wiremill.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/large_wiremill", "position": [ - -200, - 300 + -50, + 250 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/luv_fusion_reactor.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/luv_fusion_reactor.json index 9852f043b1..d2820bd6bc 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/luv_fusion_reactor.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/luv_fusion_reactor.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/luv_fusion_reactor", "position": [ - -300, + -350, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_blast_furnace.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_blast_furnace.json index a69a8599d4..ceb8804a6c 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_blast_furnace.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_blast_furnace.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/mega_blast_furnace", "position": [ - -150, + -400, 300 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_vacuum_freezer.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_vacuum_freezer.json index db58e7246a..c9f6decc09 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_vacuum_freezer.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/mega_vacuum_freezer.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/mega_vacuum_freezer", "position": [ - -100, + -350, 300 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/multiblock_tank.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/multiblock_tank.json new file mode 100644 index 0000000000..c735fd648f --- /dev/null +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/multiblock_tank.json @@ -0,0 +1,16 @@ +{ + "button_texture": { + "type": "item", + "res": "gtceu:wooden_multiblock_tank" + }, + "items": [ + "gtceu:wooden_multiblock_tank", + "gtceu:steel_multiblock_tank" + ], + "page": "gtceu:multiblock/multiblock_tank", + "position": [ + -350, + 0 + ], + "section": "gtceu:multiblock" +} \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/primitive_blast_furnace.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/primitive_blast_furnace.json index 2dc70c67bb..9fa54e58d6 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/primitive_blast_furnace.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/primitive_blast_furnace.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/primitive_blast_furnace", "position": [ - -250, + -200, 0 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/processing_array.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/processing_array.json index 1b2a56a60a..57066e9432 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/processing_array.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/processing_array.json @@ -9,7 +9,7 @@ ], "page": "gtceu:multiblock/processing_array", "position": [ - -250, + -350, 150 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/pyrolyse_oven.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/pyrolyse_oven.json index ed8360f86f..1ca1ae8f5b 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/pyrolyse_oven.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/pyrolyse_oven.json @@ -8,8 +8,8 @@ ], "page": "gtceu:multiblock/pyrolyse_oven", "position": [ - -50, - 0 + -400, + 50 ], "section": "gtceu:multiblock" } \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/steam_oven.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/steam_oven.json index 9c40fc60de..5265c1249d 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/steam_oven.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/steam_oven.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/steam_oven", "position": [ - -350, + -400, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/tank_valve.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/tank_valve.json new file mode 100644 index 0000000000..657cfe4e08 --- /dev/null +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/tank_valve.json @@ -0,0 +1,16 @@ +{ + "button_texture": { + "type": "item", + "res": "gtceu:wooden_tank_valve" + }, + "items": [ + "gtceu:wooden_tank_valve", + "gtceu:steel_tank_valve" + ], + "page": "gtceu:multiblock/tank_valve", + "position": [ + -400, + 0 + ], + "section": "gtceu:multiblock" +} \ No newline at end of file diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/uv_fusion_reactor.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/uv_fusion_reactor.json index 704f37af23..b1fe0bfff9 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/uv_fusion_reactor.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/uv_fusion_reactor.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/uv_fusion_reactor", "position": [ - -200, + -250, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/zpm_fusion_reactor.json b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/zpm_fusion_reactor.json index a2fdd0c2ad..0528087807 100644 --- a/src/generated/resources/assets/gtceu/compass/nodes/multiblock/zpm_fusion_reactor.json +++ b/src/generated/resources/assets/gtceu/compass/nodes/multiblock/zpm_fusion_reactor.json @@ -8,7 +8,7 @@ ], "page": "gtceu:multiblock/zpm_fusion_reactor", "position": [ - -250, + -300, 100 ], "section": "gtceu:multiblock" diff --git a/src/generated/resources/assets/gtceu/lang/en_ud.json b/src/generated/resources/assets/gtceu/lang/en_ud.json index 4824e62cab..7b9c49c943 100644 --- a/src/generated/resources/assets/gtceu/lang/en_ud.json +++ b/src/generated/resources/assets/gtceu/lang/en_ud.json @@ -858,7 +858,9 @@ "block.gtceu.steel_gearbox": "buısɐƆ xoqɹɐǝ⅁ ןǝǝʇS", "block.gtceu.steel_large_boiler": "ɹǝןıoᗺ ןǝǝʇS ǝbɹɐꞀ", "block.gtceu.steel_machine_casing": "buısɐƆ ǝuıɥɔɐW ןǝǝʇS pıןoS", + "block.gtceu.steel_multiblock_tank": "ʞuɐ⟘ ʞɔoןqıʇןnW ןǝǝʇS", "block.gtceu.steel_pipe_casing": "buısɐƆ ǝdıԀ ןǝǝʇS", + "block.gtceu.steel_tank_valve": "ǝʌןɐΛ ʞuɐ⟘ ןǝǝʇS", "block.gtceu.steel_turbine_casing": "buısɐƆ ǝuıqɹn⟘ ןǝǝʇS", "block.gtceu.sterilizing_filter_casing": "buısɐƆ ɹǝʇןıℲ buızıןıɹǝʇS", "block.gtceu.stress_proof_casing": "buısɐƆ ɟooɹԀ ssǝɹʇS", @@ -1285,6 +1287,9 @@ "block.gtceu.wire_coil.tooltip_speed_pyro": "%s%%ɟ§ :pǝǝdS buıssǝɔoɹԀq§ ", "block.gtceu.wood_crate": "ǝʇɐɹƆ uǝpooM", "block.gtceu.wood_drum": "ןǝɹɹɐᗺ uǝpooM", + "block.gtceu.wood_wall": "ןןɐM pooM", + "block.gtceu.wooden_multiblock_tank": "ʞuɐ⟘ ʞɔoןqıʇןnW uǝpooM", + "block.gtceu.wooden_tank_valve": "ǝʌןɐΛ ʞuɐ⟘ uǝpooM", "block.gtceu.zpm_1024a_laser_source_hatch": "ɥɔʇɐH ǝɔɹnoS ɹǝsɐꞀ Ɐㄣᄅ0'Ɩ WԀZɔ§", "block.gtceu.zpm_1024a_laser_target_hatch": "ɥɔʇɐH ʇǝbɹɐ⟘ ɹǝsɐꞀ Ɐㄣᄅ0'Ɩ WԀZɔ§", "block.gtceu.zpm_16a_energy_converter": "ɹǝʇɹǝʌuoƆ ʎbɹǝuƎ Ɐ9Ɩ WԀZ", @@ -1725,12 +1730,14 @@ "compass.node.gtceu.multiblock/mega_blast_furnace": "ǝɔɐuɹnℲ ʇsɐןᗺ ɐbǝW", "compass.node.gtceu.multiblock/mega_vacuum_freezer": "ɹǝzǝǝɹℲ ɯnnɔɐΛ ɐbǝW", "compass.node.gtceu.multiblock/multi_smelter": "ɹǝʇןǝɯS ıʇןnW", + "compass.node.gtceu.multiblock/multiblock_tank": "ʞuɐ⟘ ʞɔoןqıʇןnW", "compass.node.gtceu.multiblock/primitive_blast_furnace": "ǝɔɐuɹnℲ ʇsɐןᗺ ǝʌıʇıɯıɹԀ", "compass.node.gtceu.multiblock/primitive_pump": "dɯnԀ ǝʌıʇıɯıɹԀ", "compass.node.gtceu.multiblock/processing_array": "ʎɐɹɹⱯ buıssǝɔoɹԀ", "compass.node.gtceu.multiblock/pyrolyse_oven": "uǝʌO ǝsʎןoɹʎԀ", "compass.node.gtceu.multiblock/steam_grinder": "ɹǝpuıɹ⅁ ɯɐǝʇS", "compass.node.gtceu.multiblock/steam_oven": "uǝʌO ɯɐǝʇS", + "compass.node.gtceu.multiblock/tank_valve": "ǝʌןɐΛ ʞuɐ⟘", "compass.node.gtceu.multiblock/uv_fusion_reactor": "ɹoʇɔɐǝᴚ uoısnℲ ʌ∩", "compass.node.gtceu.multiblock/vacuum_freezer": "ɹǝzǝǝɹℲ ɯnnɔɐΛ", "compass.node.gtceu.multiblock/zpm_fusion_reactor": "ɹoʇɔɐǝᴚ uoısnℲ ɯdZ", diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index 49c06db092..eb619cbb9d 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -858,7 +858,9 @@ "block.gtceu.steel_gearbox": "Steel Gearbox Casing", "block.gtceu.steel_large_boiler": "Large Steel Boiler", "block.gtceu.steel_machine_casing": "Solid Steel Machine Casing", + "block.gtceu.steel_multiblock_tank": "Steel Multiblock Tank", "block.gtceu.steel_pipe_casing": "Steel Pipe Casing", + "block.gtceu.steel_tank_valve": "Steel Tank Valve", "block.gtceu.steel_turbine_casing": "Steel Turbine Casing", "block.gtceu.sterilizing_filter_casing": "Sterilizing Filter Casing", "block.gtceu.stress_proof_casing": "Stress Proof Casing", @@ -1285,6 +1287,9 @@ "block.gtceu.wire_coil.tooltip_speed_pyro": " §bProcessing Speed: §f%s%%", "block.gtceu.wood_crate": "Wooden Crate", "block.gtceu.wood_drum": "Wooden Barrel", + "block.gtceu.wood_wall": "Wood Wall", + "block.gtceu.wooden_multiblock_tank": "Wooden Multiblock Tank", + "block.gtceu.wooden_tank_valve": "Wooden Tank Valve", "block.gtceu.zpm_1024a_laser_source_hatch": "§cZPM 1,024A Laser Source Hatch", "block.gtceu.zpm_1024a_laser_target_hatch": "§cZPM 1,024A Laser Target Hatch", "block.gtceu.zpm_16a_energy_converter": "ZPM 16A Energy Converter", @@ -1725,12 +1730,14 @@ "compass.node.gtceu.multiblock/mega_blast_furnace": "Mega Blast Furnace", "compass.node.gtceu.multiblock/mega_vacuum_freezer": "Mega Vacuum Freezer", "compass.node.gtceu.multiblock/multi_smelter": "Multi Smelter", + "compass.node.gtceu.multiblock/multiblock_tank": "Multiblock Tank", "compass.node.gtceu.multiblock/primitive_blast_furnace": "Primitive Blast Furnace", "compass.node.gtceu.multiblock/primitive_pump": "Primitive Pump", "compass.node.gtceu.multiblock/processing_array": "Processing Array", "compass.node.gtceu.multiblock/pyrolyse_oven": "Pyrolyse Oven", "compass.node.gtceu.multiblock/steam_grinder": "Steam Grinder", "compass.node.gtceu.multiblock/steam_oven": "Steam Oven", + "compass.node.gtceu.multiblock/tank_valve": "Tank Valve", "compass.node.gtceu.multiblock/uv_fusion_reactor": "Uv Fusion Reactor", "compass.node.gtceu.multiblock/vacuum_freezer": "Vacuum Freezer", "compass.node.gtceu.multiblock/zpm_fusion_reactor": "Zpm Fusion Reactor", diff --git a/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json b/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json index 965682ca11..23be2c886d 100644 --- a/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json +++ b/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json @@ -2,6 +2,7 @@ "values": [ "gtceu:long_distance_item_pipeline", "gtceu:long_distance_fluid_pipeline", + "gtceu:wood_wall", "gtceu:coke_oven_bricks", "gtceu:firebricks", "gtceu:steam_machine_casing", diff --git a/src/generated/resources/data/gtceu/loot_tables/blocks/wood_wall.json b/src/generated/resources/data/gtceu/loot_tables/blocks/wood_wall.json new file mode 100644 index 0000000000..098cad432f --- /dev/null +++ b/src/generated/resources/data/gtceu/loot_tables/blocks/wood_wall.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "gtceu:wood_wall" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "gtceu:blocks/wood_wall" +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 62ad183b9f..68d4e85c3d 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -2,6 +2,7 @@ "values": [ "gtceu:long_distance_item_pipeline", "gtceu:long_distance_fluid_pipeline", + "gtceu:wood_wall", "gtceu:coke_oven_bricks", "gtceu:firebricks", "gtceu:steam_machine_casing", diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java index 8e9d474c14..cfb3e3b937 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java @@ -440,6 +440,7 @@ private static void registerOpticalPipeBlock(int index) { ////////////////////////////////////// // Multiblock Machine Casing Blocks + public static final BlockEntry CASING_WOOD_WALL = createSidedCasingBlock("wood_wall", "block/casings/wood_wall"); public static final BlockEntry CASING_COKE_BRICKS = createCasingBlock("coke_oven_bricks", GTCEu.id("block/casings/solid/machine_coke_bricks")); public static final BlockEntry CASING_PRIMITIVE_BRICKS = createCasingBlock("firebricks", GTCEu.id("block/casings/solid/machine_primitive_bricks")); public static final BlockEntry CASING_BRONZE_BRICKS = createCasingBlock("steam_machine_casing", GTCEu.id("block/casings/solid/machine_casing_bronze_plated_bricks")); @@ -685,6 +686,17 @@ public static BlockEntry createCasingBlock(String name, ResourceLocation return createCasingBlock(name, RendererBlock::new, texture, () -> Blocks.IRON_BLOCK, () -> RenderType::cutoutMipped); } + private static BlockEntry createSidedCasingBlock(String name, String texture) { + return createCasingBlock( + name, (properties, iRenderer) -> new RendererBlock(properties, + Platform.isClient() ? new TextureOverrideRenderer(new ResourceLocation("block/cube_bottom_top"), + Map.of("bottom", GTCEu.id(texture + "/bottom"), + "top", GTCEu.id(texture + "/top"), + "side", GTCEu.id(texture + "/side"))) : null), + GTCEu.id(texture), () -> Blocks.IRON_BLOCK, () -> RenderType::cutoutMipped + ); + } + private static BlockEntry createGlassCasingBlock(String name, ResourceLocation texture, Supplier> type) { return createCasingBlock(name, RendererGlassBlock::new, texture, () -> Blocks.GLASS, type); } diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java index 3dd180a83a..e226baf577 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTMachines.java @@ -16,6 +16,7 @@ import com.gregtechceu.gtceu.api.data.chemical.material.Material; import com.gregtechceu.gtceu.api.data.chemical.material.properties.PropertyKey; import com.gregtechceu.gtceu.api.data.tag.TagPrefix; +import com.gregtechceu.gtceu.api.fluids.PropertyFluidFilter; import com.gregtechceu.gtceu.api.item.DrumMachineItem; import com.gregtechceu.gtceu.api.machine.*; import com.gregtechceu.gtceu.api.machine.feature.multiblock.IRotorHolderMachine; @@ -83,6 +84,7 @@ import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.phys.shapes.Shapes; import net.minecraftforge.fml.ModLoader; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Comparator; @@ -90,6 +92,7 @@ import java.util.Locale; import java.util.function.BiConsumer; import java.util.function.BiFunction; +import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Stream; @@ -526,6 +529,30 @@ public static BiConsumer> createTankTooltips(String n .register(), HIGH_TIERS); + + // Multiblock Tanks + public static final MachineDefinition WOODEN_TANK_VALVE = registerTankValve( + "wooden_tank_valve", "Wooden Tank Valve", false, + (builder, overlay) -> builder.sidedWorkableCasingRenderer("block/casings/wood_wall", overlay, false) + ); + public static final MultiblockMachineDefinition WOODEN_MULTIBLOCK_TANK = registerMultiblockTank( + "wooden_multiblock_tank", "Wooden Multiblock Tank", 250 * 1000, + CASING_WOOD_WALL, WOODEN_TANK_VALVE::getBlock, + new PropertyFluidFilter(340, false, false, false, false), + (builder, overlay) -> builder.sidedWorkableCasingRenderer("block/casings/wood_wall", overlay, false) + ); + + public static final MachineDefinition STEEL_TANK_VALVE = registerTankValve( + "steel_tank_valve", "Steel Tank Valve", true, + (builder, overlay) -> builder.workableCasingRenderer(GTCEu.id("block/casings/solid/machine_casing_solid_steel"), overlay, false) + ); + public static final MultiblockMachineDefinition STEEL_MULTIBLOCK_TANK = registerMultiblockTank( + "steel_multiblock_tank", "Steel Multiblock Tank", 1000 * 1000, + CASING_STEEL_SOLID, STEEL_TANK_VALVE::getBlock, + null, + (builder, overlay) -> builder.workableCasingRenderer(GTCEu.id("block/casings/solid/machine_casing_solid_steel"), overlay, false) + ); + public static MachineDefinition WOODEN_CRATE = registerCrate(GTMaterials.Wood, 27, "Wooden Crate"); public static MachineDefinition BRONZE_CRATE = registerCrate(GTMaterials.Bronze, 54, "Bronze Crate"); public static MachineDefinition STEEL_CRATE = registerCrate(GTMaterials.Steel, 72, "Steel Crate"); @@ -1904,6 +1931,56 @@ public static MultiblockMachineDefinition[] registerTieredMultis(String name, return definitions; } + private static MachineDefinition registerTankValve( + String name, String displayName, boolean isMetal, + BiConsumer rendererSetup + ) { + MachineBuilder builder = REGISTRATE.machine(name, holder -> new TankValvePartMachine(holder, isMetal)) + .langValue(displayName) + .tooltips(Component.translatable("gtceu.machine.tank_valve.tooltip")) + .rotationState(RotationState.ALL) + .compassSections(GTCompassSections.MULTIBLOCK) + .compassNode("tank_valve"); + + rendererSetup.accept(builder, GTCEu.id("block/multiblock/tank_valve")); + return builder.register(); + } + + private static MultiblockMachineDefinition registerMultiblockTank( + String name, String displayName, int capacity, + Supplier casing, Supplier valve, + @Nullable PropertyFluidFilter filter, + BiConsumer rendererSetup + ) { + MultiblockMachineBuilder builder = REGISTRATE.multiblock(name, holder -> new MultiblockTankMachine(holder, capacity, filter)) + .langValue(displayName) + .tooltips( + Component.translatable("gtceu.machine.multiblock.tank.tooltip"), + Component.translatable("gtceu.universal.tooltip.fluid_storage_capacity", capacity) + ) + .rotationState(RotationState.NON_Y_AXIS) + .recipeType(DUMMY_RECIPES) + .pattern(definition -> FactoryBlockPattern.start() + .aisle("CCC", "CCC", "CCC") + .aisle("CCC", "C#C", "CCC") + .aisle("CCC", "CSC", "CCC") + .where('S', controller(blocks(definition.get()))) + .where('C', blocks(casing.get()) + .or(blocks(valve.get()).setMaxGlobalLimited(2, 0)) + ) + .where('#', air()) + .build() + ) + + .appearanceBlock(casing) + .compassSections(GTCompassSections.MULTIBLOCK) + .compassNode("multiblock_tank"); + + rendererSetup.accept(builder, GTCEu.id("block/multiblock/multiblock_tank")); + return builder.register(); + } + + public static MultiblockMachineDefinition registerLargeBoiler(String name, Supplier casing, Supplier pipe, Supplier fireBox, ResourceLocation texture, BoilerFireboxType firebox, int maxTemperature, int heatSpeed) { return REGISTRATE.multiblock("%s_large_boiler".formatted(name), holder -> new LargeBoilerMachine(holder, maxTemperature, heatSpeed)) .langValue("Large %s Boiler".formatted(FormattingUtil.toEnglishName(name))) diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/MultiblockTankMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/MultiblockTankMachine.java new file mode 100644 index 0000000000..28df9f2c25 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/MultiblockTankMachine.java @@ -0,0 +1,92 @@ +package com.gregtechceu.gtceu.common.machine.multiblock.electric; + +import com.gregtechceu.gtceu.api.capability.recipe.IO; +import com.gregtechceu.gtceu.api.fluids.PropertyFluidFilter; +import com.gregtechceu.gtceu.api.gui.GuiTextures; +import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; +import com.gregtechceu.gtceu.api.machine.feature.IFancyUIMachine; +import com.gregtechceu.gtceu.api.machine.multiblock.MultiblockControllerMachine; +import com.gregtechceu.gtceu.api.machine.trait.NotifiableFluidTank; +import com.lowdragmc.lowdraglib.gui.widget.*; +import com.lowdragmc.lowdraglib.side.fluid.FluidHelper; +import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; +import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder; +import lombok.Getter; +import net.minecraft.MethodsReturnNonnullByDefault; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +public class MultiblockTankMachine extends MultiblockControllerMachine implements IFancyUIMachine { + @Persisted @Getter @NotNull + private final NotifiableFluidTank tank; + + public MultiblockTankMachine(IMachineBlockEntity holder, int capacity, @Nullable PropertyFluidFilter filter, Object... args) { + super(holder); + + this.tank = createTank(capacity, filter, args); + } + + protected NotifiableFluidTank createTank(int capacity, @Nullable PropertyFluidFilter filter, Object... args) { + var fluidTank = new NotifiableFluidTank(this, 1, capacity, IO.BOTH); + + if (filter != null) + fluidTank.setFilter(filter); + + return fluidTank; + } + + @Override + public InteractionResult onUse(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + var superResult = super.onUse(state, world, pos, player, hand, hit); + + if (superResult != InteractionResult.PASS) return superResult; + if (!isFormed()) return InteractionResult.FAIL; + + return InteractionResult.PASS; // Otherwise let MetaMachineBlock.use() open the UI + } + + ///////////////////////////////////// + //*********** GUI ***********// + ///////////////////////////////////// + + @Override + public Widget createUIWidget() { + var group = new WidgetGroup(0, 0, 90, 63); + group.setBackground(GuiTextures.BACKGROUND_INVERSE); + + group.addWidget(new ImageWidget(4, 4, 82, 55, GuiTextures.DISPLAY)); + group.addWidget(new LabelWidget(8, 8, "gtceu.gui.fluid_amount")); + group.addWidget(new LabelWidget(8, 18, this::getFluidLabel).setTextColor(-1).setDropShadow(true)); + group.addWidget(new TankWidget(tank.getStorages()[0], 68, 23, true, true) + .setBackground(GuiTextures.FLUID_SLOT) + ); + + return group; + } + + private String getFluidLabel() { + return String.valueOf(tank.getFluidInTank(0).getAmount() / (FluidHelper.getBucket() / 1000)); + } + + ////////////////////////////////////// + //***** LDLib SyncData ******// + ////////////////////////////////////// + + public static final ManagedFieldHolder MANAGED_FIELD_HOLDER = new ManagedFieldHolder(MultiblockTankMachine.class, MultiblockControllerMachine.MANAGED_FIELD_HOLDER); + + @Override + public ManagedFieldHolder getFieldHolder() { + return MANAGED_FIELD_HOLDER; + } +} diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/TankValvePartMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/TankValvePartMachine.java new file mode 100644 index 0000000000..67986ab361 --- /dev/null +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/TankValvePartMachine.java @@ -0,0 +1,109 @@ +package com.gregtechceu.gtceu.common.machine.multiblock.part; + +import com.gregtechceu.gtceu.api.capability.recipe.IO; +import com.gregtechceu.gtceu.api.machine.ConditionalSubscriptionHandler; +import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; +import com.gregtechceu.gtceu.api.machine.feature.multiblock.IMultiController; +import com.gregtechceu.gtceu.api.machine.multiblock.part.MultiblockPartMachine; +import com.gregtechceu.gtceu.api.machine.trait.FluidTankProxyTrait; +import com.gregtechceu.gtceu.common.machine.multiblock.electric.MultiblockTankMachine; +import com.lowdragmc.lowdraglib.side.fluid.FluidTransferHelper; +import com.lowdragmc.lowdraglib.side.fluid.IFluidTransfer; +import com.lowdragmc.lowdraglib.syncdata.ISubscription; +import net.minecraft.MethodsReturnNonnullByDefault; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.Block; +import org.jetbrains.annotations.Nullable; + +import javax.annotation.ParametersAreNonnullByDefault; + +@MethodsReturnNonnullByDefault +@ParametersAreNonnullByDefault +public class TankValvePartMachine extends MultiblockPartMachine { + private FluidTankProxyTrait tankProxy; + private ConditionalSubscriptionHandler autoIOSubscription; + private ISubscription tankChangeListener; + + public TankValvePartMachine(IMachineBlockEntity holder, boolean isMetal, Object... args) { + super(holder); + + tankProxy = createTank(args); + autoIOSubscription = new ConditionalSubscriptionHandler(this, this::autoIO, this::shouldAutoIO); + } + + protected FluidTankProxyTrait createTank(Object... args) { + return new FluidTankProxyTrait(this, IO.BOTH); + } + + @Override + public boolean canShared() { + return false; + } + + @Override + public void onUnload() { + super.onUnload(); + autoIOSubscription.updateSubscription(); + } + + @Override + public void addedToController(IMultiController controller) { + super.addedToController(controller); + + if (controller instanceof MultiblockTankMachine multiblockTank) { + tankProxy.setProxy(multiblockTank.getTank()); + unsubscribeChanges(); + tankChangeListener = multiblockTank.getTank().addChangedListener(autoIOSubscription::updateSubscription); + } + autoIOSubscription.updateSubscription(); + } + + @Override + public void removedFromController(IMultiController controller) { + super.removedFromController(controller); + + tankProxy.setProxy(null); + autoIOSubscription.updateSubscription(); + unsubscribeChanges(); + } + + private void unsubscribeChanges() { + if (tankChangeListener != null) + tankChangeListener.unsubscribe(); + } + + @Override + public void onRotated(Direction oldFacing, Direction newFacing) { + super.onRotated(oldFacing, newFacing); + autoIOSubscription.updateSubscription(); + } + + @Override + public void onNeighborChanged(Block block, BlockPos fromPos, boolean isMoving) { + super.onNeighborChanged(block, fromPos, isMoving); + autoIOSubscription.updateSubscription(); + } + + @Nullable + private IFluidTransfer getTargetTank() { + return FluidTransferHelper.getFluidTransfer(getLevel(), getPos().relative(getFrontFacing()), getFrontFacing().getOpposite()); + } + + private void autoIO() { + if (getOffsetTimer() % 5 == 0) { + tankProxy.exportToNearby(getFrontFacing()); + } + + autoIOSubscription.updateSubscription(); + } + + private Boolean shouldAutoIO() { + if (getControllers().isEmpty()) return false; + if (getFrontFacing() != Direction.DOWN) return false; + if (tankProxy.isEmpty()) return false; + if (getTargetTank() == null) return false; + + return true; + } +} diff --git a/src/main/resources/assets/gtceu/textures/block/multiblock/tank_valve/overlay_front.png b/src/main/resources/assets/gtceu/textures/block/multiblock/tank_valve/overlay_front.png new file mode 100644 index 0000000000000000000000000000000000000000..c6f18b0f2d389adc9d3ac4105d87eb287b0dd929 GIT binary patch literal 1863 zcmbVNZD`zN98cA1txk4S(J9W5f^KZNJW1{?v1h$rYI}3(+pcS^hB_i%G6` zR~)!1XhFd-6&YKg}6ctnVL)AU@msD2bRrM=m5wdfsrvQk1Ijig@fzGZa~YxVb15^9+)s@&Fk( zZA1qBAzEPrK{71(*$^KPgzY2;*a!n649nAONDKgxI6$a&zjttkqShj(+vZiY~S@RmyjpeHh z;Lyr)!^WCgbiHB1al6N{8?}I}iFT4@3o%2;F$=bWy2r81cF!A2jN1shrkym+d_7SE zb;)Er?j=Sbw~T0pY8IWXtM(uXx+qF{>onkLAS5{;1~@S&Yy%MyfGSirRV`g!4Gqv- zILY!DA+n*Xptx#O=)(U6tBRO5Z5?8tH63OUV;LEWY(!Fwn|ag5hOs(+^?V{8AF$1| zmd6XuP)`?`=#Gb2ArzuHKU{=P~WfO{Q-~)hlFsL1}p-!fC3zyQo|h02ZIm_f|5co zQn%l4Yxoqx{0;MXXVWVmu~&0&V#~GDvkN^}8|5{!QZXV_yps^66t4u3O4X*dH6pM+ z5301qEW)JMsf#MiG1G1l+9;O6(OOUGG1t=X!13#=Utj+ItA5Q=y+QT0;3`>YWDsty z4CVR5cx|Yf8s^_wtE{bRS#>z>gWj;wfbmD8g(Cw~+qgk*o_^^sf@o?=NU>z(wbKV< z<0rwL(uwUqCT34g=d3Z~iz8&yljmAH#}3`|)Ax@q^z&ERpXLts@4o!*73P-n1xGw` z{Ef+1-q#=aX!m>pJu^ZqKImJrKmGc>o6=uhe*R&8aCj`Yc%is=X8Fw4qgKb}OTLfw zvzzv&|0s2U4+a;<+Nq1pvp;O}?LWrJZNz8AB_i%G6` zR~)!1XhFd-6&YKg}6ctnVL)AU@msD2bRrM=m5wdfsrvQk1Ijig@fzGZa~YxVb15^9+)s@&Fk( zZA1qBAzEPrK{71(*$^KPgzY2;*a!n649nAONDKgxI6$a&zjttkqShj(+vZiY~S@RmyjpeHh z;Lyr)!^WCgbiHB1al6N{8?}I}iFT4@3o%2;F$=bWy2r81cF!A2jN1shrkym+d_7SE zb;)Er?j=Sbw~T0pY8IWXtM(uXx+qF{>onkLAS5{;1~@S&Yy%MyfGSirRV`g!4Gqv- zILY!DA+n*Xptx#O=)(U6tBRO5Z5?8tH63OUV;LEWY(!Fwn|ag5hOs(+^?V{8AF$1| zmd6XuP)`?`=#Gb2ArzuHKU{=P~WfO{Q-~)hlFsL1}p-!fC3zyQo|h02ZIm_f|5co zQn%l4Yxoqx{0;MXXVWVmu~&0&V#~GDvkN^}8|5{!QZXV_yps^66t4u3O4X*dH6pM+ z5301qEW)JMsf#MiG1G1l+9;O6(OOUGG1t=X!13#=Utj+ItA5Q=y+QT0;3`>YWDsty z4CVR5cx|Yf8s^_wtE{bRS#>z>gWj;wfbmD8g(Cw~+qgk*o_^^sf@o?=NU>z(wbKV< z<0rwL(uwUqCT34g=d3Z~iz8&yljmAH#}3`|)Ax@q^z&ERpXLts@4o!*73P-n1xGw` z{Ef+1-q#=aX!m>pJu^ZqKImJrKmGc>o6=uhe*R&8aCj`Yc%is=X8Fw4qgKb}OTLfw zvzzv&|0s2U4+a;<+Nq1pvp;O}?LWrJZNz8A Date: Mon, 8 Apr 2024 17:11:17 +0800 Subject: [PATCH 4/7] fixes --- gradle/scripts/dependencies.gradle | 4 +-- settings.gradle | 2 +- .../gtceu/api/recipe/content/Content.java | 29 +++++++++++++++++++ .../gtceu/api/recipe/ui/GTRecipeTypeUI.java | 2 +- .../gtceu/integration/GTRecipeWidget.java | 4 +-- .../gtceu/integration/emi/GTEMIPlugin.java | 3 +- .../emi/recipe/GTEmiRecipeHandler.java | 16 ++++------ src/main/resources/gtceu.mixins.json | 1 - 8 files changed, 42 insertions(+), 19 deletions(-) diff --git a/gradle/scripts/dependencies.gradle b/gradle/scripts/dependencies.gradle index 900361b28a..512126703b 100644 --- a/gradle/scripts/dependencies.gradle +++ b/gradle/scripts/dependencies.gradle @@ -42,11 +42,11 @@ dependencies { // REI modCompileOnly forge.rei.plugin modCompileOnly forge.rei.api - modImplementation forge.rei.forge + modCompileOnly forge.rei.forge // EMI modCompileOnly("dev.emi:emi-forge:${forge.versions.emi.get()}:api") - modCompileOnly forge.emi + modImplementation forge.emi // TOP modCompileOnly(forge.theoneprobe) { transitive = false } diff --git a/settings.gradle b/settings.gradle index 043dc02333..24b9fbb306 100644 --- a/settings.gradle +++ b/settings.gradle @@ -43,7 +43,7 @@ dependencyResolutionManagement { def vineFlowerVersion = "1.+" def macheteVersion = "1.+" def configurationVersion = "2.2.0" - def ldLibVersion = "1.0.25.a" + def ldLibVersion = "1.0.25.b" def mixinextrasVersion = "0.2.0" def shimmerVersion = "0.2.2" diff --git a/src/main/java/com/gregtechceu/gtceu/api/recipe/content/Content.java b/src/main/java/com/gregtechceu/gtceu/api/recipe/content/Content.java index f09da029ce..adca4289df 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/recipe/content/Content.java +++ b/src/main/java/com/gregtechceu/gtceu/api/recipe/content/Content.java @@ -1,14 +1,20 @@ package com.gregtechceu.gtceu.api.recipe.content; import com.gregtechceu.gtceu.api.capability.recipe.RecipeCapability; +import com.gregtechceu.gtceu.api.recipe.ingredient.FluidIngredient; +import com.lowdragmc.lowdraglib.LDLib; import com.lowdragmc.lowdraglib.gui.texture.IGuiTexture; +import com.lowdragmc.lowdraglib.side.fluid.FluidStack; import com.lowdragmc.lowdraglib.utils.LocalizationUtils; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; +import dev.emi.emi.screen.RecipeScreen; import lombok.Getter; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -46,6 +52,9 @@ public IGuiTexture createOverlay(boolean perTick) { @OnlyIn(Dist.CLIENT) public void draw(GuiGraphics graphics, int mouseX, int mouseY, float x, float y, int width, int height) { drawChance(graphics, x, y, width, height); + if (LDLib.isEmiLoaded()) { + drawEmiAmount(graphics, x, y, width, height); + } if (perTick) { drawTick(graphics, x, y, width, height); } @@ -53,6 +62,26 @@ public void draw(GuiGraphics graphics, int mouseX, int mouseY, float x, float y, }; } + @OnlyIn(Dist.CLIENT) + public void drawEmiAmount(GuiGraphics graphics, float x, float y, int width, int height) { + if (content instanceof FluidIngredient ingredient) { + graphics.pose().pushPose(); + graphics.pose().translate(0, 0, 400); + graphics.pose().scale(0.5f, 0.5f, 1); + long amount = ingredient.getAmount(); + String s; + if (amount >= 1000) { + amount /= 1000; + s = amount + "B"; + } else { + s = amount + "mB"; + } + Font fontRenderer = Minecraft.getInstance().font; + graphics.drawString(fontRenderer, s, (int) ((x + (width / 3f)) * 2 - fontRenderer.width(s) + 21), (int) ((y + (height / 3f) + 6) * 2), 0xFFFFFF, true); + graphics.pose().popPose(); + } + } + @OnlyIn(Dist.CLIENT) public void drawChance(GuiGraphics graphics, float x, float y, int width, int height) { if (chance == 1) return; diff --git a/src/main/java/com/gregtechceu/gtceu/api/recipe/ui/GTRecipeTypeUI.java b/src/main/java/com/gregtechceu/gtceu/api/recipe/ui/GTRecipeTypeUI.java index dcfdc24931..3c1da243b8 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/recipe/ui/GTRecipeTypeUI.java +++ b/src/main/java/com/gregtechceu/gtceu/api/recipe/ui/GTRecipeTypeUI.java @@ -211,7 +211,7 @@ public IEditableUI createEditableUITemplate(final boo progressWidget.setProgressSupplier(recipeHolder.progressSupplier); progress.add(progressWidget); }); - // Then set the dual progress widgets, to override their builtin ones' suppliers, in case someone forgot to remove the id from the internal ones. + // Then set the dual-progress widgets, to override their builtin ones' suppliers, in case someone forgot to remove the id from the internal ones. WidgetUtils.widgetByIdForEach(template, "^progress$", DualProgressWidget.class, dualProgressWidget -> { dualProgressWidget.setProgressSupplier(recipeHolder.progressSupplier); progress.add(dualProgressWidget); diff --git a/src/main/java/com/gregtechceu/gtceu/integration/GTRecipeWidget.java b/src/main/java/com/gregtechceu/gtceu/integration/GTRecipeWidget.java index 1891d07fbe..ca252a419a 100644 --- a/src/main/java/com/gregtechceu/gtceu/integration/GTRecipeWidget.java +++ b/src/main/java/com/gregtechceu/gtceu/integration/GTRecipeWidget.java @@ -415,7 +415,7 @@ private void setTierToMin() { setTier(getMinTier()); } - // Maps ingredients to Either<(Tag with count), ItemStack>s + // Maps ingredients to Either <(Tag with count), ItemStack>s @SuppressWarnings("deprecation") private static Either, Integer>>, List> mapItem(Ingredient ingredient) { if (ingredient instanceof SizedIngredient sizedIngredient) { @@ -504,7 +504,7 @@ private static Either, Integer>>, List> mapIte return Either.right(Arrays.stream(ingredient.getItems()).toList()); } - // Maps fluids to Either<(tag with count), ItemStack>s + // Maps fluids to Either <(tag with count), ItemStack>s private static Either, Long>>, List> mapFluid(FluidIngredient ingredient) { long amount = ingredient.getAmount(); CompoundTag tag = ingredient.getNbt(); diff --git a/src/main/java/com/gregtechceu/gtceu/integration/emi/GTEMIPlugin.java b/src/main/java/com/gregtechceu/gtceu/integration/emi/GTEMIPlugin.java index 1e2e72463e..767152ce37 100644 --- a/src/main/java/com/gregtechceu/gtceu/integration/emi/GTEMIPlugin.java +++ b/src/main/java/com/gregtechceu/gtceu/integration/emi/GTEMIPlugin.java @@ -12,6 +12,7 @@ import com.gregtechceu.gtceu.integration.emi.recipe.Ae2PatternTerminalHandler; import com.gregtechceu.gtceu.integration.emi.recipe.GTEmiRecipeHandler; import com.gregtechceu.gtceu.integration.emi.recipe.GTRecipeTypeEmiCategory; +import com.lowdragmc.lowdraglib.gui.modular.ModularUIContainer; import dev.emi.emi.api.EmiEntrypoint; import dev.emi.emi.api.EmiPlugin; import dev.emi.emi.api.EmiRegistry; @@ -41,7 +42,7 @@ public void register(EmiRegistry registry) { } } } - registry.addRecipeHandler(null, new GTEmiRecipeHandler()); + registry.addRecipeHandler(ModularUIContainer.MENUTYPE, new GTEmiRecipeHandler()); if(GTCEu.isAE2Loaded()){ registry.addRecipeHandler(PatternEncodingTermMenu.TYPE, new Ae2PatternTerminalHandler<>()); } diff --git a/src/main/java/com/gregtechceu/gtceu/integration/emi/recipe/GTEmiRecipeHandler.java b/src/main/java/com/gregtechceu/gtceu/integration/emi/recipe/GTEmiRecipeHandler.java index 5d0d3c214f..d3be2d3f7d 100644 --- a/src/main/java/com/gregtechceu/gtceu/integration/emi/recipe/GTEmiRecipeHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/integration/emi/recipe/GTEmiRecipeHandler.java @@ -10,24 +10,18 @@ import java.util.List; -public class GTEmiRecipeHandler implements StandardRecipeHandler { +public class GTEmiRecipeHandler implements StandardRecipeHandler { @Override - public List getInputSources(AbstractContainerMenu handler) { - if (!(handler instanceof ModularUIContainer)) - return List.of(); - - return ((ModularUIContainer) handler).getModularUI().getSlotMap().values().stream() + public List getInputSources(ModularUIContainer handler) { + return handler.getModularUI().getSlotMap().values().stream() .filter(e -> e.getIngredientIO() == IngredientIO.INPUT || e.isPlayerContainer || e.isPlayerHotBar) .map(SlotWidget::getHandler) .toList(); } @Override - public List getCraftingSlots(AbstractContainerMenu handler) { - if (!(handler instanceof ModularUIContainer)) - return List.of(); - - return ((ModularUIContainer) handler).getModularUI().getSlotMap().values().stream() + public List getCraftingSlots(ModularUIContainer handler) { + return handler.getModularUI().getSlotMap().values().stream() .filter(e -> e.getIngredientIO() == IngredientIO.INPUT) .map(SlotWidget::getHandler) .toList(); diff --git a/src/main/resources/gtceu.mixins.json b/src/main/resources/gtceu.mixins.json index 1d1fcc38b3..72f4810a0e 100644 --- a/src/main/resources/gtceu.mixins.json +++ b/src/main/resources/gtceu.mixins.json @@ -44,7 +44,6 @@ "TagValueAccessor", "ae2.GenericStackInvAccessor", "create.RotationPropagatorMixin", - "emi.EmiRecipeHandlerMixin", "emi.FluidEmiStackMixin", "jei.FluidHelperMixin", "rei.InputSlotCrafterMixin", From 0cc741dd6a6468e73bd0f1a2254a1e7086012f70 Mon Sep 17 00:00:00 2001 From: Arborsm Date: Mon, 8 Apr 2024 17:14:56 +0800 Subject: [PATCH 5/7] back REI --- gradle/scripts/dependencies.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/scripts/dependencies.gradle b/gradle/scripts/dependencies.gradle index 512126703b..900361b28a 100644 --- a/gradle/scripts/dependencies.gradle +++ b/gradle/scripts/dependencies.gradle @@ -42,11 +42,11 @@ dependencies { // REI modCompileOnly forge.rei.plugin modCompileOnly forge.rei.api - modCompileOnly forge.rei.forge + modImplementation forge.rei.forge // EMI modCompileOnly("dev.emi:emi-forge:${forge.versions.emi.get()}:api") - modImplementation forge.emi + modCompileOnly forge.emi // TOP modCompileOnly(forge.theoneprobe) { transitive = false } From bccb0ff5510f16c947828a7bd36e655b8f12a4a0 Mon Sep 17 00:00:00 2001 From: Arborsm Date: Mon, 8 Apr 2024 18:00:55 +0800 Subject: [PATCH 6/7] lang --- src/generated/resources/assets/gtceu/lang/en_us.json | 2 +- src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java | 2 +- src/main/resources/assets/gtceu/lang/ru_ru.json | 2 +- src/main/resources/assets/gtceu/lang/zh_cn.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generated/resources/assets/gtceu/lang/en_us.json b/src/generated/resources/assets/gtceu/lang/en_us.json index eb619cbb9d..d7017972f6 100644 --- a/src/generated/resources/assets/gtceu/lang/en_us.json +++ b/src/generated/resources/assets/gtceu/lang/en_us.json @@ -3292,7 +3292,7 @@ "gtceu.recipe.cleanroom_sterile.display_name": "Sterile Cleanroom", "gtceu.recipe.computation_per_tick": "Min. Computation: %s CWU/t", "gtceu.recipe.dimensions": "Dimensions: %s", - "gtceu.recipe.duration": "Duration: %,.2f secs", + "gtceu.recipe.duration": "Duration: %s secs", "gtceu.recipe.eu": "Usage: %s EU/t", "gtceu.recipe.eu_inverted": "Generation: %s EU/t", "gtceu.recipe.eu_to_start": "Energy To Start: %sEU", diff --git a/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java b/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java index 7d9f117d88..576885e425 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/data/lang/LangHandler.java @@ -770,7 +770,7 @@ public static void init(RegistrateLangProvider provider) { provider.add("gtceu.recipe.max_eu", "Max. EU: %s EU"); provider.add("gtceu.recipe.eu", "Usage: %s EU/t"); provider.add("gtceu.recipe.eu_inverted", "Generation: %s EU/t"); - provider.add("gtceu.recipe.duration", "Duration: %,.2f secs"); + provider.add("gtceu.recipe.duration", "Duration: %s secs"); provider.add("gtceu.recipe.amperage", "Amperage: %s"); provider.add("gtceu.recipe.not_consumed", "Does not get consumed in the process"); provider.add("gtceu.recipe.chance", "Chance: %s +%s/tier"); diff --git a/src/main/resources/assets/gtceu/lang/ru_ru.json b/src/main/resources/assets/gtceu/lang/ru_ru.json index e3703a4f99..534c32b3f2 100644 --- a/src/main/resources/assets/gtceu/lang/ru_ru.json +++ b/src/main/resources/assets/gtceu/lang/ru_ru.json @@ -3067,7 +3067,7 @@ "gtceu.recipe.cleanroom.display_name": "Чистая комната", "gtceu.recipe.cleanroom_sterile.display_name": "Стерильная чистая комната", "gtceu.recipe.dimensions": "Измерение: %s", - "gtceu.recipe.duration": "Длительность: %,.2f secs", + "gtceu.recipe.duration": "Длительность: %s secs", "gtceu.recipe.eu": "Потребление: %d EU/т (%s§r)", "gtceu.recipe.eu_inverted": "Производство: %d EU/т", "gtceu.recipe.eu_to_start": "Энергии для запуска: %sEU", diff --git a/src/main/resources/assets/gtceu/lang/zh_cn.json b/src/main/resources/assets/gtceu/lang/zh_cn.json index 9c856a2726..91a99da2df 100644 --- a/src/main/resources/assets/gtceu/lang/zh_cn.json +++ b/src/main/resources/assets/gtceu/lang/zh_cn.json @@ -3132,7 +3132,7 @@ "gtceu.recipe.cleanroom.display_name":"超净间", "gtceu.recipe.cleanroom_sterile.display_name":"无菌超净间", "gtceu.recipe.dimensions":"维度:%s", - "gtceu.recipe.duration":"耗时:%,.2f秒", + "gtceu.recipe.duration":"耗时:%s秒", "gtceu.recipe.eu":"耗能功率:%s EU/t", "gtceu.recipe.eu_inverted":"产能功率:%s EU/t", "gtceu.recipe.eu_to_start":"启动耗能:%s EU", From 721b90c07132e2130583df4f8a2e7124f42e6f3e Mon Sep 17 00:00:00 2001 From: Arborsm Date: Mon, 8 Apr 2024 18:19:36 +0800 Subject: [PATCH 7/7] fix emi PatternPreviewWidget --- .../gtceu/api/gui/widget/PatternPreviewWidget.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/api/gui/widget/PatternPreviewWidget.java b/src/main/java/com/gregtechceu/gtceu/api/gui/widget/PatternPreviewWidget.java index d53426216b..44280bd194 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/gui/widget/PatternPreviewWidget.java +++ b/src/main/java/com/gregtechceu/gtceu/api/gui/widget/PatternPreviewWidget.java @@ -21,7 +21,7 @@ import com.lowdragmc.lowdraglib.utils.ItemStackKey; import com.lowdragmc.lowdraglib.utils.TrackedDummyWorld; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; +import dev.emi.emi.screen.RecipeScreen; import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.longs.LongSets; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -39,7 +39,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.NotNull; import java.util.*; import java.util.List; import java.util.stream.Collectors; @@ -52,6 +51,7 @@ */ @OnlyIn(Dist.CLIENT) public class PatternPreviewWidget extends WidgetGroup { + private int i; private static TrackedDummyWorld LEVEL; private static BlockPos LAST_POS = new BlockPos(0, 50, 0); private static final Map CACHE = new HashMap<>(); @@ -243,6 +243,11 @@ public static BlockPos locateNextRegion(int range) { @Override public void updateScreen() { super.updateScreen(); + // I can only think of this way + if (LDLib.isEmiLoaded() && Minecraft.getInstance().screen instanceof RecipeScreen && i == 0) { + setPage(i); + ++i; + } } @Override