Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,018 changes: 728 additions & 290 deletions src/generated/resources/assets/ctnhcore/lang/en_ud.json

Large diffs are not rendered by default.

1,018 changes: 728 additions & 290 deletions src/generated/resources/assets/ctnhcore/lang/en_us.json

Large diffs are not rendered by default.

858 changes: 433 additions & 425 deletions src/generated/resources/assets/ctnhcore/lang/zh_cn.json

Large diffs are not rendered by default.

149 changes: 149 additions & 0 deletions src/main/java/io/github/cpearl0/ctnhcore/CTNHConfig.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
package io.github.cpearl0.ctnhcore;
import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang;
import com.ctnhlang.CN;
import com.ctnhlang.EN;
import com.ctnhlang.Key;

import dev.toma.configuration.Configuration;
import dev.toma.configuration.config.Config;
Expand All @@ -8,6 +12,151 @@
@Config(id = CTNHCore.MODID)
public class CTNHConfig {

@Key("config.ctnhcore.option.centrifugeRpmRequirement")
@CN("机械离心厂最低转速需求")
@EN("Mechanical Centrifuge minimum RPM")
public static Lang configOptionCentrifugeRpmRequirement;


@Key("config.ctnhcore.option.centrifugeSpeedMultiplier")
@CN("机械离心厂加速倍率")
@EN("Mechanical Centrifuge speed multiplier")
public static Lang configOptionCentrifugeSpeedMultiplier;


@Key("config.ctnhcore.option.centrifugeStressRequirement")
@CN("机械离心厂应力消耗")
@EN("Mechanical Centrifuge stress consumption")
public static Lang configOptionCentrifugeStressRequirement;


@Key("config.ctnhcore.option.enableFTBUltimineOnGTOres")
@CN("开启GT矿物连锁")
@EN("Enable GT ore vein mining")
public static Lang configOptionEnableFtbUltimineOnGtOres;


@Key("config.ctnhcore.option.extractorRpmRequirement")
@CN("机械提取厂最低转速需求")
@EN("Mechanical Extractor minimum RPM")
public static Lang configOptionExtractorRpmRequirement;


@Key("config.ctnhcore.option.extractorSpeedMultiplier")
@CN("机械提取厂加速倍率")
@EN("Mechanical Extractor speed multiplier")
public static Lang configOptionExtractorSpeedMultiplier;


@Key("config.ctnhcore.option.extractorStressRequirement")
@CN("机械提取厂应力消耗")
@EN("Mechanical Extractor stress consumption")
public static Lang configOptionExtractorStressRequirement;


@Key("config.ctnhcore.option.ftbPlugin")
@CN("FTB相关")
@EN("FTB Options")
public static Lang configOptionFtbPlugin;


@Key("config.ctnhcore.option.kinetic")
@CN("应力相关")
@EN("Kinetic Options")
public static Lang configOptionKinetic;


@Key("config.ctnhcore.option.laserRpmRequirement")
@CN("机械激光厂最低转速需求")
@EN("Mechanical Laser minimum RPM")
public static Lang configOptionLaserRpmRequirement;


@Key("config.ctnhcore.option.laserSpeedMultiplier")
@CN("机械激光厂加速倍率")
@EN("Mechanical Laser speed multiplier")
public static Lang configOptionLaserSpeedMultiplier;


@Key("config.ctnhcore.option.laserStressRequirement")
@CN("机械激光厂应力消耗")
@EN("Mechanical Laser stress consumption")
public static Lang configOptionLaserStressRequirement;


@Key("config.ctnhcore.option.latheRpmRequirement")
@CN("机械车床厂最低转速需求")
@EN("Mechanical Lathe minimum RPM")
public static Lang configOptionLatheRpmRequirement;


@Key("config.ctnhcore.option.latheSpeedMultiplier")
@CN("机械车床厂加速倍率")
@EN("Mechanical Lathe speed multiplier")
public static Lang configOptionLatheSpeedMultiplier;


@Key("config.ctnhcore.option.latheStressRequirement")
@CN("机械车床厂应力消耗")
@EN("Mechanical Lathe stress consumption")
public static Lang configOptionLatheStressRequirement;


@Key("config.ctnhcore.option.mixerRpmRequirement")
@CN("机械搅拌厂最低转速需求")
@EN("Mechanical Mixer minimum RPM")
public static Lang configOptionMixerRpmRequirement;


@Key("config.ctnhcore.option.mixerSpeedMultiplier")
@CN("机械搅拌厂加速倍率")
@EN("Mechanical Mixer speed multiplier")
public static Lang configOptionMixerSpeedMultiplier;


@Key("config.ctnhcore.option.mixerStressRequirement")
@CN("机械搅拌厂应力消耗")
@EN("Mechanical Mixer stress consumption")
public static Lang configOptionMixerStressRequirement;


@Key("config.ctnhcore.option.pressorRpmRequirement")
@CN("机械辊压厂最低转速需求")
@EN("Mechanical Pressor minimum RPM")
public static Lang configOptionPressorRpmRequirement;


@Key("config.ctnhcore.option.pressorSpeedMultiplier")
@CN("机械辊压厂加速倍率")
@EN("Mechanical Pressor speed multiplier")
public static Lang configOptionPressorSpeedMultiplier;


@Key("config.ctnhcore.option.pressorStressRequirement")
@CN("机械辊压厂应力消耗")
@EN("Mechanical Pressor stress consumption")
public static Lang configOptionPressorStressRequirement;


@Key("config.ctnhcore.option.sifterRpmRequirement")
@CN("机械筛选厂最低转速需求")
@EN("Mechanical Sifter minimum RPM")
public static Lang configOptionSifterRpmRequirement;


@Key("config.ctnhcore.option.sifterSpeedMultiplier")
@CN("机械筛选厂加速倍率")
@EN("Mechanical Sifter speed multiplier")
public static Lang configOptionSifterSpeedMultiplier;


@Key("config.ctnhcore.option.sifterStressRequirement")
@CN("机械筛选厂应力消耗")
@EN("Mechanical Sifter stress consumption")
public static Lang configOptionSifterStressRequirement;



public static CTNHConfig INSTANCE;
private static final Object LOCK = new Object();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package io.github.cpearl0.ctnhcore.api.Pattern;
import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang;
import com.ctnhlang.CN;
import com.ctnhlang.EN;

import io.github.cpearl0.ctnhcore.common.block.PhotovoltaicBlock;
import io.github.cpearl0.ctnhcore.common.block.SpaceStructuralFramework;
Expand Down Expand Up @@ -26,6 +29,12 @@

public class CTNHPredicates {

@CN("§c必须使用同种光伏方块")
@EN("§cAll photovoltaic blocks must be the same type")
public static Lang spacePhotovoltaicBaseStationJeiErrorPvBlock;



public static TraceabilityPredicate PhotovoltaicBlock() {
return (new TraceabilityPredicate((blockWorldState) -> {
BlockState blockState = blockWorldState.getBlockState();
Expand All @@ -50,7 +59,7 @@ public static TraceabilityPredicate PhotovoltaicBlock() {
.fromBlockState(((PhotovoltaicBlock) ((Supplier) pb.getValue()).get()).defaultBlockState()))
.toArray((x$0) -> new BlockInfo[x$0])))
.addTooltips(new Component[] {
Component.translatable("ctnh.spacephotovoltaicbasestation.jei.error.pv_block") });
spacePhotovoltaicBaseStationJeiErrorPvBlock.translate() });
}

public static TraceabilityPredicate SpaceStructuralFrameworkBlock() {
Expand All @@ -76,7 +85,7 @@ public static TraceabilityPredicate SpaceStructuralFrameworkBlock() {
.sorted(Comparator.comparingInt((value) -> value.getKey().getTier()))
.map((pb) -> BlockInfo.fromBlockState((pb.getValue()).get().defaultBlockState()))
.toArray(BlockInfo[]::new)))
.addTooltips(Component.translatable("ctnh.spacephotovoltaicbasestation.jei.error.pv_block"));
.addTooltips(spacePhotovoltaicBaseStationJeiErrorPvBlock.translate());
}

