From 3e27737895f3c128d9b3eee3b368d97b49564193 Mon Sep 17 00:00:00 2001 From: reobf <2215595288@qq.com> Date: Sun, 18 Feb 2024 22:49:16 +0800 Subject: [PATCH] move hard-coded GT translations to assets folder --- .../BufferedDualInputHatch.java | 26 ++++-- .../gt/metatileentity/DualInputHatch.java | 17 +++- .../metatileentity/DualInputHatchSlave.java | 7 +- .../gt/metatileentity/FilterOutputBus.java | 12 ++- .../metatileentity/PatternDualInputHatch.java | 22 ++++- .../ProgrammingCircuitProvider.java | 9 +- .../gt/metatileentity/RemoteInputBus.java | 6 +- .../gt/metatileentity/RemoteInputHatch.java | 8 +- .../gt/metatileentity/SuperfluidHatch.java | 8 +- .../java/reobf/proghatches/main/Config.java | 93 ++++++++++++++++++- .../main/registration/PHRecipes.java | 12 +-- .../assets/proghatches/lang/en_US.lang | 2 +- .../assets/proghatches/lang/en_US/BDH.lang | 8 ++ .../assets/proghatches/lang/en_US/DH.lang | 5 + .../assets/proghatches/lang/en_US/DHS.lang | 3 + .../assets/proghatches/lang/en_US/FOB.lang | 4 + .../assets/proghatches/lang/en_US/PCP.lang | 5 + .../assets/proghatches/lang/en_US/PDIH.lang | 9 ++ .../assets/proghatches/lang/en_US/RIB.lang | 4 + .../assets/proghatches/lang/en_US/RIH.lang | 4 + .../assets/proghatches/lang/en_US/SH.lang | 9 ++ .../assets/proghatches/lang/zh_CN.lang | 1 + .../assets/proghatches/lang/zh_CN/BDH.lang | 7 ++ .../assets/proghatches/lang/zh_CN/DH.lang | 5 + .../assets/proghatches/lang/zh_CN/DHS.lang | 3 + .../assets/proghatches/lang/zh_CN/FOB.lang | 4 + .../assets/proghatches/lang/zh_CN/PCP.lang | 6 ++ .../assets/proghatches/lang/zh_CN/PDIH.lang | 9 ++ .../assets/proghatches/lang/zh_CN/RIB.lang | 4 + .../assets/proghatches/lang/zh_CN/RIH.lang | 4 + .../assets/proghatches/lang/zh_CN/SH.lang | 8 ++ 31 files changed, 290 insertions(+), 34 deletions(-) create mode 100644 src/main/resources/assets/proghatches/lang/en_US/BDH.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/DH.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/DHS.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/FOB.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/PCP.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/PDIH.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/RIB.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/RIH.lang create mode 100644 src/main/resources/assets/proghatches/lang/en_US/SH.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/BDH.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/DH.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/DHS.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/FOB.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/PCP.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/PDIH.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/RIB.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/RIH.lang create mode 100644 src/main/resources/assets/proghatches/lang/zh_CN/SH.lang diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java index 150c36c..3ff0b5d 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java @@ -43,6 +43,7 @@ import net.minecraftforge.oredict.OreDictionary; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; @@ -205,7 +206,7 @@ public BufferedDualInputHatch(int id, String name, String nameRegional, int tier mMultiFluid, (optional.length > 0 ? optional - : defaultObj( + : /*defaultObj( ArrayExt.of( "Item/Fluid Input for Multiblocks", @@ -230,9 +231,16 @@ public BufferedDualInputHatch(int id, String name, String nameRegional, int tier + (mMultiFluid ? " x4种流体" : ""), Math.min(16, (1 + tier) * (tier + 1)) + "格", "每格堆叠限制:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))), - StatCollector.translateToLocal("programmable_hatches.addedby") - - )))); + StatCollector.translateToLocal("programmable_hatches.addedby")) +*/reobf.proghatches.main.Config.get("BDH", ImmutableMap.of( + "bufferNum",bufferNum, + "cap",format.format((int) (4000 * Math.pow(4, tier) / (mMultiFluid ? 4 : 1))), + "mMultiFluid",mMultiFluid, + "slots", Math.min(16, (1 + tier) * (tier + 1)), + "stacksize",(int) (64 * Math.pow(2, Math.max(tier - 3, 0))) + )) + + ))/*)*/; this.bufferNum = bufferNum; initBackend(); @@ -1321,9 +1329,13 @@ public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDat } String cpinfo=""; int copies=sub.getInteger("possibleCopies"); - if(copies==-1)cpinfo=cpinfo+StatCollector.translateToLocal("programmable_hatches.buffer.waila.broken"); - if(copies>0)cpinfo=cpinfo+StatCollector.translateToLocalFormatted("programmable_hatches.buffer.waila.copies",copies+""); - + if(copies==-1 + &&(sub.getBoolean("locked"))//if not locked, do not warn about the copies + )cpinfo=cpinfo+StatCollector.translateToLocal("programmable_hatches.buffer.waila.broken"); + if(copies>0){ + cpinfo=cpinfo+StatCollector.translateToLocalFormatted("programmable_hatches.buffer.waila.copies",copies+""); + if(sub.getBoolean("locked")){cpinfo+="???not locked but copies>0???";} + } currenttip.add("#"+s+" "+info+" "+cpinfo); String lock_item=sub.getString("lock_item"); String lock_fluid=sub.getString("lock_fluid"); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java index 66a15f8..780a780 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java @@ -28,6 +28,7 @@ import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.FluidTankInfo; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; @@ -81,7 +82,7 @@ public DualInputHatch(int id, String name, String nameRegional, int tier, int sl tier, slot, (optional.length > 0 ? optional - : defaultObj( + : /*defaultObj( ArrayExt.of( "Item/Fluid Input for Multiblocks", @@ -100,7 +101,19 @@ public DualInputHatch(int id, String name, String nameRegional, int tier, int sl + "L" + (mMultiFluid ? " x4种流体" : ""), Math.min(16, (1 + tier) * (tier + 1)) + "格", - StatCollector.translateToLocal("programmable_hatches.addedby"))))); + StatCollector.translateToLocal("programmable_hatches.addedby")))*/ + reobf.proghatches.main.Config.get("DH", ImmutableMap.of( + + "cap",format.format((int) (4000 * Math.pow(2, tier) / (mMultiFluid ? 4 : 1))), + "mMultiFluid",mMultiFluid, + "slots", Math.min(16, (1 + tier) * (tier + 1)) + + )) + + ) + + + ); this.disableSort = true; Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); this.mMultiFluid = mMultiFluid; diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java index 186e371..8ad8b60 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java @@ -10,6 +10,8 @@ import java.util.List; import java.util.Optional; +import com.google.common.collect.ImmutableMap; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; @@ -49,7 +51,8 @@ public DualInputHatchSlave(int aID, String aName, String aNameRegional) { aNameRegional, 6, 0, - defaultObj( + reobf.proghatches.main.Config.get("DHS", ImmutableMap.of()) + /*defaultObj( ArrayExt.of( "Slave for Dual Input Hatch", @@ -59,6 +62,8 @@ public DualInputHatchSlave(int aID, String aName, String aNameRegional) { ), ArrayExt.of("二合一输入仓的镜像端", "将所绑定的样板输入总成的内容物共享过来", "闪存左键点击二合一输入仓,然后右键点击输入镜像完成链接绑定", StatCollector.translateToLocal("programmable_hatches.addedby"))) + */ + /* * new String[] { "Slave for (Buffered) Dual Input Hatch", diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java index 8f29570..ade5ae2 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java @@ -9,6 +9,7 @@ import org.jetbrains.annotations.Nullable; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; import com.gtnewhorizons.modularui.api.widget.Widget; @@ -49,7 +50,11 @@ public FilterOutputBus(int aID, String aName, String aNameRegional, int tier, bo aName, aNameRegional, tier, - defaultObj( + reobf.proghatches.main.Config.get("FOB", ImmutableMap.of( + "keepone",keepone , + "slots" , Math.min(16, (1 + tier) * (tier + 1)) + )) + /*defaultObj( ArrayExt.of( "Item Output for Multiblocks", @@ -67,7 +72,10 @@ public FilterOutputBus(int aID, String aName, String aNameRegional, int tier, bo Math.min(16, (1 + tier) * (tier + 1)) + "格", StatCollector.translateToLocal("programmable_hatches.addedby") - ))); + ))*/ + + + ); this.keepone = keepone; Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java index 894254b..5d6b253 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java @@ -20,6 +20,7 @@ import com.glodblock.github.common.item.ItemFluidPacket; import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.math.Pos2d; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; @@ -86,7 +87,15 @@ public PatternDualInputHatch(int id, String name, String nameRegional, int tier, mMultiFluid, bufferNum, (optional.length > 0 ? optional - : defaultObj( + : reobf.proghatches.main.Config.get("PDIH", ImmutableMap.of( + "bufferNum",bufferNum, + "cap",format.format((int) (4000 * Math.pow(4, tier) / (mMultiFluid ? 4 : 1))), + "mMultiFluid",mMultiFluid, + "slots", Math.min(16, (1 + tier) * (tier + 1)), + "stacksize",(int) (64 * Math.pow(2, Math.max(tier - 3, 0))) + )) + + /*defaultObj( ArrayExt.of( "Item/Fluid Input for Multiblocks", @@ -116,7 +125,11 @@ public PatternDualInputHatch(int id, String name, String nameRegional, int tier, "每格堆叠限制:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))), StatCollector.translateToLocal("programmable_hatches.addedby") - )))); + ))*/ + + + + )); this.supportFluids = fluid; } @@ -308,7 +321,8 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { @Override public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table) { - if (!isActive()) return false; + if (!isActive()) return false; + if (!isEmpty()) return false; if (!supportFluids) { for (int i = 0; i < table.getSizeInventory(); ++i) { ItemStack itemStack = table.getStackInSlot(i); @@ -316,7 +330,7 @@ public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCraf if (itemStack.getItem() instanceof ItemFluidPacket) return false; } } - if (!isEmpty()) return false; + int items = 0; int fluids = 0; diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java index 1e6f9d3..4687f96 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java @@ -19,6 +19,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; @@ -70,8 +71,8 @@ public ProgrammingCircuitProvider(int aID, String aName, String aNameRegional, i aName, aNameRegional, aTier, - aInvSlotCount, - defaultObj( + aInvSlotCount,reobf.proghatches.main.Config.get("PCP", ImmutableMap.of()) + /*defaultObj( ArrayExt.of( "Connect to AE network to provide Programming Circuit crafting", "Each item costs 10AE", @@ -86,7 +87,9 @@ public ProgrammingCircuitProvider(int aID, String aName, String aNameRegional, i "放入编程电路以指定生成的编程器芯片类型", "你也可以放入编程电路以外的物品", "并不能从nei书签标记物品,你需要把目标物品留在提供器内", - StatCollector.translateToLocal("programmable_hatches.addedby")))); + StatCollector.translateToLocal("programmable_hatches.addedby")))*/ + + ); Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, aID)); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java index ba96cd7..48ccf8a 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java @@ -22,6 +22,7 @@ import net.minecraftforge.common.util.ForgeDirection; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.TextWidget; @@ -173,7 +174,8 @@ public RemoteInputBus(int id, String name, String nameRegional, int tier) { nameRegional, 0, 0, - defaultObj( + reobf.proghatches.main.Config.get("RIB", ImmutableMap.of()) + /*defaultObj( ArrayExt.of( "Item Input for Multiblocks, wirelessly linked to a container, just like RemoteIO interface.", @@ -188,7 +190,7 @@ public RemoteInputBus(int id, String name, String nameRegional, int tier) { "无法被管道抽出的物品(除了虚拟电路板,如果目标有)也不能被访问", "不能跨维度链接 不会触发目标区块加载,且目标区块未加载时不工作" ,StatCollector.translateToLocal("programmable_hatches.addedby") - ))); + ))*/); Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java index e40036e..7e3d9aa 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java @@ -24,6 +24,7 @@ import net.minecraftforge.fluids.IFluidHandler; import com.gtnewhorizons.modularui.api.screen.ModularWindow.Builder; +import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.common.widget.TextWidget; @@ -172,7 +173,8 @@ public RemoteInputHatch(int id, String name, String nameRegional, int tier) { name, nameRegional, 0, - defaultObj( + reobf.proghatches.main.Config.get("RIH", ImmutableMap.of()) + /*defaultObj( ArrayExt.of( "Fluid Input for Multiblocks, wirelessly linked to a tank, just like RemoteIO interface.", @@ -187,7 +189,9 @@ public RemoteInputHatch(int id, String name, String nameRegional, int tier) { "无法被管道抽出的流体也不能被访问", "不能跨维度链接 不会触发目标区块加载,且目标区块未加载时不工作" ,StatCollector.translateToLocal("programmable_hatches.addedby") - ))); + ))*/ + + ); Registration.items.add(new ItemStack(GregTech_API.sBlockMachines, 1, id)); } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/SuperfluidHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/SuperfluidHatch.java index fbfd7fe..d781d1a 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/SuperfluidHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/SuperfluidHatch.java @@ -2,6 +2,8 @@ import java.util.ArrayList; +import com.google.common.collect.ImmutableMap; + import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidTank; @@ -40,8 +42,8 @@ public SuperfluidHatch(int id, String name, String nameRegional, int tier, boole 4 + 1, mMultiFluid, bufferNum, - - (String[]) Config.defaultObj( + reobf.proghatches.main.Config.get("SH", ImmutableMap.of()) + /* (String[]) Config.defaultObj( ArrayExt.of( "Dedicated to handle the siutation of many types of fluid input", @@ -64,7 +66,7 @@ public SuperfluidHatch(int id, String name, String nameRegional, int tier, boole "16 格", "每格堆叠限制:64" ,StatCollector.translateToLocal("programmable_hatches.addedby") - )) + ))*/ ); diff --git a/src/main/java/reobf/proghatches/main/Config.java b/src/main/java/reobf/proghatches/main/Config.java index dcfcde1..c01f367 100644 --- a/src/main/java/reobf/proghatches/main/Config.java +++ b/src/main/java/reobf/proghatches/main/Config.java @@ -1,13 +1,28 @@ package reobf.proghatches.main; +import java.io.ByteArrayInputStream; import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.Map; +import java.util.Scanner; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.apache.http.util.ByteArrayBuffer; + +import net.minecraft.util.StatCollector; +import net.minecraft.util.StringTranslate; import net.minecraftforge.common.config.Configuration; +import scala.actors.threadpool.Arrays; import com.google.common.base.Supplier; +import com.google.common.collect.ImmutableMap; public class Config { - +public static boolean appendAddedBy=true; public static String greeting = "Hello World"; public static int metaTileEntityOffset = 22000; public static boolean skipRecipeAdding; @@ -18,6 +33,7 @@ public static void synchronizeConfiguration(File configFile) { metaTileEntityOffset= configuration.getInt("MetaTEOffset", "ID", metaTileEntityOffset, 14301, 29999, "The GT MetaTE ID used by this mod, will use range:[offset,offset+200], make sure it's in [14301,14999] or [17000,29999]"); configuration.addCustomCategoryComment("ID", "Configurable ID settings, DO NOT change it until necessary."); skipRecipeAdding= configuration.getBoolean("skipRecipeAddition", Configuration.CATEGORY_GENERAL, skipRecipeAdding, "If true, this mod will not add any recipe."); + appendAddedBy= configuration.getBoolean("appendAddedBy", Configuration.CATEGORY_GENERAL, appendAddedBy, "Append 'Added by ProgrammableHatches' at the end of machine desc."); if (configuration.hasChanged()) { configuration.save(); @@ -44,5 +60,80 @@ public static T defaultObj(T en, T cn) { public static T defaultObj(Supplier en, Supplier cn) { return isCN ? cn.get() : en.get(); } + + public static String[] get(String key,Map fmtter){ + try(InputStream in=getInput.apply(key)){ + byte[] b=new byte[in.available()]; + int off=0; + int tmp; + do{ + tmp=in.read(b, off, b.length - off); + off+=tmp; + }while(in.available()>0); + String[] arr=new String(b,"UTF-8").split("\r?\n"); + for(int i=0;i{ + arr[ii]=arr[ii].replace(String.format("{%s}",k),v.toString()); + //arr[ii].inde + + Pattern p=Pattern.compile("\\{%s\\?\\}.*?\\{%s:\\}.*?\\{%s!\\}".replace("%s",k)); + while(true){ + Matcher m=p.matcher(arr[ii]); + if(m.find()){ + String torep=arr[ii].substring(m.start(),m.end()); + String repby; + int ia=torep.indexOf("{"+k+"?}"); + int ib=torep.indexOf("{"+k+":}"); + int ic=torep.indexOf("{"+k+"!}"); + if(Boolean.valueOf(v.toString())){ + repby=torep.substring(ia+("{"+k+"?}").length(),ib); + }else{ + repby=torep.substring(ib+("{"+k+":}").length(),ic); + } + + + arr[ii]=arr[ii].replace(torep, repby); + }else{break;} + } + + + + + + }); + + + + } + //System.out.println(Arrays.asList(arr)); + String[] t=arr; + if(appendAddedBy){ + t=new String[arr.length+1]; + System.arraycopy(arr, 0, t, 0, arr.length); + t[t.length-1]=StatCollector.translateToLocal("programmable_hatches.addedby"); + + } + return t; + + } catch (IOException e) { + MyMod.LOG.fatal("failed to get GT description:"+key); + e.printStackTrace(); + } + + + return null; + } + + static Function getInput= + s-> + Config.class.getResourceAsStream( + "/assets/proghatches/lang/"+ + StatCollector.translateToLocal("programmable_hatches.gt.lang.dir")+ + "/"+ + s+ + ".lang" + ); + + } diff --git a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java index ae5698e..7b31baf 100644 --- a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java +++ b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java @@ -323,17 +323,17 @@ public void run() { s, new ItemStack(ItemAndBlockHolder.INTERFACE), new ItemStack(MyMod.toolkit, 1, OreDictionary.WILDCARD_VALUE), - new ItemStack( + ( Api.INSTANCE.definitions() .blocks() - .craftingStorage1024k() - .maybeItem() + .craftingStorage256k() + .maybeStack(1) .get()), - new ItemStack( + ( Api.INSTANCE.definitions() .blocks() - .craftingAccelerator16x() - .maybeItem() + .craftingAccelerator4x() + .maybeStack(1) .get()), new ItemStack( Api.INSTANCE.definitions() diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index 399baa2..61c3870 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -178,4 +178,4 @@ tile.proghatches.peripheral_station.tooltip.5=Require no component channel. tile.proghatches.peripheral_station.tooltip=6 programmable_hatches.gt.updateEveryTick=This mode is intended to force the check every tick when the hatch fails to work properly. Do not enable when unnecessary, for better server performance. programmable_hatches.addedby=Added by §1ProgrammableHatches§r - +programmable_hatches.gt.lang.dir=en_US diff --git a/src/main/resources/assets/proghatches/lang/en_US/BDH.lang b/src/main/resources/assets/proghatches/lang/en_US/BDH.lang new file mode 100644 index 0000000..3fbb40d --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/BDH.lang @@ -0,0 +1,8 @@ +Item/Fluid Input for Multiblocks +Contents are always separated with other bus/hatch +Programming Cover function integrated +Buffer: {bufferNum} +For each buffer: +Capacity: {cap}L{mMultiFluid?} x4 types of fluid{mMultiFluid:}{mMultiFluid!} +{slots} Slots +Slot maximum stacksize:{stacksize} \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/DH.lang b/src/main/resources/assets/proghatches/lang/en_US/DH.lang new file mode 100644 index 0000000..b8f5ac4 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/DH.lang @@ -0,0 +1,5 @@ +Item/Fluid Input for Multiblocks +Contents are always separated with other bus/hatch +Programming Cover function integrated +Capacity: {cap}L{mMultiFluid?} x4 types of fluid{mMultiFluid:}{mMultiFluid!} +{slots} Slots \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/DHS.lang b/src/main/resources/assets/proghatches/lang/en_US/DHS.lang new file mode 100644 index 0000000..223d883 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/DHS.lang @@ -0,0 +1,3 @@ +Slave for Dual Input Hatch +Link with Crafting Input Buffer using Data Stick to share inventory +Left click on the Dual Input Hatch, then right click on this block to link them \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/FOB.lang b/src/main/resources/assets/proghatches/lang/en_US/FOB.lang new file mode 100644 index 0000000..78589eb --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/FOB.lang @@ -0,0 +1,4 @@ +Item Output for Multiblocks +{keepone?}Preserve the last stack of item when moving stacks out{keepone:}Remain a phantom item instead of clearing it when moving stacks out{keepone!} +Use void protection to restrict recipe indirectly. +{slots}Slots \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/PCP.lang b/src/main/resources/assets/proghatches/lang/en_US/PCP.lang new file mode 100644 index 0000000..c0b0c2b --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/PCP.lang @@ -0,0 +1,5 @@ +Connect to AE network to provide Programming Circuit crafting +Each item costs 10AE +Put programmed circuit into inventory to specify the type of the programming circuit +Lens and moulds are acceptable as well +No, you cannot mark target item via NEI bookmark, you have to use REAL item \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/PDIH.lang b/src/main/resources/assets/proghatches/lang/en_US/PDIH.lang new file mode 100644 index 0000000..cd2dc6d --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/PDIH.lang @@ -0,0 +1,9 @@ +Item/Fluid Input for Multiblocks +Contents are always separated with other bus/hatch +Programming Cover function integrated +Blocking mode is always on +If all pattern inputs cannot be push in one single try, it won't be pushed at all. +Buffer: {bufferNum} +For each buffer: +Capacity: {cap}L{mMultiFluid?} x4 types of fluid{mMultiFluid:}{mMultiFluid!} +Slot maximum stacksize:{stacksize} \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/RIB.lang b/src/main/resources/assets/proghatches/lang/en_US/RIB.lang new file mode 100644 index 0000000..a9b6f02 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/RIB.lang @@ -0,0 +1,4 @@ +Item Input for Multiblocks, wirelessly linked to a container, just like RemoteIO interface. +LMB click this block with a tricorder with target coord to link. +Items not extractable by pipes will not be accessible, with an exception of virtual circuits. +Cannot work across dimension. Will not load target chunk. Will not work if target chunk is unloaded. \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/RIH.lang b/src/main/resources/assets/proghatches/lang/en_US/RIH.lang new file mode 100644 index 0000000..346949a --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/RIH.lang @@ -0,0 +1,4 @@ +Fluid Input for Multiblocks, wirelessly linked to a tank, just like RemoteIO interface. +LMB click this block with a tricorder with target coord to link. +Fluid not extractable by pipes will not be accessible. +Cannot work across dimension. Will not load target chunk. Will not work if target chunk is unloaded. \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/en_US/SH.lang b/src/main/resources/assets/proghatches/lang/en_US/SH.lang new file mode 100644 index 0000000..48e788a --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/en_US/SH.lang @@ -0,0 +1,9 @@ +Dedicated to handle the siutation of many types of fluid input +Item/Fluid Input for Multiblocks +Contents are always separated with other bus/hatch +Programming Cover function integrated +Buffer: 1 +For each buffer: +Capacity: 10,000,000L x24 types of fluid +16 Slots +Slot maximum stacksize:64 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index 94c33be..1191f2b 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -188,3 +188,4 @@ tile.proghatches.peripheral_station.tooltip.4=不占用组件数量 tile.proghatches.peripheral_station.tooltip=5 programmable_hatches.gt.updateEveryTick=此模式用于每tick强制触发仓室的转移,以防(由于bug或某些corner case)转移过程未能正确触发 如果仓室工作正常,应该关闭此功能以优化服务器负载 programmable_hatches.addedby=Added by §1ProgrammableHatches§r +programmable_hatches.gt.lang.dir=zh_CN diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/BDH.lang b/src/main/resources/assets/proghatches/lang/zh_CN/BDH.lang new file mode 100644 index 0000000..97e07ca --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/BDH.lang @@ -0,0 +1,7 @@ +多方块机器的物品/流体输入 +总是与其它输入仓/输入总线隔离 +自带编程覆盖板功能 +缓冲数量: {bufferNum} +缓冲容量: {cap}L{mMultiFluid?} x4种流体{mMultiFluid:}{mMultiFluid!} +{slots}格 +每格堆叠限制:{stacksize} \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/DH.lang b/src/main/resources/assets/proghatches/lang/zh_CN/DH.lang new file mode 100644 index 0000000..b4a3618 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/DH.lang @@ -0,0 +1,5 @@ +多方块机器的物品/流体输入 +总是与其它输入仓/输入总线隔离 +自带编程覆盖板功能 +容量: {cap}L{mMultiFluid?} x4种流体{mMultiFluid:}{mMultiFluid!} +{slots}格 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/DHS.lang b/src/main/resources/assets/proghatches/lang/zh_CN/DHS.lang new file mode 100644 index 0000000..fb166e4 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/DHS.lang @@ -0,0 +1,3 @@ +二合一输入仓的镜像端 +将所绑定的样板输入总成的内容物共享过来 +闪存左键点击二合一输入仓,然后右键点击输入镜像完成链接绑定 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/FOB.lang b/src/main/resources/assets/proghatches/lang/zh_CN/FOB.lang new file mode 100644 index 0000000..78c0981 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/FOB.lang @@ -0,0 +1,4 @@ +多方块机器的物品输出 +{keepone?}自动输出时每格总是会保留一个物品{keepone:}自动输出时留下一个虚拟物品{keepone!} +配合溢出保护功能间接限制配方 +{slots}格 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/PCP.lang b/src/main/resources/assets/proghatches/lang/zh_CN/PCP.lang new file mode 100644 index 0000000..b920038 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/PCP.lang @@ -0,0 +1,6 @@ +连入AE网络以提供编程器芯片合成 +消耗10AE以生成一个物品 +放入编程电路以指定生成的编程器芯片类型 +你也可以放入编程电路以外的物品 +并不能从nei书签标记物品 +你需要把目标物品留在提供器内 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/PDIH.lang b/src/main/resources/assets/proghatches/lang/zh_CN/PDIH.lang new file mode 100644 index 0000000..d55f34c --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/PDIH.lang @@ -0,0 +1,9 @@ +多方块机器的物品/流体输入 +总是与其它输入仓/输入总线隔离 +自带编程覆盖板功能 +阻挡模式不可关闭 +样板所有原料无法单次全部输入时,将拒绝此样板的输入 +缓冲数量: {bufferNum} +缓冲容量: {cap}L{mMultiFluid?} x4种流体{mMultiFluid:}{mMultiFluid!} +{slots}格 +每格堆叠限制:{stacksize} \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/RIB.lang b/src/main/resources/assets/proghatches/lang/zh_CN/RIB.lang new file mode 100644 index 0000000..f67a390 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/RIB.lang @@ -0,0 +1,4 @@ +像RemoteIO一样远程访问某个容器中的物品 作为多方块机器的输入 +三录仪记录目标坐标后,左键此方块设定坐标 +无法被管道抽出的物品(除了虚拟电路板,如果目标有)也不能被访问 +不能跨维度链接 不会触发目标区块加载,且目标区块未加载时不工作 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/RIH.lang b/src/main/resources/assets/proghatches/lang/zh_CN/RIH.lang new file mode 100644 index 0000000..99652b5 --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/RIH.lang @@ -0,0 +1,4 @@ +像RemoteIO一样远程访问某个容器中的流体 作为多方块机器的输入 +三录仪记录目标坐标后,左键此方块设定坐标 +无法被管道抽出的流体也不能被访问 +不能跨维度链接 不会触发目标区块加载,且目标区块未加载时不工作 \ No newline at end of file diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/SH.lang b/src/main/resources/assets/proghatches/lang/zh_CN/SH.lang new file mode 100644 index 0000000..da5189a --- /dev/null +++ b/src/main/resources/assets/proghatches/lang/zh_CN/SH.lang @@ -0,0 +1,8 @@ +致力于解决超多种流体输入 +多方块机器的物品/流体输入 +总是与其它输入仓/输入总线隔离 + 自带编程覆盖板功能 +缓冲数量: 1 +缓冲容量: 10,000,000L x24种流体 +16 格 +每格堆叠限制:64 \ No newline at end of file