From 3b79b53d4bdb904a7703ddc09372d6ae82ddd3c6 Mon Sep 17 00:00:00 2001 From: mmyddd Date: Thu, 10 Sep 2026 23:11:21 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix(machine):=20=E8=A1=A5=E5=85=A8=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E9=85=8D=E6=96=B9=E8=BF=90=E8=A1=8C=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E5=85=B7=E4=BD=93=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增共享失败原因文案:无 EU 输出、输出功率不足、输入不足、输出堵塞、配方类型不支持 - CTNHRecipeHelper 新增并行失败诊断与输出功率诊断辅助方法,可区分输入材料不足与输出仓堵塞 - 涡轮发电机区分未找到转子支架、无有效转子、无发电量、输出功率不足,并给出所需与当前 EU/t - 等离子涡轮在输出功率不足时提示补充算力以提高输出上限 - 电弧发生器提示所需与当前电弧强度;光伏无人机站提示挖矿配方仅限轨道维度 - 烈焰高炉、等离子合金高炉、西诺普化工分别提示炽焱不足、缺少等离子体、线圈温度不足 - 宽域粒子加速器提示中子/电子/质子速度不足的所需与当前数值 - 超导彭宁阱提示供电不足,动能多方块提示动力转速不足 - 屠宰场提示缺少带实体数据的刷怪笼,工厂机器复用既有“缺少所需的生产资料”提示 - 机器类型不匹配改用 RecipeModifier.nullWrongType 记录开发期错误,不再冒充玩家可见的失败原因 - 修正化学燃料发电机把机身类型误报为大型内燃机的问题 - 重新生成 zh_cn/en_us/en_ud 语言文件 --- .../resources/assets/ctnhcore/lang/en_ud.json | 18 ++++++++++++++ .../resources/assets/ctnhcore/lang/en_us.json | 18 ++++++++++++++ .../resources/assets/ctnhcore/lang/zh_cn.json | 18 ++++++++++++++ .../KineticElectricMultiblockMachine.java | 9 ++++++- .../multiblock/SlaughterHouseMachine.java | 6 ++++- .../electric/BlazeBlastFurnaceMachine.java | 4 ++-- .../multiblock/electric/CryotheumFreezer.java | 2 +- .../multiblock/electric/FactoryMachine.java | 3 +-- .../multiblock/electric/LaserSorter.java | 2 +- .../multiblock/electric/PlasmaAlloyBlast.java | 16 +++++++++++-- .../multiblock/electric/SinopeChemical.java | 6 ++++- .../SpacePhotovoltaicBaseStation.java | 2 +- .../Superconducting_Penning_Trap.java | 8 +++++-- .../electric/WideParticleAccelerator.java | 24 +++++++++++++++---- .../multiblock/generator/Arc_Generator.java | 13 ++++++---- .../generator/ChemicalGeneratorMachine.java | 7 +++--- .../generator/HyperPlasmaTurbineMachine.java | 14 ++++++++++- .../LargeNaquadahReactorMachine.java | 7 ++++-- .../generator/MegaTurbineMachine.java | 23 ++++++++++++++++-- .../NanoscaleTriboelectricGenerator.java | 8 +++++-- .../generator/PhotoVoltaicDroneStation.java | 8 +++++-- .../generator/WaterPowerStationMachine.java | 2 +- .../multiblock/kinetic/MeadowMachine.java | 2 +- .../simple/EfficiencyGeneratorMachine.java | 12 ++++++---- .../registry/CTNHRecipeModifiers.java | 11 +++++---- .../ctnhcore/utils/CTNHCommonTooltips.java | 20 ++++++++++++++++ .../ctnhcore/utils/CTNHRecipeHelper.java | 24 +++++++++++++++++++ 27 files changed, 242 insertions(+), 45 deletions(-) diff --git a/src/generated/resources/assets/ctnhcore/lang/en_ud.json b/src/generated/resources/assets/ctnhcore/lang/en_ud.json index d66294b0..98f684ac 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_ud.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_ud.json @@ -406,6 +406,7 @@ "ctnhcore.arc_generator.arcgeneratorinfo1": "%d :ʎʇısuǝʇuI ɔɹⱯ ʇuǝɹɹnƆ", "ctnhcore.arc_generator.arcgeneratorinfo2": "%%ɟᄅ˙% :ʎɔuǝıɔıɟɟƎ pǝʇɹoddnS xɐW", "ctnhcore.arc_generator.arcgeneratorinfo3": "%%ɟᄅ˙% :ʎɔuǝıɔıɟɟƎ ʇuǝɹɹnƆ", + "ctnhcore.arc_generator.arcintensityinsufficient": "%d ʎןʇuǝɹɹnɔ '%d spǝǝu ǝdıɔǝɹ sıɥʇ :ʎʇısuǝʇuı ɔɹɐ ʇuǝıɔıɟɟnsuI", "ctnhcore.arc_reactor.arcreactorarc": "%d :ʎʇısuǝʇuI ɔɹⱯ ʇndʇnO", "ctnhcore.arc_reactor.arcreactorconnect": "ɹ§pǝןqɐuƎ ǝbpıɹᗺq§", "ctnhcore.astronomicalmachine.astronomicalinfoinvalid": "ʇɥbıu ʇɐ pǝsn ǝq ʎןuo uɐƆ", @@ -426,6 +427,11 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "˙ʎןןɐɔıʇɐɯoʇnɐ pǝɯɹoɟɹǝd ǝq ןןıʍ suoıʇɐןnɔןɐɔ ןǝןןɐɹɐd 'ʞɔıʇ Ɩ uɐɥʇ ssǝן sı ǝɯıʇunɹ ǝdıɔǝɹ uǝɥM", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "pǝʇʇıɯɹǝd sı ɹǝqɯɐɥɔ ɹǝsɐן ǝɥʇ ɟo ǝsn ǝɥ⟘", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "pǝןıɐɟ uoıʇɐɔıɟıpoɯ ǝdıɔǝᴚ", + "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientinput": "ǝɔuo ǝdıɔǝɹ ǝɥʇ unɹ oʇ sןɐıɹǝʇɐɯ ʇnduı ɥbnouǝ ʇoN", + "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "ʇ/∩Ǝ %s sı ʇıɯıן ʇuǝɹɹnɔ 'ʇ/∩Ǝ %s sǝɹınbǝɹ ǝdıɔǝɹ :ʇndʇno ǝuıɥɔɐɯ ʇuǝıɔıɟɟnsuI", + "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "ʇndʇno ∩Ǝ ou sǝuıɟǝp ǝdıɔǝɹ sıɥ⟘", + "ctnhcore.ctnhcommontooltips.recipemodifieroutputfull": "pǝɹoʇs ǝq ʇouuɐɔ sʇɔnpoɹd ǝdıɔǝɹ ǝɥʇ ؛ןןnɟ sı ʇndʇnO", + "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "ǝuıɥɔɐɯ sıɥʇ ʎq pǝʇɹoddns ʇou sı ǝdʎʇ ǝdıɔǝɹ sıɥ⟘", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "sʇunoɯɐ ǝbɹɐן uıɐʇqo oʇ ʇıɯıן ʇɥbıǝɥ pןɹoʍ ǝɥʇ ʇɐ ǝuɐןԀ uoıʇɐןıɥıuuⱯ uɐ ǝs∩", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "ʇı uɹɐǝן oʇ ǝbɐןןıΛ ǝɥʇ ɟo oɹǝH ɐ sɐ ɟןǝsɹnoʎ ǝʌoɹd - ǝnbıuɥɔǝʇ ʇuǝıɔuɐ sıɥʇ pɹɐnb suɐıɹɐɹqıן ǝbɐןןıΛ", "ctnhcore.ctnhcoreemiplugin.bloodmagicgregtechhv": "sǝʇıɹoǝʇǝɯ uoɯɯns oʇ ןɐnʇıᴚ uoɔɐǝᗺ ɹɐʇS buıןןɐℲ ǝɥʇ uı buıɹǝɟɟo uɐ sɐ ɯǝʇı sıɥʇ ǝs∩", @@ -501,6 +507,7 @@ "ctnhcore.factorymachine.sweatshopinfovillagercount": "%s :ʇunoƆ ǝǝʎoןdɯƎ", "ctnhcore.forestmachine.forestmachineinfohumidity": "%d :ןǝʌǝן ʎʇıpıɯnH", "ctnhcore.forestmachine.forestmachineinfoparallelcount": "%d :ʇunoɔ ןǝןןɐɹɐԀ", + "ctnhcore.hyperplasmaturbinemachine.insufficientoutputpower": ")ʇıɯıן ǝɥʇ ǝsıɐɹ oʇ ʇ/∩MƆ ǝɹoɯ ʎןddns( ʇ/∩Ǝ %s sı ʇıɯıן ʇuǝɹɹnɔ 'ʇ/∩Ǝ %s sǝɹınbǝɹ ǝdıɔǝɹ :ʇndʇno ǝuıqɹnʇ ɐɯsɐןd ʇuǝıɔıɟɟnsuI", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip0": "ʎbɹǝuƎ ɐɯsɐןԀ ǝ§ puɐ ɟ§ uoıʇɐʇndɯoƆ ǝsıɔǝɹԀ ɐ§ ɟoɟ§ ʎSⱯ⟘NⱯℲ ꞀⱯNIℲϛ§", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip1": "˙SƎꞀᗺ∩Oᗡ uoıʇɔnpoɹԀ ʇndʇnO ǝɥʇ 'pǝpıʌoɹd uoıʇɐʇndɯoɔ %d ʎɹǝʌǝ ɹoℲ ˙uoıʇɔnpoɹԀ ǝsɐᗺ ǝɥʇ ɥɔɐǝɹ oʇ uoıʇɐʇndɯoɔ %d ǝpıʌoɹԀ", "ctnhcore.idataitem.datanoise": "%s :ǝsıou ʇuǝɹɹnƆ", @@ -510,6 +517,7 @@ "ctnhcore.idroneitem.itemdroneeut": "ʇ/∩Ǝ %d :ǝuoɹp ǝuo ʎq pǝʇɐɹǝuǝb ǝbɐʇןoΛ", "ctnhcore.idroneitem.itemdronetier": "%d :ɹǝı⟘ ǝuoɹᗡ", "ctnhcore.industrialprimitiveblastfurnacemachine.industrialprimitiveblastfurnaceinfoparallelcount": "%d :ʇunoɔ ןǝןןɐɹɐԀ", + "ctnhcore.kineticelectricmultiblockmachine.insufficientkineticspeed": "pǝɹınbǝɹ ㄣ9 ʇsɐǝן ʇɐ '%d ʎןʇuǝɹɹnɔ :pǝǝds ɔıʇǝuıʞ ʇuǝıɔıɟɟnsuI", "ctnhcore.largenaquadahreactormachine.power": "%s :ɹǝʍoԀ", "ctnhcore.machinemodefancyconfiguratortest.cryotheumfreezerui1": "ɟᄅ˙% / ɟᄅ˙% :pǝǝds ɹǝzǝǝɹɟ ʇuǝɹɹnƆ", "ctnhcore.machinemodefancyconfiguratortest.cryotheumfreezerui2": "ןǝuɐԀ ǝpɐɹbd∩ uǝdO", @@ -533,6 +541,7 @@ "ctnhcore.meadvancedterminalbehavior.itemmeadvancedterminalsetting7tooltip": "spınןɟ uı pǝɔɐןd ǝq ʇou ןןıʍ spınןɟ 'spınןℲ ǝɔɐןԀ ɥʇıʍ ɹǝɥʇǝboʇ pǝןqɐuǝ uǝɥM\nǝɔɐds ʎʇdɯǝ sɐ pǝʇɐǝɹʇ ǝɹɐ ǝɔɐds ǝɥʇ uı spınןɟ 'pǝןqɐuǝ uǝɥM\n)pǝןqɐuǝ :Ɩ 'pǝןqɐsıp :0( spınןɟ uı sʞɔoןq ǝɔɐןԀ", "ctnhcore.meadvancedterminalbehavior.itemmeadvancedterminalsettingtitle": "sbuıʇʇǝS uoıʇɐɯɹoℲ ʞɔoןqıʇןnW", "ctnhcore.mechanical.mechanicallathestructure": "uoıʇɐʇuǝıɹo puɐ uoıʇısod buıpnןɔuı 'uoıʇɐɯɹoɟuı ǝɹnʇɔnɹʇs s,IWƎ uı uʍoɥs sɐ ʎןʇɔɐxǝ pǝɔɐןd ǝq ʇsnɯ ǝɹnʇɔnɹʇs ǝɥʇ uı ǝɥʇɐן ǝɥ⟘", + "ctnhcore.megaturbinemachine.missingrotorholder": "ǝʇǝןdɯoɔuı sı ǝɹnʇɔnɹʇs ʞɔoןqıʇןnɯ ǝɥʇ ؛punoɟ ɹǝpןoɥ ɹoʇoɹ oN", "ctnhcore.multiblocksa.advancedcokeoventooltip0": "uǝʌO ǝʞoƆ pǝɔuɐʌpⱯ", "ctnhcore.multiblocksa.advancedcokeoventooltip1": "ɯsıןǝןןɐɹɐd ᄅƐ ɥʇıʍ sǝɯoƆן§9§", "ctnhcore.multiblocksa.advancedcokeoventooltip2": "spuoɔǝs ϛƖ ʇɐ pǝxıɟ sı ǝɯıʇ ǝdıɔǝɹ puɐ 'sǝdıɔǝɹ uǝʌo ǝʞoɔ unɹ ʎןuo uɐƆ", @@ -903,12 +912,15 @@ "ctnhcore.ore_vein.zanite_vein_at": "uıǝΛ ǝʇıuɐZ ɹǝɥʇǝⱯ", "ctnhcore.ore_vein.zinc_vein_ow": "uıǝΛ ɔuıZ pןɹoʍɹǝʌO", "ctnhcore.ore_vein.zirkelite_vein": "uıǝΛ ǝʇıןǝʞɹıZ", + "ctnhcore.photovoltaicdronestation.onlyinorbit": "suoısuǝɯıp ʇıqɹo uı unɹ ʎןuo uɐɔ sǝdıɔǝɹ buıuıW", "ctnhcore.photovoltaicdronestation.pvdroneinfot1": "%d :pǝıןddns ɹǝʍoԀ", "ctnhcore.photovoltaicdronestation.pvdroneinfot2": "ɟㄣ˙% :ǝɔuɐɥɔ uoıʇdɯnsuoɔ ǝuoɹᗡ", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfo1": "%s%% :ʎɔuǝıɔıɟɟƎ", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfo2": "ʇ/∩Ǝ %s/%s :buıʇɐɹǝuǝ⅁", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfoinvalid": "pǝʍopɐɥS", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfonight": "ʇɥbıu ʇⱯ", + "ctnhcore.plasmaalloyblast.coiltiertoolow": ")ʞ008Ɩ ʇsɐǝן ʇɐ ɟo ןıoɔ ɐ sǝɹınbǝɹ( ɹǝıʇ ןǝןןɐɹɐd ɐ ǝpıʌoɹd ʇouuɐɔ :ʍoן ooʇ ǝɹnʇɐɹǝdɯǝʇ ןıoƆ", + "ctnhcore.plasmaalloyblast.missingplasma": "pǝɯnsuoɔ sɐʍ ʇnduı ɐɯsɐןd pıןɐʌ ou :ɐɯsɐןd buıssıW", "ctnhcore.ponder.assembly_line_building.header": "ǝuıꞀ ʎןqɯǝssⱯ ǝʇɐɯoʇnɐ oʇ ʍoH", "ctnhcore.ponder.assembly_line_building.text_1": "˙ɹǝןןoɹʇuoɔ ǝuıꞀ ʎןqɯǝssⱯ uɐ ǝɔɐןd 'ʇsɹıℲ", "ctnhcore.ponder.assembly_line_building.text_10": "˙ʇɔnpoɹd uıɐɯ ǝɥʇ ɹoɟ ʇıɐʍ oʇ ǝpoɯ ʞɔoן ɹǝpıʌoɹd uɹǝʇʇɐd ǝɥʇ ʇǝs uǝɥʇ 'uoʇʇnq ,+, ǝɥʇ ɥʇıʍ uɹǝʇʇɐd ʞɔıןɔ-ǝuo ǝɥʇ ǝpoɔuƎ", @@ -971,8 +983,10 @@ "ctnhcore.scalablereservoircomputingmachine.ctnhsrcsacrificelocked": "ᗡƎʞƆOꞀ ǝɔıɟıɹɔɐS", "ctnhcore.scalablereservoircomputingmachine.ctnhsrcsacrificeunlocked": "ᗡƎʞƆOꞀN∩ ǝɔıɟıɹɔɐS", "ctnhcore.scalablereservoircomputingmachine.ctnhsrcwetwareduration": "sʞɔıʇ %s :uoıʇɐɹnp ǝɹɐʍʇǝM", + "ctnhcore.sinopechemical.coiltiertoolow": ")ʞ008Ɩ ʇsɐǝן ʇɐ ɟo ןıoɔ ɐ sǝɹınbǝɹ( ɹǝıʇ uoıʇɐɹǝןǝɔɔɐ ǝɥʇ ǝʇndɯoɔ ʇouuɐɔ :ʍoן ooʇ ǝɹnʇɐɹǝdɯǝʇ ןıoƆ", "ctnhcore.sinopechemical.sinopechemicalinfolevel": "%d :ǝʇɐᴚ buıʇɐɹǝןǝɔɔⱯ ןıoƆ", "ctnhcore.sinopechemical.sinopechemicalinfoparallel": "%d :ʇunoƆ ןǝןןɐɹɐԀ", + "ctnhcore.slaughterhousemachine.nomobtoslaughter": "ɐʇɐp ʎʇıʇuǝ buıpןoɥ ɹǝuʍɐds pǝɹǝʍod ɐ ʇɹǝsuı :ɹǝʇɥbnɐןs oʇ qoɯ oN", "ctnhcore.slaughterhousemachine.slaughterhouseinfomobcount": ")%s( %d :sǝdʎ⟘ qoW", "ctnhcore.spacephotovoltaicbasestation.orbit_only": "ǝdıɔǝɹ sıɥʇ unɹ oʇ ʇuǝɯoɹıʌuǝ ʇıqɹo spǝǝN", "ctnhcore.spacephotovoltaicbasestation.spacephotovoltaicbasestationinfopvctier0": "%d :ɹǝıʇ ʞɔoןq ɔıɐʇןoʌoʇoɥd ʇuǝɹɹnƆ", @@ -982,6 +996,7 @@ "ctnhcore.superconducting_penning_trap.antielectric": "%d :ʇunoɯɐ uoɹʇısoԀ", "ctnhcore.superconducting_penning_trap.antinu": "%d :ʇunoɯɐ uoɹʇnǝuıʇuⱯ", "ctnhcore.superconducting_penning_trap.antiproton": "%d :ʇunoɯɐ uoʇoɹdıʇuⱯ", + "ctnhcore.superconducting_penning_trap.insufficientpower": "unɹ ʇouuɐɔ ǝuıɥɔɐɯ ǝɥʇ 'ʎןddns ɹǝʍod snonuıʇuoɔ ɐ spǝǝu pןǝıɟ ʇuǝɯuıɐʇuoɔ ǝɥʇ :ɹǝʍod ʇuǝıɔıɟɟnsuI", "ctnhcore.superconducting_penning_trap.noenergywaring": "¡ןıɐɟ oʇ ʇnoqɐ sı pןǝıɟ ʇuǝɯuıɐʇuoɔ ǝɥʇ ؛ɹǝʍod ʇuǝıɔıɟɟnsuı :buıuɹɐMɔ§", "ctnhcore.superconducting_penning_trap.restoredanger": "sןɐıɹǝʇɐɯ snopɹɐzɐɥ uıɐʇuoƆ", "ctnhcore.superconducting_penning_trap.trapelectricmax": "∩Ǝ %d :ɹǝʍod pǝɹoʇs ɯnɯıxɐW", @@ -1000,6 +1015,9 @@ "ctnhcore.voidminerprocessingmachine.voidminerinfooverheat": "¡¡¡buıʇɐǝɥɹǝʌO", "ctnhcore.voidminerprocessingmachine.voidminerinfopyrotheum": " %d :uoıʇdɯnsuoɔ ɯnǝɥʇoɹʎԀ", "ctnhcore.wideparticleaccelerator.connect": "pǝɥsıןqɐʇsǝ uoıʇɔǝuuoƆ", + "ctnhcore.wideparticleaccelerator.electricspeedinsufficient": "ΛǝW ɟᄅ˙% ʎןuo ʎןʇuǝɹɹnɔ 'ΛǝW ɟᄅ˙% spǝǝu ǝdıɔǝɹ ǝɥʇ :ʍoן ooʇ ʎʇıɔoןǝʌ uoɹʇɔǝןƎ", + "ctnhcore.wideparticleaccelerator.nuspeedinsufficient": "ΛǝW ɟᄅ˙% ʎןuo ʎןʇuǝɹɹnɔ 'ΛǝW ɟᄅ˙% spǝǝu ǝdıɔǝɹ ǝɥʇ :ʍoן ooʇ ʎʇıɔoןǝʌ uoɹʇnǝN", + "ctnhcore.wideparticleaccelerator.protonspeedinsufficient": "ΛǝW ɟᄅ˙% ʎןuo ʎןʇuǝɹɹnɔ 'ΛǝW ɟᄅ˙% spǝǝu ǝdıɔǝɹ ǝɥʇ :ʍoן ooʇ ʎʇıɔoןǝʌ uoʇoɹԀ", "ctnhcore.wideparticleaccelerator.wideacceleratorinfoconsume": "ɟᄅ˙% :ɹǝıןdıʇןnW uoıʇdɯnsuoƆ ɹǝʍoԀ", "ctnhcore.wideparticleaccelerator.wideacceleratorinfoelectricspeed": "ΛǝW ɟᄅ˙% :ʎʇıɔoןǝΛ uoɹʇɔǝןƎ", "ctnhcore.wideparticleaccelerator.wideacceleratorinfonuspeed": "ΛǝW ɟᄅ˙% :ʎʇıɔoןǝΛ uoɹʇnǝN", diff --git a/src/generated/resources/assets/ctnhcore/lang/en_us.json b/src/generated/resources/assets/ctnhcore/lang/en_us.json index 70181964..84eb65bb 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_us.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_us.json @@ -406,6 +406,7 @@ "ctnhcore.arc_generator.arcgeneratorinfo1": "Current Arc Intensity: %d", "ctnhcore.arc_generator.arcgeneratorinfo2": "Max Supported Efficiency: %.2f%%", "ctnhcore.arc_generator.arcgeneratorinfo3": "Current Efficiency: %.2f%%", + "ctnhcore.arc_generator.arcintensityinsufficient": "Insufficient arc intensity: this recipe needs %d, currently %d", "ctnhcore.arc_reactor.arcreactorarc": "Output Arc Intensity: %d", "ctnhcore.arc_reactor.arcreactorconnect": "§bBridge Enabled§r", "ctnhcore.astronomicalmachine.astronomicalinfoinvalid": "Can only be used at night", @@ -426,6 +427,11 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "When recipe runtime is less than 1 tick, parallel calculations will be performed automatically.", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "The use of the laser chamber is permitted", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "Recipe modification failed", + "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientinput": "Not enough input materials to run the recipe once", + "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "Insufficient machine output: recipe requires %s EU/t, current limit is %s EU/t", + "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "This recipe defines no EU output", + "ctnhcore.ctnhcommontooltips.recipemodifieroutputfull": "Output is full; the recipe products cannot be stored", + "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "This recipe type is not supported by this machine", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "Use an Annihilation Plane at the world height limit to obtain large amounts", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "Village librarians guard this ancient technique - prove yourself as a Hero of the Village to learn it", "ctnhcore.ctnhcoreemiplugin.bloodmagicgregtechhv": "Use this item as an offering in the Falling Star Beacon Ritual to summon meteorites", @@ -501,6 +507,7 @@ "ctnhcore.factorymachine.sweatshopinfovillagercount": "Employee Count: %s", "ctnhcore.forestmachine.forestmachineinfohumidity": "Humidity level: %d", "ctnhcore.forestmachine.forestmachineinfoparallelcount": "Parallel count: %d", + "ctnhcore.hyperplasmaturbinemachine.insufficientoutputpower": "Insufficient plasma turbine output: recipe requires %s EU/t, current limit is %s EU/t (supply more CWU/t to raise the limit)", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip0": "§5FINAL FANTASY §fof §a Precise Computation §f and §e Plasma Energy", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip1": "Provide %d computation to reach the Base Production. For every %d computation provided, the Output Production DOUBLES.", "ctnhcore.idataitem.datanoise": "Current noise: %s", @@ -510,6 +517,7 @@ "ctnhcore.idroneitem.itemdroneeut": "Voltage generated by one drone: %d EU/t", "ctnhcore.idroneitem.itemdronetier": "Drone Tier: %d", "ctnhcore.industrialprimitiveblastfurnacemachine.industrialprimitiveblastfurnaceinfoparallelcount": "Parallel count: %d", + "ctnhcore.kineticelectricmultiblockmachine.insufficientkineticspeed": "Insufficient kinetic speed: currently %d, at least 64 required", "ctnhcore.largenaquadahreactormachine.power": "Power: %s", "ctnhcore.machinemodefancyconfiguratortest.cryotheumfreezerui1": "Current freezer speed: %.2f / %.2f", "ctnhcore.machinemodefancyconfiguratortest.cryotheumfreezerui2": "Open Upgrade Panel", @@ -533,6 +541,7 @@ "ctnhcore.meadvancedterminalbehavior.itemmeadvancedterminalsetting7tooltip": "Place blocks in fluids (0: disabled, 1: enabled)\nWhen enabled, fluids in the space are treated as empty space\nWhen enabled together with Place Fluids, fluids will not be placed in fluids", "ctnhcore.meadvancedterminalbehavior.itemmeadvancedterminalsettingtitle": "Multiblock Formation Settings", "ctnhcore.mechanical.mechanicallathestructure": "The lathe in the structure must be placed exactly as shown in EMI's structure information, including position and orientation", + "ctnhcore.megaturbinemachine.missingrotorholder": "No rotor holder found; the multiblock structure is incomplete", "ctnhcore.multiblocksa.advancedcokeoventooltip0": "Advanced Coke Oven", "ctnhcore.multiblocksa.advancedcokeoventooltip1": "§6§lComes with 32 parallelism", "ctnhcore.multiblocksa.advancedcokeoventooltip2": "Can only run coke oven recipes, and recipe time is fixed at 15 seconds", @@ -903,12 +912,15 @@ "ctnhcore.ore_vein.zanite_vein_at": "Aether Zanite Vein", "ctnhcore.ore_vein.zinc_vein_ow": "Overworld Zinc Vein", "ctnhcore.ore_vein.zirkelite_vein": "Zirkelite Vein", + "ctnhcore.photovoltaicdronestation.onlyinorbit": "Mining recipes can only run in orbit dimensions", "ctnhcore.photovoltaicdronestation.pvdroneinfot1": "Power supplied: %d", "ctnhcore.photovoltaicdronestation.pvdroneinfot2": "Drone consumption chance: %.4f", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfo1": "Efficiency: %s%%", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfo2": "Generating: %s/%s EU/t", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfoinvalid": "Shadowed", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfonight": "At night", + "ctnhcore.plasmaalloyblast.coiltiertoolow": "Coil temperature too low: cannot provide a parallel tier (requires a coil of at least 1800K)", + "ctnhcore.plasmaalloyblast.missingplasma": "Missing plasma: no valid plasma input was consumed", "ctnhcore.ponder.assembly_line_building.header": "How to automate Assembly Line", "ctnhcore.ponder.assembly_line_building.text_1": "First, place an Assembly Line controller.", "ctnhcore.ponder.assembly_line_building.text_10": "Encode the one-click pattern with the '+' button, then set the pattern provider lock mode to wait for the main product.", @@ -971,8 +983,10 @@ "ctnhcore.scalablereservoircomputingmachine.ctnhsrcsacrificelocked": "Sacrifice LOCKED", "ctnhcore.scalablereservoircomputingmachine.ctnhsrcsacrificeunlocked": "Sacrifice UNLOCKED", "ctnhcore.scalablereservoircomputingmachine.ctnhsrcwetwareduration": "Wetware duration: %s ticks", + "ctnhcore.sinopechemical.coiltiertoolow": "Coil temperature too low: cannot compute the acceleration tier (requires a coil of at least 1800K)", "ctnhcore.sinopechemical.sinopechemicalinfolevel": "Coil Accelerating Rate: %d", "ctnhcore.sinopechemical.sinopechemicalinfoparallel": "Parallel Count: %d", + "ctnhcore.slaughterhousemachine.nomobtoslaughter": "No mob to slaughter: insert a powered spawner holding entity data", "ctnhcore.slaughterhousemachine.slaughterhouseinfomobcount": "Mob Types: %d (%s)", "ctnhcore.spacephotovoltaicbasestation.orbit_only": "Needs orbit enviroment to run this recipe", "ctnhcore.spacephotovoltaicbasestation.spacephotovoltaicbasestationinfopvctier0": "Current photovoltaic block tier: %d", @@ -982,6 +996,7 @@ "ctnhcore.superconducting_penning_trap.antielectric": "Positron amount: %d", "ctnhcore.superconducting_penning_trap.antinu": "Antineutron amount: %d", "ctnhcore.superconducting_penning_trap.antiproton": "Antiproton amount: %d", + "ctnhcore.superconducting_penning_trap.insufficientpower": "Insufficient power: the containment field needs a continuous power supply, the machine cannot run", "ctnhcore.superconducting_penning_trap.noenergywaring": "§cWarning: insufficient power; the containment field is about to fail!", "ctnhcore.superconducting_penning_trap.restoredanger": "Contain hazardous materials", "ctnhcore.superconducting_penning_trap.trapelectricmax": "Maximum stored power: %d EU", @@ -1000,6 +1015,9 @@ "ctnhcore.voidminerprocessingmachine.voidminerinfooverheat": "Overheating!!!", "ctnhcore.voidminerprocessingmachine.voidminerinfopyrotheum": "Pyrotheum consumption: %d ", "ctnhcore.wideparticleaccelerator.connect": "Connection established", + "ctnhcore.wideparticleaccelerator.electricspeedinsufficient": "Electron velocity too low: the recipe needs %.2f MeV, currently only %.2f MeV", + "ctnhcore.wideparticleaccelerator.nuspeedinsufficient": "Neutron velocity too low: the recipe needs %.2f MeV, currently only %.2f MeV", + "ctnhcore.wideparticleaccelerator.protonspeedinsufficient": "Proton velocity too low: the recipe needs %.2f MeV, currently only %.2f MeV", "ctnhcore.wideparticleaccelerator.wideacceleratorinfoconsume": "Power Consumption Multiplier: %.2f", "ctnhcore.wideparticleaccelerator.wideacceleratorinfoelectricspeed": "Electron Velocity: %.2f MeV", "ctnhcore.wideparticleaccelerator.wideacceleratorinfonuspeed": "Neutron Velocity: %.2f MeV", diff --git a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json index f30b0626..b94b8ec9 100644 --- a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json +++ b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json @@ -407,6 +407,7 @@ "ctnhcore.arc_generator.arcgeneratorinfo1": "电弧强度:%d", "ctnhcore.arc_generator.arcgeneratorinfo2": "支持最大效率:%.2f%%", "ctnhcore.arc_generator.arcgeneratorinfo3": "当前效率:%.2f%%", + "ctnhcore.arc_generator.arcintensityinsufficient": "电弧强度不足:本次配方需要 %d,当前仅有 %d", "ctnhcore.arc_reactor": "电弧发生", "ctnhcore.arc_reactor.arcreactorarc": "可输出的电弧强度:%d", "ctnhcore.arc_reactor.arcreactorconnect": "§b桥接已启用§r", @@ -441,6 +442,11 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "当配方运行时间小于1t时,会自动计算并行", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "允许使用激光仓", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "配方修改失败", + "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientinput": "输入材料不足,无法运行一次配方", + "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "机器输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t", + "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "该配方没有定义 EU 输出", + "ctnhcore.ctnhcommontooltips.recipemodifieroutputfull": "输出仓已满,配方产物无处存放", + "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "该配方类型不被这台机器支持", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "使用破坏面板挖世界高度上限即可大量获得", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "村庄里的图书管理员掌握这个古老的技术,成为村庄英雄后他就会传授给你", "ctnhcore.ctnhcoreemiplugin.bloodmagicgregtechhv": "在坠星位标仪式中使用此物品作为祭品可以召唤陨石", @@ -531,6 +537,7 @@ "ctnhcore.high_pressure_alkali_digestion": "高压碱煮", "ctnhcore.homemade_bedrock_ore_machine": "", "ctnhcore.hot_coolant_turbine": "热冷却涡轮", + "ctnhcore.hyperplasmaturbinemachine.insufficientoutputpower": "等离子涡轮输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t(提供更多算力可提升上限)", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip0": "§a精密计算§f与§e等离子体§f的§5终极艺术", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip1": "提供%d算力以达到基础功率,每提供%d算力,输出功率翻一倍", "ctnhcore.idataitem.datanoise": "当前噪声值:%s", @@ -542,6 +549,7 @@ "ctnhcore.industrial_altar": "§4工业血之祭坛§r", "ctnhcore.industrialprimitiveblastfurnacemachine.industrialprimitiveblastfurnaceinfoparallelcount": "并行数:%d", "ctnhcore.ion_exchanger": "离子交换", + "ctnhcore.kineticelectricmultiblockmachine.insufficientkineticspeed": "动力转速不足:当前 %d,至少需要 64", "ctnhcore.large_naquadah_reactor": "大型硅岩反应", "ctnhcore.largenaquadahreactormachine.power": "发电倍率: %s", "ctnhcore.laser_sorter_recipe": "激光分配", @@ -575,6 +583,7 @@ "ctnhcore.mechanical_mixer_recipes": "机械搅拌", "ctnhcore.mechanical_pressor_recipes": "机械辊压", "ctnhcore.mechanical_sifter_recipes": "机械筛选", + "ctnhcore.megaturbinemachine.missingrotorholder": "未找到涡轮转子支架,多方块结构不完整", "ctnhcore.multiblocksa.advancedcokeoventooltip0": "高级焦炉", "ctnhcore.multiblocksa.advancedcokeoventooltip1": "§6§l自带32并行", "ctnhcore.multiblocksa.advancedcokeoventooltip2": "只可运行焦炉配方,且运行配方时间固定为15s", @@ -955,6 +964,7 @@ "ctnhcore.phase_inversion": "反相蚀刻", "ctnhcore.photovoltaic_assember": "太空光伏组装", "ctnhcore.photovoltaic_generator": "光伏发电", + "ctnhcore.photovoltaicdronestation.onlyinorbit": "只能在轨道维度执行挖矿配方", "ctnhcore.photovoltaicdronestation.pvdroneinfot1": "提供的能量:%d", "ctnhcore.photovoltaicdronestation.pvdroneinfot2": "无人机消耗概率:%.4f", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfo1": "发电效率:%s%%", @@ -962,6 +972,8 @@ "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfoinvalid": "有方块阻挡", "ctnhcore.photovoltaicpowerstationmachine.photovoltaicpowerstationinfonight": "光照过于微弱", "ctnhcore.plasma_condenser": "等离子冷凝", + "ctnhcore.plasmaalloyblast.coiltiertoolow": "线圈温度不足:无法提供并行等级(至少需要 1800K 的线圈)", + "ctnhcore.plasmaalloyblast.missingplasma": "缺少等离子体:没有消耗任何有效的等离子体输入", "ctnhcore.ponder.assembly_line_building.header": "如何自动化装配线", "ctnhcore.ponder.assembly_line_building.text_1": "首先放置装配线主方块。", "ctnhcore.ponder.assembly_line_building.text_10": "使用“+”按钮编码一键模板,并将样板供应器锁定模式改为等待主产物返回。", @@ -1033,10 +1045,12 @@ "ctnhcore.scalablereservoircomputingmachine.ctnhsrcwetwareduration": "湿件剩余存活时间: %s ticks", "ctnhcore.silica_rock_fuel_refinery": "硅岩燃料精炼", "ctnhcore.sinope": "规模化化工", + "ctnhcore.sinopechemical.coiltiertoolow": "线圈温度不足:无法计算加速等级(至少需要 1800K 的线圈)", "ctnhcore.sinopechemical.sinopechemicalinfolevel": "线圈加速倍率:%d", "ctnhcore.sinopechemical.sinopechemicalinfoparallel": "并行数:%d", "ctnhcore.sintering_kiln": "烧结", "ctnhcore.slaughter_house": "屠宰场", + "ctnhcore.slaughterhousemachine.nomobtoslaughter": "没有可宰杀的怪物:请放入带有实体数据的电动刷怪笼", "ctnhcore.slaughterhousemachine.slaughterhouseinfomobcount": "怪物种类:%d (%s)", "ctnhcore.solvent_extraction": "溶剂萃取", "ctnhcore.spacephotovoltaicbasestation.orbit_only": "该配方需要在空间站维度运行", @@ -1047,6 +1061,7 @@ "ctnhcore.superconducting_penning_trap.antielectric": "反电子量:%d", "ctnhcore.superconducting_penning_trap.antinu": "反中子量:%d", "ctnhcore.superconducting_penning_trap.antiproton": "反质子量:%d", + "ctnhcore.superconducting_penning_trap.insufficientpower": "供电不足:约束场需要持续供电,机器无法运行", "ctnhcore.superconducting_penning_trap.noenergywaring": "§c警告:供电不足,约束场即将失效!", "ctnhcore.superconducting_penning_trap.restoredanger": "约束危险物质", "ctnhcore.superconducting_penning_trap.trapelectricmax": "允许存储电量上限:%deu", @@ -1070,6 +1085,9 @@ "ctnhcore.voidminerprocessingmachine.voidminerinfopyrotheum": "烈焰之炽焱消耗:%d ", "ctnhcore.water_power": "水力发电", "ctnhcore.wideparticleaccelerator.connect": "连接已搭建", + "ctnhcore.wideparticleaccelerator.electricspeedinsufficient": "电子速度不足:配方需要 %.2f MeV,当前仅 %.2f MeV", + "ctnhcore.wideparticleaccelerator.nuspeedinsufficient": "中子速度不足:配方需要 %.2f MeV,当前仅 %.2f MeV", + "ctnhcore.wideparticleaccelerator.protonspeedinsufficient": "质子速度不足:配方需要 %.2f MeV,当前仅 %.2f MeV", "ctnhcore.wideparticleaccelerator.wideacceleratorinfoconsume": "电量消耗倍率:%.2f", "ctnhcore.wideparticleaccelerator.wideacceleratorinfoelectricspeed": "电子速度:%.2fMev", "ctnhcore.wideparticleaccelerator.wideacceleratorinfonuspeed": "中子速度:%.2fMev", diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/KineticElectricMultiblockMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/KineticElectricMultiblockMachine.java index ef0d773b..c418bc6b 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/KineticElectricMultiblockMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/KineticElectricMultiblockMachine.java @@ -30,6 +30,8 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; +import com.ctnhlang.CN; +import com.ctnhlang.EN; import com.mo_guang.ctpp.common.blockentity.IKineticBlockEntityExtension; import com.mo_guang.ctpp.common.blockentity.KineticMachineBlockEntity; import com.mo_guang.ctpp.common.machine.IKineticMachine; @@ -38,6 +40,7 @@ import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.longs.LongSets; import org.jetbrains.annotations.NotNull; +import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang; import java.util.ArrayList; import java.util.List; @@ -46,6 +49,10 @@ public class KineticElectricMultiblockMachine extends RecipeMultiblockMachine implements IFancyUIMachine, IDisplayUIMachine, ITieredMachine, IOverclockMachine { + @CN("动力转速不足:当前 %d,至少需要 64") + @EN("Insufficient kinetic speed: currently %d, at least 64 required") + public static Lang insufficientKineticSpeed; + public KineticElectricMultiblockMachine(IMachineBlockEntity holder) { super(holder, new Object[0]); } @@ -255,7 +262,7 @@ public Component beforeWorking(@NotNull GTRecipe recipe) { this.updateRotateBlocks(true); } if (this.speed < 64) { - return Component.translatable("gtceu.recipe_logic.insufficient_in"); + return insufficientKineticSpeed.translate((int) this.speed); } return null; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/SlaughterHouseMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/SlaughterHouseMachine.java index e0b33a32..c2e5b673 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/SlaughterHouseMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/SlaughterHouseMachine.java @@ -70,6 +70,10 @@ public class SlaughterHouseMachine extends RecipeElectricMultiblockMachine imple @EN("Mob Types: %d (%s)") public static Lang slaughterHouseInfoMobcount; + @CN("没有可宰杀的怪物:请放入带有实体数据的电动刷怪笼") + @EN("No mob to slaughter: insert a powered spawner holding entity data") + public static Lang noMobToSlaughter; + @Persisted public final NotifiableItemStackHandler machineStorage; public UUID uuid = UUID.randomUUID(); @@ -243,7 +247,7 @@ public Component beforeWorking(@NotNull GTRecipe recipe) { var failReason = super.beforeWorking(recipe); if (failReason != null) return failReason; ensureMobListUpToDate(); - return mobList.isEmpty() ? RecipeModifier.DEFAULT_FAILURE : null; + return mobList.isEmpty() ? noMobToSlaughter.translate() : null; } public void resetMobList() { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java index 126c1b14..7bd3a52a 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java @@ -1,7 +1,7 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.electric; import io.github.cpearl0.ctnhcore.registry.material.CTNHMaterials; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; +import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; import com.gregtechceu.gtceu.api.capability.recipe.FluidRecipeCapability; import com.gregtechceu.gtceu.api.capability.recipe.IO; @@ -90,7 +90,7 @@ public void addDisplayText(@NotNull List textList) { public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { int parallel = ParallelLogic.getParallelAmount(group, recipe, 8); if (parallel == 0) - return CTNHCommonTooltips.gtceuRecipeModifierDefaultFail.translate(); + return CTNHRecipeHelper.diagnoseParallelFailure(group, recipe); recipe.multiplyEUt(0.5); recipe.multiplyAllContents(parallel); recipe.parallels *= parallel; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/CryotheumFreezer.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/CryotheumFreezer.java index 223b840d..c1b78c6e 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/CryotheumFreezer.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/CryotheumFreezer.java @@ -102,7 +102,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.parallels *= parallel; return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(CryotheumFreezer.class, machine); } @Override diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/FactoryMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/FactoryMachine.java index 6d85bb4f..2e903eec 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/FactoryMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/FactoryMachine.java @@ -2,7 +2,6 @@ import io.github.cpearl0.ctnhcore.registry.CTNHItems; import io.github.cpearl0.ctnhcore.registry.CTNHRecipeModifiers; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.gui.GuiTextures; @@ -234,7 +233,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g var recipeType = recipe.recipeType; var recipeTier = recipe.tier; if (fmachine.basicRate == 0) { - return CTNHCommonTooltips.gtceuRecipeModifierDefaultFail.translate(); + return no_suitable_machine.translate(); } recipe.multiplyDuration(2 / fmachine.basicRate * Math.pow(recipeTier, 2)); if (recipeType.equals(GTRecipeTypes.CENTRIFUGE_RECIPES)) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/LaserSorter.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/LaserSorter.java index 46d6a133..d3719df4 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/LaserSorter.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/LaserSorter.java @@ -74,6 +74,6 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g } return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(LaserSorter.class, machine); } } diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/PlasmaAlloyBlast.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/PlasmaAlloyBlast.java index f1e79a1a..791f44d0 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/PlasmaAlloyBlast.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/PlasmaAlloyBlast.java @@ -17,6 +17,9 @@ import net.minecraft.network.chat.Component; +import com.ctnhlang.CN; +import com.ctnhlang.EN; +import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang; import tech.vixhentx.mcmod.ctnhlib.utils.MachineUtils; import static com.gregtechceu.gtceu.api.fluids.store.FluidStorageKeys.PLASMA; @@ -24,6 +27,14 @@ public class PlasmaAlloyBlast extends CoilWorkableElectricMultiblockMachine { + @CN("线圈温度不足:无法提供并行等级(至少需要 1800K 的线圈)") + @EN("Coil temperature too low: cannot provide a parallel tier (requires a coil of at least 1800K)") + public static Lang coilTierTooLow; + + @CN("缺少等离子体:没有消耗任何有效的等离子体输入") + @EN("Missing plasma: no valid plasma input was consumed") + public static Lang missingPlasma; + public PlasmaAlloyBlast(IMachineBlockEntity holder) { super(holder); } @@ -48,6 +59,7 @@ public void onStructureFormed() { public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { if (machine instanceof PlasmaAlloyBlast pmachine) { + if (pmachine.machine_level <= 0) return coilTierTooLow.translate(); var speed = 1.0; var output = 1.0; var eut = 1.0; @@ -93,7 +105,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g output = 0.5 * (Math.random()); } if (speed <= 0.5) { - return RecipeModifier.DEFAULT_FAILURE; + return missingPlasma.translate(); } recipe.multiplyInputs(parallel); recipe.multiplyOutputs((int) (parallel * output)); @@ -102,6 +114,6 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.parallels *= parallel; return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(PlasmaAlloyBlast.class, machine); } } diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SinopeChemical.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SinopeChemical.java index 572f8be3..ebe9dfa5 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SinopeChemical.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SinopeChemical.java @@ -34,6 +34,9 @@ public class SinopeChemical extends CoilWorkableElectricMultiblockMachine implem @EN("Parallel Count: %d") public static Lang sinopeChemicalInfoParallel; + @CN("线圈温度不足:无法计算加速等级(至少需要 1800K 的线圈)") + @EN("Coil temperature too low: cannot compute the acceleration tier (requires a coil of at least 1800K)") + public static Lang coilTierTooLow; public int parallel = 0; public int machine_tier = 0; @@ -63,6 +66,7 @@ public void onStructureFormed() { public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { if (machine instanceof SinopeChemical zmachine) { + if (zmachine.machine_tier <= 0) return coilTierTooLow.translate(); var maxparallel = ParallelLogic.getParallelAmount(group, recipe, zmachine.parallel); if (maxparallel == 0) return null; var reduce = Math.max(1 - 0.005 * maxparallel, 0.75); @@ -73,7 +77,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.parallels *= maxparallel; return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(SinopeChemical.class, machine); } public void addDisplayText(List textList) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SpacePhotovoltaicBaseStation.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SpacePhotovoltaicBaseStation.java index 769b160e..6b65fb0a 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SpacePhotovoltaicBaseStation.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/SpacePhotovoltaicBaseStation.java @@ -187,7 +187,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g return null; } } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(SpacePhotovoltaicBaseStation.class, machine); } public void addDisplayText(List textList) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/Superconducting_Penning_Trap.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/Superconducting_Penning_Trap.java index 63f24730..c0aeb5e6 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/Superconducting_Penning_Trap.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/Superconducting_Penning_Trap.java @@ -55,6 +55,10 @@ public class Superconducting_Penning_Trap extends RecipeElectricMultiblockMachin @EN("Current stored power: %d EU") public static Lang trapElectric; + @CN("供电不足:约束场需要持续供电,机器无法运行") + @EN("Insufficient power: the containment field needs a continuous power supply, the machine cannot run") + public static Lang insufficientPower; + @CN("允许存储电量上限:%deu") @EN("Maximum stored power: %d EU") public static Lang trapElectricMax; @@ -150,7 +154,7 @@ private void consumeEnergy() { if (tickwarring >= 100) { doExplosion(3f); } - getRecipeLogic().setWaiting(Component.translatable("gtceu.recipe_logic.insufficient_in")); + getRecipeLogic().setWaiting(insufficientPower.translate()); } } else { this.energyContainer.removeEnergy(this.energyContainer.getEnergyStored()); @@ -159,7 +163,7 @@ private void consumeEnergy() { if (tickwarring > 200 && danger()) { doExplosion(9f); } - getRecipeLogic().setWaiting(Component.translatable("gtceu.recipe_logic.insufficient_in")); + getRecipeLogic().setWaiting(insufficientPower.translate()); } } diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/WideParticleAccelerator.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/WideParticleAccelerator.java index 8f85b6aa..2a8cdbaa 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/WideParticleAccelerator.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/WideParticleAccelerator.java @@ -1,7 +1,6 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.electric; import io.github.cpearl0.ctnhcore.common.gui.WPAAcceleratorGui; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; import com.gregtechceu.gtceu.api.capability.IParallelHatch; import com.gregtechceu.gtceu.api.gui.fancy.TabsWidget; @@ -18,6 +17,7 @@ import com.gregtechceu.gtceu.api.recipe.GTRecipe; import com.gregtechceu.gtceu.api.recipe.handler.RecipeHandlerGroup; import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic; +import com.gregtechceu.gtceu.api.recipe.modifier.RecipeModifier; import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted; @@ -66,6 +66,18 @@ public class WideParticleAccelerator extends RecipeElectricMultiblockMachine @EN("Proton Velocity: %.2f MeV") public static Lang wideAcceleratorInfoProtonSpeed; + @CN("中子速度不足:配方需要 %.2f MeV,当前仅 %.2f MeV") + @EN("Neutron velocity too low: the recipe needs %.2f MeV, currently only %.2f MeV") + public static Lang nuSpeedInsufficient; + + @CN("电子速度不足:配方需要 %.2f MeV,当前仅 %.2f MeV") + @EN("Electron velocity too low: the recipe needs %.2f MeV, currently only %.2f MeV") + public static Lang electricSpeedInsufficient; + + @CN("质子速度不足:配方需要 %.2f MeV,当前仅 %.2f MeV") + @EN("Proton velocity too low: the recipe needs %.2f MeV, currently only %.2f MeV") + public static Lang protonSpeedInsufficient; + @Persisted @Getter public double nu_speed = 0; @@ -250,15 +262,17 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g } // 速度不足 if (recipe.data.getString("type").equals("nu") && recipe.data.getDouble("speed") >= wmachine.nu_speed) { - return CTNHCommonTooltips.gtceuRecipeModifierDefaultFail.translate(); + return nuSpeedInsufficient.translate(recipe.data.getDouble("speed"), wmachine.nu_speed); } if (recipe.data.getString("type").equals("element") && recipe.data.getDouble("speed") >= wmachine.electric_speed) { - return CTNHCommonTooltips.gtceuRecipeModifierDefaultFail.translate(); + return electricSpeedInsufficient.translate(recipe.data.getDouble("speed"), + wmachine.electric_speed); } if (recipe.data.getString("type").equals("proton") && recipe.data.getDouble("speed") >= wmachine.proton_speed) { - return CTNHCommonTooltips.gtceuRecipeModifierDefaultFail.translate(); + return protonSpeedInsufficient.translate(recipe.data.getDouble("speed"), + wmachine.proton_speed); } // 计算并行 int parallel = 1; @@ -354,7 +368,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.multiplyDuration(Math.max(0.1, muti)); return null; } - return CTNHCommonTooltips.gtceuRecipeModifierDefaultFail.translate(); + return RecipeModifier.nullWrongType(WideParticleAccelerator.class, machine); } @Override diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/Arc_Generator.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/Arc_Generator.java index df009ab2..68929dd0 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/Arc_Generator.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/Arc_Generator.java @@ -35,6 +35,10 @@ public class Arc_Generator extends RecipeElectricMultiblockMachine implements IT @EN("Current Efficiency: %.2f%%") public static Lang arcgeneratorInfo3; + @CN("电弧强度不足:本次配方需要 %d,当前仅有 %d") + @EN("Insufficient arc intensity: this recipe needs %d, currently %d") + public static Lang arcIntensityInsufficient; + public int arc = 0; public int arc_max = 0; public double efficiency = 0; @@ -49,10 +53,11 @@ public Arc_Generator(IMachineBlockEntity holder, double efficiency, int arc_max) @Override public Component beforeWorking(@NotNull GTRecipe recipe) { - if (arc < recipe.data.getInt("requirearc")) { - return RecipeModifier.DEFAULT_FAILURE; + var requiredArc = recipe.data.getInt("requirearc"); + if (arc < requiredArc) { + return arcIntensityInsufficient.translate(requiredArc, arc); } - arc -= recipe.data.getInt("requirearc") / 10; + arc -= requiredArc / 10; arc = Math.max(0, arc); return super.beforeWorking(recipe); @@ -68,7 +73,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.multiplyEUt(rotor); return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(Arc_Generator.class, machine); } public void addDisplayText(List textList) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java index 93ea9a94..4182b8be 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java @@ -1,5 +1,7 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; + import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.fluids.store.FluidStorageKeys; @@ -12,7 +14,6 @@ import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic; import com.gregtechceu.gtceu.api.recipe.modifier.RecipeModifier; import com.gregtechceu.gtceu.common.data.GTMaterials; -import com.gregtechceu.gtceu.common.machine.multiblock.generator.LargeCombustionEngineMachine; import com.gregtechceu.gtceu.data.recipe.builder.GTRecipeBuilder; import com.lowdragmc.lowdraglib.side.fluid.FluidHelper; @@ -64,7 +65,7 @@ protected GTRecipe getBoostRecipe() { public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandlerGroup group, @NotNull GTRecipe recipe) { if (!(machine instanceof ChemicalGeneratorMachine engineMachine)) { - return RecipeModifier.nullWrongType(LargeCombustionEngineMachine.class, machine); + return RecipeModifier.nullWrongType(ChemicalGeneratorMachine.class, machine); } long EUt = RecipeHelper.getRealEUtWithIO(recipe); // has lubricant @@ -77,7 +78,7 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl recipe.parallels *= actualParallel; return null; } - return RecipeModifier.DEFAULT_FAILURE; + return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); } protected double getProductionBoost() { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java index 95c3a2d3..1617e1ff 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java @@ -4,6 +4,7 @@ import io.github.cpearl0.ctnhcore.common.blockentity.TurbineRotorBE; import io.github.cpearl0.ctnhcore.common.machine.multiblock.MultiblockComputationMachine; import io.github.cpearl0.ctnhcore.data.recipe.utils.ComputationModifier; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability; @@ -22,8 +23,11 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import com.ctnhlang.CN; +import com.ctnhlang.EN; import org.jetbrains.annotations.NotNull; import org.joml.Vector3i; +import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang; import java.util.List; @@ -31,6 +35,10 @@ public class HyperPlasmaTurbineMachine extends MultiblockComputationMachine { + @CN("等离子涡轮输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t(提供更多算力可提升上限)") + @EN("Insufficient plasma turbine output: recipe requires %s EU/t, current limit is %s EU/t (supply more CWU/t to raise the limit)") + public static Lang insufficientOutputPower; + public static final long BASE_EU_OUTPUT = GTValues.V[GTValues.ZPM] * 288;/* 有算力时的基础功率 */ public static final long DEFAULT_EU_OUTPUT = GTValues.V[GTValues.ZPM];/* 没有算力时的默认功率 */ public static final int CWUtStair = 64; @@ -173,7 +181,11 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl final long EUt = RecipeHelper.getRealEUtWithIO(recipe); final long turbineMaxVoltage = hptm.getOverclockVoltage(); - if (EUt <= 0 || turbineMaxVoltage <= EUt) return RecipeModifier.DEFAULT_FAILURE; + if (EUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); + if (turbineMaxVoltage <= EUt) { + return insufficientOutputPower.translate(FormattingUtil.formatNumbers(EUt), + FormattingUtil.formatNumbers(turbineMaxVoltage)); + } // get the amount of parallel required to match the desired output voltage final double euMultiplier = getEfficiency(); diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java index 276fb7e1..8e765ed5 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java @@ -2,6 +2,7 @@ import io.github.cpearl0.ctnhcore.registry.CTNHRecipeTypes; import io.github.cpearl0.ctnhcore.registry.material.CTNHMaterials; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; @@ -60,7 +61,9 @@ public LargeNaquadahReactorMachine(IMachineBlockEntity holder, Object... args) { private Fluid lockFluid = null; public static Component modifyRecipe(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { - if (recipe.recipeType != CTNHRecipeTypes.LARGE_NAQUADAH_REACTOR_RECIPES) return RecipeModifier.DEFAULT_FAILURE; + if (recipe.recipeType != CTNHRecipeTypes.LARGE_NAQUADAH_REACTOR_RECIPES) { + return CTNHCommonTooltips.recipeModifierUnsupportedRecipeType.translate(); + } if (machine instanceof LargeNaquadahReactorMachine lmachine) { lmachine.checkHatch(lmachine, recipe.duration); if (!lmachine.hasAir) { @@ -71,7 +74,7 @@ public static Component modifyRecipe(MetaMachine machine, RecipeHandlerGroup gro recipe.multiplyEUt(lmachine.getFinalPowerRate()); return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(LargeNaquadahReactorMachine.class, machine); } private void checkHatch(LargeNaquadahReactorMachine machine, int duration) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java index fe6414b6..48776e49 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java @@ -1,5 +1,8 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; +import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; + import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability; import com.gregtechceu.gtceu.api.capability.recipe.RecipeCapability; @@ -21,14 +24,21 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Style; +import com.ctnhlang.CN; +import com.ctnhlang.EN; import lombok.Getter; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang; import java.util.List; public class MegaTurbineMachine extends RecipeElectricMultiblockMachine implements ITieredMachine { + @CN("未找到涡轮转子支架,多方块结构不完整") + @EN("No rotor holder found; the multiblock structure is incomplete") + public static Lang missingRotorHolder; + public static final int MIN_DURABILITY_TO_WARN = 10; private final long BASE_EU_OUTPUT; @@ -81,13 +91,22 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl } var rotorHolder = turbineMachine.getRotorHolder(); - if (rotorHolder == null) return RecipeModifier.DEFAULT_FAILURE; + if (rotorHolder == null) return missingRotorHolder.translate(); + if (!rotorHolder.hasRotor()) { + return Component.translatable("gtceu.recipe_modifier.missing_valid_turbine_rotor"); + } long EUt = RecipeHelper.getRealEUtWithIO(recipe); long turbineMaxVoltage = turbineMachine.getOverclockVoltage(); double holderEfficiency = rotorHolder.getTotalEfficiency() / 100.0; - if (EUt <= 0 || turbineMaxVoltage <= EUt || holderEfficiency <= 0) return RecipeModifier.DEFAULT_FAILURE; + if (EUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); + if (holderEfficiency <= 0) { + return Component.translatable("gtceu.recipe_modifier.missing_valid_turbine_rotor"); + } + if (turbineMaxVoltage <= EUt) { + return CTNHRecipeHelper.insufficientOutputPower(EUt, turbineMaxVoltage); + } // get the amount of parallel required to match the desired output voltage int maxParallel = (int) (turbineMaxVoltage / EUt); diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java index efcee56a..4c0359c2 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java @@ -1,5 +1,7 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; + import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.capability.recipe.RecipeCapability; import com.gregtechceu.gtceu.api.data.tag.TagPrefix; @@ -155,7 +157,9 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g } } - if (maxParallel <= 0) return RecipeModifier.DEFAULT_FAILURE; + if (maxParallel <= 0) { + return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); + } recipe.multiplyAllContents(maxParallel); recipe.multiplyDuration(Math.sqrt(maxParallel)); @@ -163,7 +167,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.parallels *= maxParallel; return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(NanoscaleTriboelectricGenerator.class, machine); } @Override diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/PhotoVoltaicDroneStation.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/PhotoVoltaicDroneStation.java index b2ff4252..eb702b39 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/PhotoVoltaicDroneStation.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/PhotoVoltaicDroneStation.java @@ -37,6 +37,10 @@ public class PhotoVoltaicDroneStation extends RecipeElectricMultiblockMachine { @EN("Drone consumption chance: %.4f") public static Lang pvdroneInfoT2; + @CN("只能在轨道维度执行挖矿配方") + @EN("Mining recipes can only run in orbit dimensions") + public static Lang onlyInOrbit; + public PhotoVoltaicDroneStation(IMachineBlockEntity holder, Object... args) { super(holder, args); } @@ -184,7 +188,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g // 运行非挖矿配方时对光伏进行强化 lmachine.eut = (int) eut; else if (!lmachine.orbit) // 只能在轨道维度挖矿 - return RecipeModifier.DEFAULT_FAILURE; + return onlyInOrbit.translate(); else { recipe.multiplyOutputs((int) (0.1 * Math.sqrt(lmachine.GetDronePower()))); return null; @@ -194,7 +198,7 @@ else if (!lmachine.orbit) // 只能在轨道维度挖矿 } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(PhotoVoltaicDroneStation.class, machine); } public void addDisplayText(List textList) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/WaterPowerStationMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/WaterPowerStationMachine.java index 49c6cf14..18e0a65b 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/WaterPowerStationMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/WaterPowerStationMachine.java @@ -35,7 +35,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g recipe.multiplyEUt(wmachine.water * random * wmachine.efficiency / 100); return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(WaterPowerStationMachine.class, machine); } @Override diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/kinetic/MeadowMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/kinetic/MeadowMachine.java index 7215ff75..db36eed2 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/kinetic/MeadowMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/kinetic/MeadowMachine.java @@ -67,6 +67,6 @@ public static Component stressCrossParallel(@NotNull MetaMachine machine, Recipe } return null; } - return RecipeModifier.DEFAULT_FAILURE; + return RecipeModifier.nullWrongType(KineticWorkableMultiblockMachine.class, machine); } } diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java index f9a7bde8..fe801ab4 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java @@ -1,5 +1,8 @@ package io.github.cpearl0.ctnhcore.common.machine.simple; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; +import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; + import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; import com.gregtechceu.gtceu.api.machine.MetaMachine; import com.gregtechceu.gtceu.api.machine.SimpleGeneratorMachine; @@ -50,13 +53,14 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl } long recipeEUt = recipe.getOutputEUt(); - if (recipeEUt <= 0) return RecipeModifier.DEFAULT_FAILURE; + if (recipeEUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); - int maxParallel = (int) (generator.getOverclockVoltage() / recipeEUt); - if (maxParallel <= 0) return RecipeModifier.DEFAULT_FAILURE; + long maxOutput = generator.getOverclockVoltage(); + int maxParallel = (int) (maxOutput / recipeEUt); + if (maxParallel <= 0) return CTNHRecipeHelper.insufficientOutputPower(recipeEUt, maxOutput); int parallels = ParallelLogic.getParallelAmountFast(group, recipe, maxParallel); - if (parallels <= 0) return RecipeModifier.DEFAULT_FAILURE; + if (parallels <= 0) return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); recipe.multiplyAllContents(parallels); recipe.parallels *= parallels; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java b/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java index cb1e09fc..4cb0bb77 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java @@ -2,6 +2,8 @@ import io.github.cpearl0.ctnhcore.common.machine.multiblock.electric.ChemicalPlantMachine; import io.github.cpearl0.ctnhcore.common.machine.simple.EfficiencyGeneratorMachine; +import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; +import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.machine.MetaMachine; @@ -152,13 +154,14 @@ public static Component naquadahReactor(MetaMachine machine, RecipeHandlerGroup } long recipeEUt = recipe.getOutputEUt(); - if (recipeEUt <= 0) return RecipeModifier.DEFAULT_FAILURE; + if (recipeEUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); - int maxParallel = (int) (generator.getOverclockVoltage() / recipeEUt); - if (maxParallel <= 0) return RecipeModifier.DEFAULT_FAILURE; + long maxOutput = generator.getOverclockVoltage(); + int maxParallel = (int) (maxOutput / recipeEUt); + if (maxParallel <= 0) return CTNHRecipeHelper.insufficientOutputPower(recipeEUt, maxOutput); int multiplier = ParallelLogic.getParallelAmountFast(group, recipe, maxParallel); - if (multiplier <= 0) return RecipeModifier.DEFAULT_FAILURE; + if (multiplier <= 0) return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); recipe.multiplyEUt(multiplier); recipe.multiplyDuration(((double) generator.efficiency / 100) / multiplier); diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java index 8c351581..6fcc8bad 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java @@ -40,6 +40,26 @@ public class CTNHCommonTooltips { @EN("Recipe modification failed") public static Lang gtceuRecipeModifierDefaultFail; + @CN("该配方没有定义 EU 输出") + @EN("This recipe defines no EU output") + public static Lang recipeModifierNoEuOutput; + + @CN("机器输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t") + @EN("Insufficient machine output: recipe requires %s EU/t, current limit is %s EU/t") + public static Lang recipeModifierInsufficientOutputPower; + + @CN("输入材料不足,无法运行一次配方") + @EN("Not enough input materials to run the recipe once") + public static Lang recipeModifierInsufficientInput; + + @CN("输出仓已满,配方产物无处存放") + @EN("Output is full; the recipe products cannot be stored") + public static Lang recipeModifierOutputFull; + + @CN("该配方类型不被这台机器支持") + @EN("This recipe type is not supported by this machine") + public static Lang recipeModifierUnsupportedRecipeType; + public static MutableComponent PARALLEL_HATCH = commonTooltipParallelHatch.translate() .withStyle(ChatFormatting.GOLD); public static MutableComponent SUBTICK_PARALLEL = commonTooltipSubtickOverclock.translate() diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java index 0d987d3a..b05df6e0 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java @@ -2,8 +2,12 @@ import com.gregtechceu.gtceu.api.machine.trait.NotifiableItemStackHandler; import com.gregtechceu.gtceu.api.recipe.GTRecipe; +import com.gregtechceu.gtceu.api.recipe.handler.RecipeHandlerGroup; +import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic; import com.gregtechceu.gtceu.common.data.GTRecipeCapabilities; +import com.gregtechceu.gtceu.utils.FormattingUtil; +import net.minecraft.network.chat.Component; import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.ItemHandlerHelper; @@ -13,6 +17,7 @@ import org.jetbrains.annotations.NotNull; import java.util.ArrayList; +import java.util.List; public class CTNHRecipeHelper { @@ -73,4 +78,23 @@ public static ItemStack insertToEmpty(NotifiableItemStackHandler handler, ItemSt } return stack; } + + /** + * 诊断“并行数为 0”的原因:输入仓连一次配方都不够,还是产物堵塞了输出仓。 + * 供各类并行机器的 {@code recipeModifier} 生成面向玩家的失败原因。 + */ + public static Component diagnoseParallelFailure(@NotNull RecipeHandlerGroup group, @NotNull GTRecipe recipe) { + if (ParallelLogic.getMaxByInput(group, recipe, 1, true, List.of()) <= 0) { + return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); + } + return CTNHCommonTooltips.recipeModifierOutputFull.translate(); + } + + /** + * 机器输出上限不足以承载配方所需的 EU/t。 + */ + public static Component insufficientOutputPower(long requiredEUt, long maxEUt) { + return CTNHCommonTooltips.recipeModifierInsufficientOutputPower.translate( + FormattingUtil.formatNumbers(requiredEUt), FormattingUtil.formatNumbers(maxEUt)); + } } From 5d9df1c8dbc4ad500a53d98587510e08a918e454 Mon Sep 17 00:00:00 2001 From: mmyddd Date: Thu, 10 Sep 2026 23:58:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?style(core):=20=E5=BA=94=E7=94=A8=20spotles?= =?UTF-8?q?s=20=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正 RecipeRemoval 中类体起始空行导致的 spotlessJavaCheck 失败 - 该违规自 dev 分支继承而来,本次一并修正以保证 spotlessCheck 通过 --- .../io/github/cpearl0/ctnhcore/data/recipe/RecipeRemoval.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/io/github/cpearl0/ctnhcore/data/recipe/RecipeRemoval.java b/src/main/java/io/github/cpearl0/ctnhcore/data/recipe/RecipeRemoval.java index 2bf8e6bf..cadf45fd 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/data/recipe/RecipeRemoval.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/data/recipe/RecipeRemoval.java @@ -51,7 +51,6 @@ public static void remove(RecipeRemovalHelper.RemoveFilter filter) { * 最终在 {@code RecipeManagerApplyMixin} 中统一处理。 */ public static void init() { - // ===== 外部类删除(与 RecipeRemoval 同模块/相关模块) ===== EIORecipes.eioRemovals(); QuantumOmniRecipes.omniRemovals(); From 23468a36ba98169283aa4073cd74e4149d04406a Mon Sep 17 00:00:00 2001 From: mmyddd Date: Fri, 11 Sep 2026 21:55:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?refactor(machine):=20=E5=B9=B6=E8=A1=8C?= =?UTF-8?q?=E6=95=B0=E4=B8=8D=E8=B6=B3=E6=97=B6=E4=B8=8D=E5=86=8D=E7=8C=9C?= =?UTF-8?q?=E6=B5=8B=E5=A4=B1=E8=B4=A5=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 CTNHRecipeHelper.diagnoseParallelFailure:不再由机器推断是输入不足还是输出堵塞 - 烈焰高炉、纳米摩擦发电机、效率发电机、硅岩反应堆在并行数小于 1 时改为按 1 并行继续 - 由后续配方匹配(RecipeHelper.matchContents)给出真实失败原因,与普通机器口径一致 - 移除随之不再使用的两条文案 recipeModifierInsufficientInput、recipeModifierOutputFull - 保留 recipeModifierNoEuOutput、recipeModifierInsufficientOutputPower:二者为直接计算结果而非推断 - 重新生成语言文件,仅减少上述两个键 --- .../resources/assets/ctnhcore/lang/en_ud.json | 2 -- .../resources/assets/ctnhcore/lang/en_us.json | 2 -- .../resources/assets/ctnhcore/lang/zh_cn.json | 2 -- .../electric/BlazeBlastFurnaceMachine.java | 5 +---- .../generator/NanoscaleTriboelectricGenerator.java | 6 +----- .../machine/simple/EfficiencyGeneratorMachine.java | 3 +-- .../ctnhcore/registry/CTNHRecipeModifiers.java | 3 +-- .../cpearl0/ctnhcore/utils/CTNHCommonTooltips.java | 8 -------- .../cpearl0/ctnhcore/utils/CTNHRecipeHelper.java | 14 -------------- 9 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/generated/resources/assets/ctnhcore/lang/en_ud.json b/src/generated/resources/assets/ctnhcore/lang/en_ud.json index 98f684ac..4b601a03 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_ud.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_ud.json @@ -427,10 +427,8 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "˙ʎןןɐɔıʇɐɯoʇnɐ pǝɯɹoɟɹǝd ǝq ןןıʍ suoıʇɐןnɔןɐɔ ןǝןןɐɹɐd 'ʞɔıʇ Ɩ uɐɥʇ ssǝן sı ǝɯıʇunɹ ǝdıɔǝɹ uǝɥM", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "pǝʇʇıɯɹǝd sı ɹǝqɯɐɥɔ ɹǝsɐן ǝɥʇ ɟo ǝsn ǝɥ⟘", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "pǝןıɐɟ uoıʇɐɔıɟıpoɯ ǝdıɔǝᴚ", - "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientinput": "ǝɔuo ǝdıɔǝɹ ǝɥʇ unɹ oʇ sןɐıɹǝʇɐɯ ʇnduı ɥbnouǝ ʇoN", "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "ʇ/∩Ǝ %s sı ʇıɯıן ʇuǝɹɹnɔ 'ʇ/∩Ǝ %s sǝɹınbǝɹ ǝdıɔǝɹ :ʇndʇno ǝuıɥɔɐɯ ʇuǝıɔıɟɟnsuI", "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "ʇndʇno ∩Ǝ ou sǝuıɟǝp ǝdıɔǝɹ sıɥ⟘", - "ctnhcore.ctnhcommontooltips.recipemodifieroutputfull": "pǝɹoʇs ǝq ʇouuɐɔ sʇɔnpoɹd ǝdıɔǝɹ ǝɥʇ ؛ןןnɟ sı ʇndʇnO", "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "ǝuıɥɔɐɯ sıɥʇ ʎq pǝʇɹoddns ʇou sı ǝdʎʇ ǝdıɔǝɹ sıɥ⟘", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "sʇunoɯɐ ǝbɹɐן uıɐʇqo oʇ ʇıɯıן ʇɥbıǝɥ pןɹoʍ ǝɥʇ ʇɐ ǝuɐןԀ uoıʇɐןıɥıuuⱯ uɐ ǝs∩", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "ʇı uɹɐǝן oʇ ǝbɐןןıΛ ǝɥʇ ɟo oɹǝH ɐ sɐ ɟןǝsɹnoʎ ǝʌoɹd - ǝnbıuɥɔǝʇ ʇuǝıɔuɐ sıɥʇ pɹɐnb suɐıɹɐɹqıן ǝbɐןןıΛ", diff --git a/src/generated/resources/assets/ctnhcore/lang/en_us.json b/src/generated/resources/assets/ctnhcore/lang/en_us.json index 84eb65bb..4f4f3d94 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_us.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_us.json @@ -427,10 +427,8 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "When recipe runtime is less than 1 tick, parallel calculations will be performed automatically.", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "The use of the laser chamber is permitted", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "Recipe modification failed", - "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientinput": "Not enough input materials to run the recipe once", "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "Insufficient machine output: recipe requires %s EU/t, current limit is %s EU/t", "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "This recipe defines no EU output", - "ctnhcore.ctnhcommontooltips.recipemodifieroutputfull": "Output is full; the recipe products cannot be stored", "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "This recipe type is not supported by this machine", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "Use an Annihilation Plane at the world height limit to obtain large amounts", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "Village librarians guard this ancient technique - prove yourself as a Hero of the Village to learn it", diff --git a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json index b94b8ec9..f00f0c3c 100644 --- a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json +++ b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json @@ -442,10 +442,8 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "当配方运行时间小于1t时,会自动计算并行", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "允许使用激光仓", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "配方修改失败", - "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientinput": "输入材料不足,无法运行一次配方", "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "机器输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t", "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "该配方没有定义 EU 输出", - "ctnhcore.ctnhcommontooltips.recipemodifieroutputfull": "输出仓已满,配方产物无处存放", "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "该配方类型不被这台机器支持", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "使用破坏面板挖世界高度上限即可大量获得", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "村庄里的图书管理员掌握这个古老的技术,成为村庄英雄后他就会传授给你", diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java index 7bd3a52a..cd8d3671 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/electric/BlazeBlastFurnaceMachine.java @@ -1,7 +1,6 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.electric; import io.github.cpearl0.ctnhcore.registry.material.CTNHMaterials; -import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; import com.gregtechceu.gtceu.api.capability.recipe.FluidRecipeCapability; import com.gregtechceu.gtceu.api.capability.recipe.IO; @@ -88,9 +87,7 @@ public void addDisplayText(@NotNull List textList) { } public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { - int parallel = ParallelLogic.getParallelAmount(group, recipe, 8); - if (parallel == 0) - return CTNHRecipeHelper.diagnoseParallelFailure(group, recipe); + int parallel = Math.max(1, ParallelLogic.getParallelAmount(group, recipe, 8)); recipe.multiplyEUt(0.5); recipe.multiplyAllContents(parallel); recipe.parallels *= parallel; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java index 4c0359c2..4ac58455 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/NanoscaleTriboelectricGenerator.java @@ -1,7 +1,5 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; - import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.capability.recipe.RecipeCapability; import com.gregtechceu.gtceu.api.data.tag.TagPrefix; @@ -157,9 +155,7 @@ public static Component recipeModifier(MetaMachine machine, RecipeHandlerGroup g } } - if (maxParallel <= 0) { - return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); - } + maxParallel = Math.max(1, maxParallel); recipe.multiplyAllContents(maxParallel); recipe.multiplyDuration(Math.sqrt(maxParallel)); diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java index fe801ab4..1e357fd9 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java @@ -59,8 +59,7 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl int maxParallel = (int) (maxOutput / recipeEUt); if (maxParallel <= 0) return CTNHRecipeHelper.insufficientOutputPower(recipeEUt, maxOutput); - int parallels = ParallelLogic.getParallelAmountFast(group, recipe, maxParallel); - if (parallels <= 0) return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); + int parallels = Math.max(1, ParallelLogic.getParallelAmountFast(group, recipe, maxParallel)); recipe.multiplyAllContents(parallels); recipe.parallels *= parallels; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java b/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java index 4cb0bb77..1c77489c 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java @@ -160,8 +160,7 @@ public static Component naquadahReactor(MetaMachine machine, RecipeHandlerGroup int maxParallel = (int) (maxOutput / recipeEUt); if (maxParallel <= 0) return CTNHRecipeHelper.insufficientOutputPower(recipeEUt, maxOutput); - int multiplier = ParallelLogic.getParallelAmountFast(group, recipe, maxParallel); - if (multiplier <= 0) return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); + int multiplier = Math.max(1, ParallelLogic.getParallelAmountFast(group, recipe, maxParallel)); recipe.multiplyEUt(multiplier); recipe.multiplyDuration(((double) generator.efficiency / 100) / multiplier); diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java index 6fcc8bad..e2d47690 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java @@ -48,14 +48,6 @@ public class CTNHCommonTooltips { @EN("Insufficient machine output: recipe requires %s EU/t, current limit is %s EU/t") public static Lang recipeModifierInsufficientOutputPower; - @CN("输入材料不足,无法运行一次配方") - @EN("Not enough input materials to run the recipe once") - public static Lang recipeModifierInsufficientInput; - - @CN("输出仓已满,配方产物无处存放") - @EN("Output is full; the recipe products cannot be stored") - public static Lang recipeModifierOutputFull; - @CN("该配方类型不被这台机器支持") @EN("This recipe type is not supported by this machine") public static Lang recipeModifierUnsupportedRecipeType; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java index b05df6e0..ad434b67 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java @@ -2,8 +2,6 @@ import com.gregtechceu.gtceu.api.machine.trait.NotifiableItemStackHandler; import com.gregtechceu.gtceu.api.recipe.GTRecipe; -import com.gregtechceu.gtceu.api.recipe.handler.RecipeHandlerGroup; -import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic; import com.gregtechceu.gtceu.common.data.GTRecipeCapabilities; import com.gregtechceu.gtceu.utils.FormattingUtil; @@ -17,7 +15,6 @@ import org.jetbrains.annotations.NotNull; import java.util.ArrayList; -import java.util.List; public class CTNHRecipeHelper { @@ -79,17 +76,6 @@ public static ItemStack insertToEmpty(NotifiableItemStackHandler handler, ItemSt return stack; } - /** - * 诊断“并行数为 0”的原因:输入仓连一次配方都不够,还是产物堵塞了输出仓。 - * 供各类并行机器的 {@code recipeModifier} 生成面向玩家的失败原因。 - */ - public static Component diagnoseParallelFailure(@NotNull RecipeHandlerGroup group, @NotNull GTRecipe recipe) { - if (ParallelLogic.getMaxByInput(group, recipe, 1, true, List.of()) <= 0) { - return CTNHCommonTooltips.recipeModifierInsufficientInput.translate(); - } - return CTNHCommonTooltips.recipeModifierOutputFull.translate(); - } - /** * 机器输出上限不足以承载配方所需的 EU/t。 */ From 84910e866e8f17bdaf4cd389cbf57484144ae5c1 Mon Sep 17 00:00:00 2001 From: mmyddd Date: Sat, 12 Sep 2026 19:24:11 +0800 Subject: [PATCH 4/5] =?UTF-8?q?refactor(machine):=20=E5=8F=91=E7=94=B5?= =?UTF-8?q?=E6=9C=BA=E5=A4=B1=E8=B4=A5=E5=8E=9F=E5=9B=A0=E6=94=B9=E7=94=A8?= =?UTF-8?q?=20gtm=20=E6=97=A2=E6=9C=89=E5=8F=A3=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 效率发电机(硅岩反应堆/火箭引擎)删除 CTNHRecipeModifiers.naquadahReactor,统一改用 EfficiencyGeneratorMachine.recipeModifier - 发电机不再为无 EU 输出、输出功率不足自造玩家可见文案,改回返回 null,由后续配方模拟给出真实原因 - 删除 CTNHRecipeHelper.insufficientOutputPower 与 CTNHCommonTooltips 的 recipeModifierNoEuOutput / recipeModifierInsufficientOutputPower - 效率发电机、等离子涡轮补 GTRecipeModifiers.TIER_CHECK;化学燃料发电机与等离子涡轮改由 TIER_CHECK 拦截超压配方 - 发电机改读 recipe.getOutputEUt(),不再用带符号净 EU;移除 CTNHRecipeModifiers 中重复的硅岩反应堆实现 - 重新生成 zh_cn/en_us/en_ud 语言文件,移除上述三个键 --- .../resources/assets/ctnhcore/lang/en_ud.json | 3 --- .../resources/assets/ctnhcore/lang/en_us.json | 3 --- .../resources/assets/ctnhcore/lang/zh_cn.json | 3 --- .../generator/ChemicalGeneratorMachine.java | 24 ++++++++----------- .../generator/HyperPlasmaTurbineMachine.java | 20 +++------------- .../generator/MegaTurbineMachine.java | 16 +++---------- .../simple/EfficiencyGeneratorMachine.java | 12 ++++------ .../registry/CTNHRecipeModifiers.java | 21 ---------------- .../registry/machines/CTNHMachines.java | 2 +- .../HyperPlasmaTurbineRegister.java | 3 ++- .../machines/multiblock/MultiblocksA.java | 2 +- .../ctnhcore/utils/CTNHCommonTooltips.java | 8 ------- .../ctnhcore/utils/CTNHMachineUtils.java | 2 +- .../ctnhcore/utils/CTNHRecipeHelper.java | 10 -------- 14 files changed, 25 insertions(+), 104 deletions(-) diff --git a/src/generated/resources/assets/ctnhcore/lang/en_ud.json b/src/generated/resources/assets/ctnhcore/lang/en_ud.json index 4b601a03..d5e1ce30 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_ud.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_ud.json @@ -427,8 +427,6 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "˙ʎןןɐɔıʇɐɯoʇnɐ pǝɯɹoɟɹǝd ǝq ןןıʍ suoıʇɐןnɔןɐɔ ןǝןןɐɹɐd 'ʞɔıʇ Ɩ uɐɥʇ ssǝן sı ǝɯıʇunɹ ǝdıɔǝɹ uǝɥM", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "pǝʇʇıɯɹǝd sı ɹǝqɯɐɥɔ ɹǝsɐן ǝɥʇ ɟo ǝsn ǝɥ⟘", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "pǝןıɐɟ uoıʇɐɔıɟıpoɯ ǝdıɔǝᴚ", - "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "ʇ/∩Ǝ %s sı ʇıɯıן ʇuǝɹɹnɔ 'ʇ/∩Ǝ %s sǝɹınbǝɹ ǝdıɔǝɹ :ʇndʇno ǝuıɥɔɐɯ ʇuǝıɔıɟɟnsuI", - "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "ʇndʇno ∩Ǝ ou sǝuıɟǝp ǝdıɔǝɹ sıɥ⟘", "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "ǝuıɥɔɐɯ sıɥʇ ʎq pǝʇɹoddns ʇou sı ǝdʎʇ ǝdıɔǝɹ sıɥ⟘", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "sʇunoɯɐ ǝbɹɐן uıɐʇqo oʇ ʇıɯıן ʇɥbıǝɥ pןɹoʍ ǝɥʇ ʇɐ ǝuɐןԀ uoıʇɐןıɥıuuⱯ uɐ ǝs∩", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "ʇı uɹɐǝן oʇ ǝbɐןןıΛ ǝɥʇ ɟo oɹǝH ɐ sɐ ɟןǝsɹnoʎ ǝʌoɹd - ǝnbıuɥɔǝʇ ʇuǝıɔuɐ sıɥʇ pɹɐnb suɐıɹɐɹqıן ǝbɐןןıΛ", @@ -505,7 +503,6 @@ "ctnhcore.factorymachine.sweatshopinfovillagercount": "%s :ʇunoƆ ǝǝʎoןdɯƎ", "ctnhcore.forestmachine.forestmachineinfohumidity": "%d :ןǝʌǝן ʎʇıpıɯnH", "ctnhcore.forestmachine.forestmachineinfoparallelcount": "%d :ʇunoɔ ןǝןןɐɹɐԀ", - "ctnhcore.hyperplasmaturbinemachine.insufficientoutputpower": ")ʇıɯıן ǝɥʇ ǝsıɐɹ oʇ ʇ/∩MƆ ǝɹoɯ ʎןddns( ʇ/∩Ǝ %s sı ʇıɯıן ʇuǝɹɹnɔ 'ʇ/∩Ǝ %s sǝɹınbǝɹ ǝdıɔǝɹ :ʇndʇno ǝuıqɹnʇ ɐɯsɐןd ʇuǝıɔıɟɟnsuI", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip0": "ʎbɹǝuƎ ɐɯsɐןԀ ǝ§ puɐ ɟ§ uoıʇɐʇndɯoƆ ǝsıɔǝɹԀ ɐ§ ɟoɟ§ ʎSⱯ⟘NⱯℲ ꞀⱯNIℲϛ§", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip1": "˙SƎꞀᗺ∩Oᗡ uoıʇɔnpoɹԀ ʇndʇnO ǝɥʇ 'pǝpıʌoɹd uoıʇɐʇndɯoɔ %d ʎɹǝʌǝ ɹoℲ ˙uoıʇɔnpoɹԀ ǝsɐᗺ ǝɥʇ ɥɔɐǝɹ oʇ uoıʇɐʇndɯoɔ %d ǝpıʌoɹԀ", "ctnhcore.idataitem.datanoise": "%s :ǝsıou ʇuǝɹɹnƆ", diff --git a/src/generated/resources/assets/ctnhcore/lang/en_us.json b/src/generated/resources/assets/ctnhcore/lang/en_us.json index 4f4f3d94..a7d028b4 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_us.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_us.json @@ -427,8 +427,6 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "When recipe runtime is less than 1 tick, parallel calculations will be performed automatically.", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "The use of the laser chamber is permitted", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "Recipe modification failed", - "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "Insufficient machine output: recipe requires %s EU/t, current limit is %s EU/t", - "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "This recipe defines no EU output", "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "This recipe type is not supported by this machine", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "Use an Annihilation Plane at the world height limit to obtain large amounts", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "Village librarians guard this ancient technique - prove yourself as a Hero of the Village to learn it", @@ -505,7 +503,6 @@ "ctnhcore.factorymachine.sweatshopinfovillagercount": "Employee Count: %s", "ctnhcore.forestmachine.forestmachineinfohumidity": "Humidity level: %d", "ctnhcore.forestmachine.forestmachineinfoparallelcount": "Parallel count: %d", - "ctnhcore.hyperplasmaturbinemachine.insufficientoutputpower": "Insufficient plasma turbine output: recipe requires %s EU/t, current limit is %s EU/t (supply more CWU/t to raise the limit)", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip0": "§5FINAL FANTASY §fof §a Precise Computation §f and §e Plasma Energy", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip1": "Provide %d computation to reach the Base Production. For every %d computation provided, the Output Production DOUBLES.", "ctnhcore.idataitem.datanoise": "Current noise: %s", diff --git a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json index f00f0c3c..7cc2e063 100644 --- a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json +++ b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json @@ -442,8 +442,6 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "当配方运行时间小于1t时,会自动计算并行", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "允许使用激光仓", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "配方修改失败", - "ctnhcore.ctnhcommontooltips.recipemodifierinsufficientoutputpower": "机器输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t", - "ctnhcore.ctnhcommontooltips.recipemodifiernoeuoutput": "该配方没有定义 EU 输出", "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "该配方类型不被这台机器支持", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "使用破坏面板挖世界高度上限即可大量获得", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "村庄里的图书管理员掌握这个古老的技术,成为村庄英雄后他就会传授给你", @@ -535,7 +533,6 @@ "ctnhcore.high_pressure_alkali_digestion": "高压碱煮", "ctnhcore.homemade_bedrock_ore_machine": "", "ctnhcore.hot_coolant_turbine": "热冷却涡轮", - "ctnhcore.hyperplasmaturbinemachine.insufficientoutputpower": "等离子涡轮输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t(提供更多算力可提升上限)", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip0": "§a精密计算§f与§e等离子体§f的§5终极艺术", "ctnhcore.hyperplasmaturbineregister.hyperplasmaturbinetooltip1": "提供%d算力以达到基础功率,每提供%d算力,输出功率翻一倍", "ctnhcore.idataitem.datanoise": "当前噪声值:%s", diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java index 4182b8be..46c26c46 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/ChemicalGeneratorMachine.java @@ -1,7 +1,5 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; - import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.fluids.store.FluidStorageKeys; @@ -67,18 +65,16 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl if (!(machine instanceof ChemicalGeneratorMachine engineMachine)) { return RecipeModifier.nullWrongType(ChemicalGeneratorMachine.class, machine); } - long EUt = RecipeHelper.getRealEUtWithIO(recipe); - // has lubricant - if (EUt > 0) { - int maxParallel = (int) (engineMachine.getOverclockVoltage() / EUt); // get maximum parallel - int actualParallel = ParallelLogic.getParallelAmount(group, recipe, maxParallel); - double eutMultiplier = engineMachine.getProductionBoost(); - recipe.multiplyAllContents(actualParallel); - recipe.multiplyEUt(eutMultiplier); - recipe.parallels *= actualParallel; - return null; - } - return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); + long EUt = recipe.getOutputEUt(); + if (EUt <= 0) return null; + + int maxParallel = (int) (engineMachine.getOverclockVoltage() / EUt); // get maximum parallel + int actualParallel = ParallelLogic.getParallelAmount(group, recipe, maxParallel); + double eutMultiplier = engineMachine.getProductionBoost(); + recipe.multiplyAllContents(actualParallel); + recipe.multiplyEUt(eutMultiplier); + recipe.parallels *= actualParallel; + return null; } protected double getProductionBoost() { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java index 1617e1ff..cc913f07 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/HyperPlasmaTurbineMachine.java @@ -4,7 +4,6 @@ import io.github.cpearl0.ctnhcore.common.blockentity.TurbineRotorBE; import io.github.cpearl0.ctnhcore.common.machine.multiblock.MultiblockComputationMachine; import io.github.cpearl0.ctnhcore.data.recipe.utils.ComputationModifier; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability; @@ -12,7 +11,6 @@ import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; import com.gregtechceu.gtceu.api.machine.MetaMachine; import com.gregtechceu.gtceu.api.recipe.GTRecipe; -import com.gregtechceu.gtceu.api.recipe.RecipeHelper; import com.gregtechceu.gtceu.api.recipe.handler.RecipeHandlerGroup; import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic; import com.gregtechceu.gtceu.api.recipe.modifier.RecipeModifier; @@ -23,11 +21,8 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import com.ctnhlang.CN; -import com.ctnhlang.EN; import org.jetbrains.annotations.NotNull; import org.joml.Vector3i; -import tech.vixhentx.mcmod.ctnhlib.langprovider.Lang; import java.util.List; @@ -35,10 +30,6 @@ public class HyperPlasmaTurbineMachine extends MultiblockComputationMachine { - @CN("等离子涡轮输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t(提供更多算力可提升上限)") - @EN("Insufficient plasma turbine output: recipe requires %s EU/t, current limit is %s EU/t (supply more CWU/t to raise the limit)") - public static Lang insufficientOutputPower; - public static final long BASE_EU_OUTPUT = GTValues.V[GTValues.ZPM] * 288;/* 有算力时的基础功率 */ public static final long DEFAULT_EU_OUTPUT = GTValues.V[GTValues.ZPM];/* 没有算力时的默认功率 */ public static final int CWUtStair = 64; @@ -178,14 +169,9 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl return RecipeModifier.nullWrongType(HyperPlasmaTurbineMachine.class, machine); } - final long EUt = RecipeHelper.getRealEUtWithIO(recipe); + final long EUt = recipe.getOutputEUt(); final long turbineMaxVoltage = hptm.getOverclockVoltage(); - - if (EUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); - if (turbineMaxVoltage <= EUt) { - return insufficientOutputPower.translate(FormattingUtil.formatNumbers(EUt), - FormattingUtil.formatNumbers(turbineMaxVoltage)); - } + if (EUt <= 0) return null; // get the amount of parallel required to match the desired output voltage final double euMultiplier = getEfficiency(); @@ -227,7 +213,7 @@ public void addDisplayText(@NotNull List textList) { long maxProduction = getOverclockVoltage(); long currentProduction = isActive() && recipeLogic.getLastRecipe() != null ? - RecipeHelper.getRealEUtWithIO(recipeLogic.getLastRecipe()) : 0; + recipeLogic.getLastRecipe().getOutputEUt() : 0; if (isActive()) { textList.add(Component.translatable("gtceu.multiblock.turbine.energy_per_tick", diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java index 48776e49..d4b01cad 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/MegaTurbineMachine.java @@ -1,8 +1,5 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; -import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; - import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability; import com.gregtechceu.gtceu.api.capability.recipe.RecipeCapability; @@ -13,7 +10,6 @@ import com.gregtechceu.gtceu.api.machine.feature.multiblock.IRotorHolderMachine; import com.gregtechceu.gtceu.api.machine.multiblock.RecipeElectricMultiblockMachine; import com.gregtechceu.gtceu.api.recipe.GTRecipe; -import com.gregtechceu.gtceu.api.recipe.RecipeHelper; import com.gregtechceu.gtceu.api.recipe.handler.RecipeHandlerGroup; import com.gregtechceu.gtceu.api.recipe.modifier.ParallelLogic; import com.gregtechceu.gtceu.api.recipe.modifier.RecipeModifier; @@ -96,17 +92,11 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl return Component.translatable("gtceu.recipe_modifier.missing_valid_turbine_rotor"); } - long EUt = RecipeHelper.getRealEUtWithIO(recipe); + long EUt = recipe.getOutputEUt(); long turbineMaxVoltage = turbineMachine.getOverclockVoltage(); double holderEfficiency = rotorHolder.getTotalEfficiency() / 100.0; - if (EUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); - if (holderEfficiency <= 0) { - return Component.translatable("gtceu.recipe_modifier.missing_valid_turbine_rotor"); - } - if (turbineMaxVoltage <= EUt) { - return CTNHRecipeHelper.insufficientOutputPower(EUt, turbineMaxVoltage); - } + if (EUt <= 0 || turbineMaxVoltage <= EUt || holderEfficiency <= 0) return null; // get the amount of parallel required to match the desired output voltage int maxParallel = (int) (turbineMaxVoltage / EUt); @@ -149,7 +139,7 @@ public void addDisplayText(List textList) { long maxProduction = getOverclockVoltage(); long currentProduction = isActive() && recipeLogic.getLastRecipe() != null ? - RecipeHelper.getRealEUtWithIO(recipeLogic.getLastRecipe()) : 0; + recipeLogic.getLastRecipe().getOutputEUt() : 0; String voltageName = GTValues.VNF[GTUtil.getTierByVoltage(currentProduction)]; if (isActive()) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java index 1e357fd9..4ee97f50 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/simple/EfficiencyGeneratorMachine.java @@ -1,8 +1,5 @@ package io.github.cpearl0.ctnhcore.common.machine.simple; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; -import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; - import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; import com.gregtechceu.gtceu.api.machine.MetaMachine; import com.gregtechceu.gtceu.api.machine.SimpleGeneratorMachine; @@ -53,13 +50,12 @@ public static Component recipeModifier(@NotNull MetaMachine machine, RecipeHandl } long recipeEUt = recipe.getOutputEUt(); - if (recipeEUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); + if (recipeEUt <= 0) return null; - long maxOutput = generator.getOverclockVoltage(); - int maxParallel = (int) (maxOutput / recipeEUt); - if (maxParallel <= 0) return CTNHRecipeHelper.insufficientOutputPower(recipeEUt, maxOutput); + int maxParallel = (int) (generator.getOverclockVoltage() / recipeEUt); + if (maxParallel <= 0) return null; - int parallels = Math.max(1, ParallelLogic.getParallelAmountFast(group, recipe, maxParallel)); + int parallels = ParallelLogic.getParallelAmountFast(group, recipe, maxParallel); recipe.multiplyAllContents(parallels); recipe.parallels *= parallels; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java b/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java index 1c77489c..790de6e7 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/registry/CTNHRecipeModifiers.java @@ -2,8 +2,6 @@ import io.github.cpearl0.ctnhcore.common.machine.multiblock.electric.ChemicalPlantMachine; import io.github.cpearl0.ctnhcore.common.machine.simple.EfficiencyGeneratorMachine; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; -import io.github.cpearl0.ctnhcore.utils.CTNHRecipeHelper; import com.gregtechceu.gtceu.api.GTValues; import com.gregtechceu.gtceu.api.machine.MetaMachine; @@ -148,25 +146,6 @@ private static Component reduction(@NotNull GTRecipe recipe, double duration, do return null; } - public static Component naquadahReactor(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { - if (!(machine instanceof EfficiencyGeneratorMachine generator)) { - return RecipeModifier.nullWrongType(EfficiencyGeneratorMachine.class, machine); - } - - long recipeEUt = recipe.getOutputEUt(); - if (recipeEUt <= 0) return CTNHCommonTooltips.recipeModifierNoEuOutput.translate(); - - long maxOutput = generator.getOverclockVoltage(); - int maxParallel = (int) (maxOutput / recipeEUt); - if (maxParallel <= 0) return CTNHRecipeHelper.insufficientOutputPower(recipeEUt, maxOutput); - - int multiplier = Math.max(1, ParallelLogic.getParallelAmountFast(group, recipe, maxParallel)); - - recipe.multiplyEUt(multiplier); - recipe.multiplyDuration(((double) generator.efficiency / 100) / multiplier); - return null; - } - public static Component rocketEngine(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { return EfficiencyGeneratorMachine.recipeModifier(machine, group, recipe); } diff --git a/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/CTNHMachines.java b/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/CTNHMachines.java index 2e0a80ac..23e7f20a 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/CTNHMachines.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/CTNHMachines.java @@ -709,7 +709,7 @@ public static void init() { NAQUADAH_REACTOR = CTNHMachineUtils.registerEfficiencyGeneratorMachines( "naquadah_reactor", CTNHRecipeTypes.NAQUADAH_REACTOR_RECIPES, - CTNHRecipeModifiers::naquadahReactor, + EfficiencyGeneratorMachine::recipeModifier, tier -> tier * 32000, EfficiencyGeneratorMachine::naquadahReactor, tiersBetween(EV, UV)); diff --git a/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/HyperPlasmaTurbineRegister.java b/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/HyperPlasmaTurbineRegister.java index 7cc7b1c5..0feacff5 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/HyperPlasmaTurbineRegister.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/HyperPlasmaTurbineRegister.java @@ -16,6 +16,7 @@ import com.gregtechceu.gtceu.common.data.GTBlocks; import com.gregtechceu.gtceu.common.data.GTMachines; import com.gregtechceu.gtceu.common.data.GTMaterialBlocks; +import com.gregtechceu.gtceu.common.data.GTRecipeModifiers; import com.gregtechceu.gtceu.common.data.GTRecipeTypes; import com.gregtechceu.gtceu.common.data.machines.GTResearchMachines; @@ -50,7 +51,7 @@ public static MultiblockMachineDefinition register() { .rotationState(RotationState.NON_Y_AXIS) .recipeType(GTRecipeTypes.PLASMA_GENERATOR_FUELS) .generator(true) - .recipeModifier(HyperPlasmaTurbineMachine::recipeModifier, true) + .recipeModifiers(true, GTRecipeModifiers.TIER_CHECK, HyperPlasmaTurbineMachine::recipeModifier) .appearanceBlock(NEUTRONIUM_REINFORCED_TURBINE_CASING) .pattern(definition -> { return FactoryBlockPattern.start() diff --git a/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/MultiblocksA.java b/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/MultiblocksA.java index d7add00d..60ccbbab 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/MultiblocksA.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/registry/machines/multiblock/MultiblocksA.java @@ -2085,7 +2085,7 @@ public static MultiblockMachineDefinition registerChemicalGenerator(String name, .rotationState(RotationState.NON_Y_AXIS) .recipeType(CTNHRecipeTypes.CHEMICAL_GENERATOR) .generator(true) - .recipeModifier(ChemicalGeneratorMachine::recipeModifier, true) + .recipeModifiers(true, GTRecipeModifiers.TIER_CHECK, ChemicalGeneratorMachine::recipeModifier) .appearanceBlock(casing) .pattern(definition -> FactoryBlockPattern.start() .aisle("III", "PPP", "III") diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java index e2d47690..6a40c5da 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java @@ -40,14 +40,6 @@ public class CTNHCommonTooltips { @EN("Recipe modification failed") public static Lang gtceuRecipeModifierDefaultFail; - @CN("该配方没有定义 EU 输出") - @EN("This recipe defines no EU output") - public static Lang recipeModifierNoEuOutput; - - @CN("机器输出功率不足:配方需要 %s EU/t,当前输出上限 %s EU/t") - @EN("Insufficient machine output: recipe requires %s EU/t, current limit is %s EU/t") - public static Lang recipeModifierInsufficientOutputPower; - @CN("该配方类型不被这台机器支持") @EN("This recipe type is not supported by this machine") public static Lang recipeModifierUnsupportedRecipeType; diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHMachineUtils.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHMachineUtils.java index c654f93a..09e68421 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHMachineUtils.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHMachineUtils.java @@ -185,7 +185,7 @@ public static MachineDefinition[] registerEfficiencyGeneratorMachines(String nam .langValue("%s %s %s".formatted(VLVH[tier], toEnglishName(name), VLVT[tier])) .editableUI(SimpleGeneratorMachine.EDITABLE_UI_CREATOR.apply(CTNHCore.id(name), recipeType)) .rotationState(RotationState.NON_Y_AXIS) - .recipeModifier(recipeModifier) + .recipeModifiers(GTRecipeModifiers.TIER_CHECK, recipeModifier) .recipeType(recipeType) .simpleGeneratorModel(CTNHCore.id("block/generators/" + name)) .tooltips( diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java index ad434b67..0d987d3a 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHRecipeHelper.java @@ -3,9 +3,7 @@ import com.gregtechceu.gtceu.api.machine.trait.NotifiableItemStackHandler; import com.gregtechceu.gtceu.api.recipe.GTRecipe; import com.gregtechceu.gtceu.common.data.GTRecipeCapabilities; -import com.gregtechceu.gtceu.utils.FormattingUtil; -import net.minecraft.network.chat.Component; import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.ItemHandlerHelper; @@ -75,12 +73,4 @@ public static ItemStack insertToEmpty(NotifiableItemStackHandler handler, ItemSt } return stack; } - - /** - * 机器输出上限不足以承载配方所需的 EU/t。 - */ - public static Component insufficientOutputPower(long requiredEUt, long maxEUt) { - return CTNHCommonTooltips.recipeModifierInsufficientOutputPower.translate( - FormattingUtil.formatNumbers(requiredEUt), FormattingUtil.formatNumbers(maxEUt)); - } } From 9eb210acaa307149bb4d7a4f28e3c7e230792272 Mon Sep 17 00:00:00 2001 From: mmyddd Date: Tue, 15 Sep 2026 22:36:47 +0800 Subject: [PATCH 5/5] =?UTF-8?q?refactor(machine):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=A7=E5=9E=8B=E7=A1=85=E5=B2=A9=E5=8F=91=E7=94=B5=E5=A0=86?= =?UTF-8?q?=E7=9A=84=E5=86=97=E4=BD=99=E9=85=8D=E6=96=B9=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 该机器只注册 LARGE_NAQUADAH_REACTOR_RECIPES 一种配方类型,modifier 不可能收到其他类型,检查为死代码 - 删除 modifyRecipe 中的 recipeType 判断与 recipeModifierUnsupportedRecipeType 文案 - 清理随之失效的 CTNHRecipeTypes / CTNHCommonTooltips 导入与 zh_cn/en_us/en_ud 语言键 --- src/generated/resources/assets/ctnhcore/lang/en_ud.json | 1 - src/generated/resources/assets/ctnhcore/lang/en_us.json | 1 - src/generated/resources/assets/ctnhcore/lang/zh_cn.json | 1 - .../multiblock/generator/LargeNaquadahReactorMachine.java | 5 ----- .../io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java | 4 ---- 5 files changed, 12 deletions(-) diff --git a/src/generated/resources/assets/ctnhcore/lang/en_ud.json b/src/generated/resources/assets/ctnhcore/lang/en_ud.json index 1a1f9298..471059f6 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_ud.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_ud.json @@ -427,7 +427,6 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "˙ʎןןɐɔıʇɐɯoʇnɐ pǝɯɹoɟɹǝd ǝq ןןıʍ suoıʇɐןnɔןɐɔ ןǝןןɐɹɐd 'ʞɔıʇ Ɩ uɐɥʇ ssǝן sı ǝɯıʇunɹ ǝdıɔǝɹ uǝɥM", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "pǝʇʇıɯɹǝd sı ɹǝqɯɐɥɔ ɹǝsɐן ǝɥʇ ɟo ǝsn ǝɥ⟘", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "pǝןıɐɟ uoıʇɐɔıɟıpoɯ ǝdıɔǝᴚ", - "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "ǝuıɥɔɐɯ sıɥʇ ʎq pǝʇɹoddns ʇou sı ǝdʎʇ ǝdıɔǝɹ sıɥ⟘", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "sʇunoɯɐ ǝbɹɐן uıɐʇqo oʇ ʇıɯıן ʇɥbıǝɥ pןɹoʍ ǝɥʇ ʇɐ ǝuɐןԀ uoıʇɐןıɥıuuⱯ uɐ ǝs∩", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "ʇı uɹɐǝן oʇ ǝbɐןןıΛ ǝɥʇ ɟo oɹǝH ɐ sɐ ɟןǝsɹnoʎ ǝʌoɹd - ǝnbıuɥɔǝʇ ʇuǝıɔuɐ sıɥʇ pɹɐnb suɐıɹɐɹqıן ǝbɐןןıΛ", "ctnhcore.ctnhcoreemiplugin.bloodmagicgregtechhv": "sǝʇıɹoǝʇǝɯ uoɯɯns oʇ ןɐnʇıᴚ uoɔɐǝᗺ ɹɐʇS buıןןɐℲ ǝɥʇ uı buıɹǝɟɟo uɐ sɐ ɯǝʇı sıɥʇ ǝs∩", diff --git a/src/generated/resources/assets/ctnhcore/lang/en_us.json b/src/generated/resources/assets/ctnhcore/lang/en_us.json index 9a828984..dc34e3d3 100644 --- a/src/generated/resources/assets/ctnhcore/lang/en_us.json +++ b/src/generated/resources/assets/ctnhcore/lang/en_us.json @@ -427,7 +427,6 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "When recipe runtime is less than 1 tick, parallel calculations will be performed automatically.", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "The use of the laser chamber is permitted", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "Recipe modification failed", - "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "This recipe type is not supported by this machine", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "Use an Annihilation Plane at the world height limit to obtain large amounts", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "Village librarians guard this ancient technique - prove yourself as a Hero of the Village to learn it", "ctnhcore.ctnhcoreemiplugin.bloodmagicgregtechhv": "Use this item as an offering in the Falling Star Beacon Ritual to summon meteorites", diff --git a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json index ea770f05..672a8bab 100644 --- a/src/generated/resources/assets/ctnhcore/lang/zh_cn.json +++ b/src/generated/resources/assets/ctnhcore/lang/zh_cn.json @@ -441,7 +441,6 @@ "ctnhcore.ctnhcommontooltips.commontooltipsubtickoverclock": "当配方运行时间小于1t时,会自动计算并行", "ctnhcore.ctnhcommontooltips.gtceumultiblocklasertooltip": "允许使用激光仓", "ctnhcore.ctnhcommontooltips.gtceurecipemodifierdefaultfail": "配方修改失败", - "ctnhcore.ctnhcommontooltips.recipemodifierunsupportedrecipetype": "该配方类型不被这台机器支持", "ctnhcore.ctnhcoreemiplugin.ae2meteorblocktooltip": "使用破坏面板挖世界高度上限即可大量获得", "ctnhcore.ctnhcoreemiplugin.bauxiteprocesscatalyst": "村庄里的图书管理员掌握这个古老的技术,成为村庄英雄后他就会传授给你", "ctnhcore.ctnhcoreemiplugin.bloodmagicgregtechhv": "在坠星位标仪式中使用此物品作为祭品可以召唤陨石", diff --git a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java index 8e765ed5..132ddda5 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/common/machine/multiblock/generator/LargeNaquadahReactorMachine.java @@ -1,8 +1,6 @@ package io.github.cpearl0.ctnhcore.common.machine.multiblock.generator; -import io.github.cpearl0.ctnhcore.registry.CTNHRecipeTypes; import io.github.cpearl0.ctnhcore.registry.material.CTNHMaterials; -import io.github.cpearl0.ctnhcore.utils.CTNHCommonTooltips; import com.gregtechceu.gtceu.api.capability.recipe.IO; import com.gregtechceu.gtceu.api.machine.IMachineBlockEntity; @@ -61,9 +59,6 @@ public LargeNaquadahReactorMachine(IMachineBlockEntity holder, Object... args) { private Fluid lockFluid = null; public static Component modifyRecipe(MetaMachine machine, RecipeHandlerGroup group, GTRecipe recipe) { - if (recipe.recipeType != CTNHRecipeTypes.LARGE_NAQUADAH_REACTOR_RECIPES) { - return CTNHCommonTooltips.recipeModifierUnsupportedRecipeType.translate(); - } if (machine instanceof LargeNaquadahReactorMachine lmachine) { lmachine.checkHatch(lmachine, recipe.duration); if (!lmachine.hasAir) { diff --git a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java index 6a40c5da..8c351581 100644 --- a/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java +++ b/src/main/java/io/github/cpearl0/ctnhcore/utils/CTNHCommonTooltips.java @@ -40,10 +40,6 @@ public class CTNHCommonTooltips { @EN("Recipe modification failed") public static Lang gtceuRecipeModifierDefaultFail; - @CN("该配方类型不被这台机器支持") - @EN("This recipe type is not supported by this machine") - public static Lang recipeModifierUnsupportedRecipeType; - public static MutableComponent PARALLEL_HATCH = commonTooltipParallelHatch.translate() .withStyle(ChatFormatting.GOLD); public static MutableComponent SUBTICK_PARALLEL = commonTooltipSubtickOverclock.translate()