From 4b8c275de1ca45ea995528e5226a6627b1420f33 Mon Sep 17 00:00:00 2001 From: reobf <2215595288@qq.com> Date: Sun, 18 Feb 2024 15:38:15 +0800 Subject: [PATCH] update --- .../gt/metatileentity/BufferedDualInputHatch.java | 7 +++++-- .../proghatches/gt/metatileentity/DualInputHatch.java | 7 +++++-- .../proghatches/gt/metatileentity/DualInputHatchSlave.java | 6 ++++-- .../proghatches/gt/metatileentity/FilterOutputBus.java | 7 +++++-- .../gt/metatileentity/PatternDualInputHatch.java | 6 ++++-- .../gt/metatileentity/ProgrammingCircuitProvider.java | 6 ++++-- .../proghatches/gt/metatileentity/RemoteInputBus.java | 4 ++-- .../proghatches/gt/metatileentity/RemoteInputHatch.java | 4 ++-- .../proghatches/gt/metatileentity/SuperfluidHatch.java | 6 ++++-- src/main/resources/assets/proghatches/lang/en_US.lang | 1 + src/main/resources/assets/proghatches/lang/zh_CN.lang | 2 +- 11 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java index 7da5dd5..150c36c 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java @@ -217,7 +217,9 @@ public BufferedDualInputHatch(int id, String name, String nameRegional, int tier + "L" + (mMultiFluid ? " x4 types of fluid" : ""), Math.min(16, (1 + tier) * (tier + 1)) + "Slots", - "Slot maximum stacksize:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0)))), + "Slot maximum stacksize:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))), + StatCollector.translateToLocal("programmable_hatches.addedby") + ), ArrayExt.of( "多方块机器的物品/流体输入", "总是与其它输入仓/输入总线隔离", @@ -227,7 +229,8 @@ public BufferedDualInputHatch(int id, String name, String nameRegional, int tier + "L" + (mMultiFluid ? " x4种流体" : ""), Math.min(16, (1 + tier) * (tier + 1)) + "格", - "每格堆叠限制:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))) + "每格堆叠限制:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))), + StatCollector.translateToLocal("programmable_hatches.addedby") )))); this.bufferNum = bufferNum; diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java index 4f4704d..66a15f8 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java @@ -22,6 +22,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTank; @@ -89,7 +90,8 @@ public DualInputHatch(int id, String name, String nameRegional, int tier, int sl "Capacity: " + format.format((int) (4000 * Math.pow(2, tier)) / (mMultiFluid ? 4 : 1)) + "L" + (mMultiFluid ? " x4 types of fluid" : ""), - Math.min(16, (1 + tier) * (tier + 1)) + "Slots"), + Math.min(16, (1 + tier) * (tier + 1)) + "Slots", + StatCollector.translateToLocal("programmable_hatches.addedby")), ArrayExt.of( "多方块机器的物品/流体输入", "总是与其它输入仓/输入总线隔离", @@ -97,7 +99,8 @@ public DualInputHatch(int id, String name, String nameRegional, int tier, int sl "容量: " + format.format((int) (4000 * Math.pow(2, tier) / (mMultiFluid ? 4 : 1))) + "L" + (mMultiFluid ? " x4种流体" : ""), - Math.min(16, (1 + tier) * (tier + 1)) + "格")))); + Math.min(16, (1 + tier) * (tier + 1)) + "格", + StatCollector.translateToLocal("programmable_hatches.addedby"))))); 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 6e1831d..186e371 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java @@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -54,9 +55,10 @@ public DualInputHatchSlave(int aID, String aName, String aNameRegional) { "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" - + ,StatCollector.translateToLocal("programmable_hatches.addedby") ), - ArrayExt.of("二合一输入仓的镜像端", "将所绑定的样板输入总成的内容物共享过来", "闪存左键点击二合一输入仓,然后右键点击输入镜像完成链接绑定")) + 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 065b009..8f29570 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/FilterOutputBus.java @@ -17,6 +17,7 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketBuffer; +import net.minecraft.util.StatCollector; import gregtech.api.GregTech_API; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -55,14 +56,16 @@ public FilterOutputBus(int aID, String aName, String aNameRegional, int tier, bo keepone ? "Preserve the last stack of item when moving stacks out." : "Remain a phantom item instead of clearing it when moving stacks out.", "Use void protection to restrict recipe indirectly.", - Math.min(16, (1 + tier) * (tier + 1)) + "Slots" + Math.min(16, (1 + tier) * (tier + 1)) + "Slots", + StatCollector.translateToLocal("programmable_hatches.addedby") ), ArrayExt.of( "多方块机器的物品输出", keepone ? "自动输出时每格总是会保留一个物品" : "自动输出时留下一个虚拟物品", "配合溢出保护功能间接限制配方", - Math.min(16, (1 + tier) * (tier + 1)) + "格" + Math.min(16, (1 + tier) * (tier + 1)) + "格", + StatCollector.translateToLocal("programmable_hatches.addedby") ))); this.keepone = keepone; diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java index da84386..894254b 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java @@ -100,7 +100,8 @@ public PatternDualInputHatch(int id, String name, String nameRegional, int tier, + "L" + (mMultiFluid ? " x4 types of fluid" : ""), Math.min(16, (1 + tier) * (tier + 1)) + "Slots", - "Slot maximum stacksize:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0)))), + "Slot maximum stacksize:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))), + StatCollector.translateToLocal("programmable_hatches.addedby")), ArrayExt.of("多方块机器的物品/流体输入", "总是与其它输入仓/输入总线隔离" , @@ -112,7 +113,8 @@ public PatternDualInputHatch(int id, String name, String nameRegional, int tier, + "L" + (mMultiFluid ? " x4种流体" : ""), Math.min(16, (1 + tier) * (tier + 1)) + "格", - "每格堆叠限制:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))) + "每格堆叠限制:" + (int) (64 * Math.pow(2, Math.max(tier - 3, 0))), + StatCollector.translateToLocal("programmable_hatches.addedby") )))); this.supportFluids = fluid; diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java index 3a65bd6..1e6f9d3 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/ProgrammingCircuitProvider.java @@ -15,6 +15,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -77,14 +78,15 @@ public ProgrammingCircuitProvider(int aID, String aName, String aNameRegional, i "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" - + ,StatCollector.translateToLocal("programmable_hatches.addedby") ), ArrayExt.of( "连入AE网络以提供编程器芯片合成", "消耗10AE以生成一个物品", "放入编程电路以指定生成的编程器芯片类型", "你也可以放入编程电路以外的物品", - "并不能从nei书签标记物品,你需要把目标物品留在提供器内"))); + "并不能从nei书签标记物品,你需要把目标物品留在提供器内", + 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 ea0bb4e..ba96cd7 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputBus.java @@ -180,14 +180,14 @@ public RemoteInputBus(int id, String name, String nameRegional, int tier) { "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." - +,StatCollector.translateToLocal("programmable_hatches.addedby") ), ArrayExt.of( "像RemoteIO一样远程访问某个容器中的物品 作为多方块机器的输入", "三录仪记录目标坐标后,左键此方块设定坐标", "无法被管道抽出的物品(除了虚拟电路板,如果目标有)也不能被访问", "不能跨维度链接 不会触发目标区块加载,且目标区块未加载时不工作" - +,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 c13127c..e40036e 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java @@ -179,14 +179,14 @@ public RemoteInputHatch(int id, String name, String nameRegional, int tier) { "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." - +,StatCollector.translateToLocal("programmable_hatches.addedby") ), ArrayExt.of( "像RemoteIO一样远程访问某个容器中的流体 作为多方块机器的输入", "三录仪记录目标坐标后,左键此方块设定坐标", "无法被管道抽出的流体也不能被访问", "不能跨维度链接 不会触发目标区块加载,且目标区块未加载时不工作" - +,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 7ef895e..fbfd7fe 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/SuperfluidHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/SuperfluidHatch.java @@ -2,6 +2,7 @@ import java.util.ArrayList; +import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidTank; import gregtech.api.interfaces.ITexture; @@ -51,7 +52,8 @@ public SuperfluidHatch(int id, String name, String nameRegional, int tier, boole "For each buffer:", "Capacity: 10,000,000L x24 types of fluid", "16 Slots", - "Slot maximum stacksize:64"), + "Slot maximum stacksize:64", + StatCollector.translateToLocal("programmable_hatches.addedby")), ArrayExt.of( "致力于解决超多种流体输入", "多方块机器的物品/流体输入", @@ -61,7 +63,7 @@ public SuperfluidHatch(int id, String name, String nameRegional, int tier, boole "缓冲容量: 10,000,000L x24种流体", "16 格", "每格堆叠限制:64" - + ,StatCollector.translateToLocal("programmable_hatches.addedby") )) ); diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index 273c838..399baa2 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -177,4 +177,5 @@ tile.proghatches.peripheral_station.tooltip.4=Range:16 with no inter-dimension s 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 diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index 8fe02ab..94c33be 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -187,4 +187,4 @@ tile.proghatches.peripheral_station.tooltip.3=距离:16格 无法跨维度 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