static TraceabilityPredicate autoLaserAbilities(GTRecipeType... recipeType) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package io.github.cpearl0.ctnhcore.common.gui;
import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang;
import com.ctnhlang.CN;
import com.ctnhlang.EN;

import io.github.cpearl0.ctnhcore.common.machine.multiblock.electric.CryotheumFreezer;
import io.github.cpearl0.ctnhcore.registry.CTNHGuiTextures;
Expand All @@ -20,6 +23,27 @@

public class MachineModeFancyConfiguratorTest implements IFancyUIProvider {

@CN("当前冷冻机加速:%.2f / %.2f")
@EN("Current freezer speed: %.2f / %.2f")
public static Lang cryotheumFreezerUi1;


@CN("打开升级面板")
@EN("Open Upgrade Panel")
public static Lang cryotheumFreezerUi2;


@CN("当前能量利用效率:%.2f / %.2f")
@EN("Current energy efficiency: %.2f / %.2f")
public static Lang cryotheumFreezerUi3;


@CN("当前并行:%d / %d")
@EN("Current parallelism: %d / %d")
public static Lang cryotheumFreezerUi4;



protected CryotheumFreezer machine;

public MachineModeFancyConfiguratorTest(IRecipeLogicMachine machine) {
Expand All @@ -38,15 +62,15 @@ public IGuiTexture getTabIcon() {
}

public MutableComponent target() {
return Component.translatable("ctnh.multiblock.cryotheum_freezer.ui.1", machine.speed_up, 3.5);
return cryotheumFreezerUi1.translate( machine.speed_up, 3.5);
}

public MutableComponent target2() {
return Component.translatable("ctnh.multiblock.cryotheum_freezer.ui.3", machine.energy_muti, 3.5);
return cryotheumFreezerUi3.translate( machine.energy_muti, 3.5);
}

public MutableComponent target3() {
return Component.translatable("ctnh.multiblock.cryotheum_freezer.ui.4", 2 * Math.pow(2, machine.parallel_muti),
return cryotheumFreezerUi4.translate( 2 * Math.pow(2, machine.parallel_muti),
2 * Math.pow(2, 10));
}

Expand Down Expand Up @@ -174,7 +198,7 @@ public Widget createMainPage(FancyMachineUIWidget widget) {
@Override
public List<Component> getTabTooltips() {
List<Component> tooltip = new ArrayList<>();
tooltip.add(Component.translatable("ctnh.multiblock.cryotheum_freezer.ui.2"));
tooltip.add(cryotheumFreezerUi2.translate());
return tooltip;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package io.github.cpearl0.ctnhcore.common.gui;
import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang;
import com.ctnhlang.CN;
import com.ctnhlang.EN;

import io.github.cpearl0.ctnhcore.common.machine.multiblock.electric.WideParticleAccelerator;
import io.github.cpearl0.ctnhcore.registry.CTNHBlocks;
Expand All @@ -21,6 +24,27 @@

public class WPAAcceleratorGui implements IFancyUIProvider {

@CN("电子轨道")
@EN("Electron Beamline")
public static Lang wideAcceleratorGuiElectric;


@CN("访问轨道")
@EN("Access Beamline")
public static Lang wideAcceleratorGuiName;


@CN("中子轨道")
@EN("Neutron Beamline")
public static Lang wideAcceleratorGuiNu;


@CN("原子轨道")
@EN("Proton Beamline")
public static Lang wideAcceleratorGuiProton;



protected WideParticleAccelerator machine;

public WPAAcceleratorGui(IRecipeLogicMachine machine) {
Expand All @@ -29,22 +53,22 @@ public WPAAcceleratorGui(IRecipeLogicMachine machine) {
}

public MutableComponent get_mode() {
return (Component.translatable("ctnh.multiblock.wide_accelerator.info.power",
return (WideParticleAccelerator.wideAcceleratorInfoPower.translate(
(double) machine.store_energy / 1000000, (double) machine.max_energy / 1000000));
}

public Function<Double, String> target() {
return speed -> Component.translatable("ctnh.multiblock.wide_accelerator.info.electric_speed", speed * 50000)
return speed -> WideParticleAccelerator.wideAcceleratorInfoElectricSpeed.translate( speed * 50000)
.getString();
}

public Function<Double, String> target2() {
return speed -> Component.translatable("ctnh.multiblock.wide_accelerator.info.nu_speed", speed * 50000)
return speed -> WideParticleAccelerator.wideAcceleratorInfoNuSpeed.translate( speed * 50000)
.getString();
}

public Function<Double, String> target3() {
return speed -> Component.translatable("ctnh.multiblock.wide_accelerator.info.proton_speed", speed * 50000)
return speed -> WideParticleAccelerator.wideAcceleratorInfoProtonSpeed.translate( speed * 50000)
.getString();
}

Expand Down Expand Up @@ -115,7 +139,7 @@ public Widget createMainPage(FancyMachineUIWidget widget) {
/// / 电子轨道逻辑/ ////
/// //////////////////////////
group.addWidget(new TextTextureWidget(10, 40, 40, 15)
.setText(Component.translatable("ctnh.multiblock.wide_accelerator.gui.electric")));
.setText(wideAcceleratorGuiElectric.translate()));

var speed_progress = (new ProgressWidget(machine.get_electric, 50, 60, 100, 15,
new ProgressTexture(CTNHGuiTextures.TEST_BAR, CTNHGuiTextures.TEST_BAR_FULL)
Expand Down Expand Up @@ -155,7 +179,7 @@ public Widget createMainPage(FancyMachineUIWidget widget) {
/// //////////////////////////
///
group.addWidget(new TextTextureWidget(10, 120 - 35, 40, 15)
.setText(Component.translatable("ctnh.multiblock.wide_accelerator.gui.nu")));
.setText(wideAcceleratorGuiNu.translate()));
var speed_progress2 = (new ProgressWidget(machine.get_nu, 50, 120 - 10, 100, 15,
new ProgressTexture(CTNHGuiTextures.TEST_BAR, CTNHGuiTextures.TEST_BAR_FULL)
.setFillDirection(ProgressTexture.FillDirection.LEFT_TO_RIGHT))
Expand Down Expand Up @@ -192,7 +216,7 @@ public Widget createMainPage(FancyMachineUIWidget widget) {
/// / 原子轨道逻辑/ ////
/// //////////////////////////
group.addWidget(new TextTextureWidget(10, 140, 40, 15)
.setText(Component.translatable("ctnh.multiblock.wide_accelerator.gui.proton")));
.setText(wideAcceleratorGuiProton.translate()));
var speed_progress3 = (new ProgressWidget(machine.get_proton, 50, 160, 100, 15,
new ProgressTexture(CTNHGuiTextures.TEST_BAR, CTNHGuiTextures.TEST_BAR_FULL)
.setFillDirection(ProgressTexture.FillDirection.LEFT_TO_RIGHT))
Expand Down Expand Up @@ -248,7 +272,7 @@ public Widget createMainPage(FancyMachineUIWidget widget) {
@Override
public List<Component> getTabTooltips() {
List<Component> tooltip = new ArrayList<>();
tooltip.add(Component.translatable("ctnh.multiblock.wide_accelerator.gui.name"));
tooltip.add(wideAcceleratorGuiName.translate());
return tooltip;
}

Expand Down
Loading
Loading