Failed to build tooltip when incorrect translation resource is applied to Create Addition
No3371 opened this issue · 10 comments
Describe the Bug
When incorrect translation resource is applied to CreateAddition, Create will fail to build tooltip due to module being null., which results in REI/EMI crashing. Not sure but maybe when the offending stack appears in player inventory it will crash the game too?
Reproduction Steps
- Install Create.
- Install CreateAddition.
- Install EMI or REI.
- Install RPMTW (An automatic translation mod, which dynamically build translation resource pack from cloud)
- Switch to zh_TW Language.
- Enter a game and open EMI/REI.
Expected Result
EMI/REI does not crash.
Screenshots and Videos
No response
Crash Report or Log
Operating System
Windows 10
Mod Version
0.5.0i
Minecraft Version
1.19.2
Other Mods
No response
Additional Context
No response
Oh, and the log. I don't think there's much information though.
latest.log
I totally understand that module being null makes no sense.
The culprit is the CreateAddition translation provided by RPMTW. The translation is provided through a resource pack, which is made on startup by downloading translations from CrowdIn for loaded mods.
I've tested and confirmed that by removing createaddition
dir in the resource pack, the bug can be fixed on the fly.
Here is the download link to a profile that can reproduce the issue without any change: https://gofile.io/d/rLJqKV (1.19.2 fabric)
I also got you the offending lang file, due to Github does not allow json, I'll put it below:
{
"createaddition.tooltip.energy.stored": "已儲存的能量:",
"createaddition.tooltip.energy.consumption": "已使用的能量:",
"createaddition.tooltip.energy.production": "已產生的能量:",
"createaddition.tooltip.energy.charged": "已充能",
"createaddition.tooltip.energy.usage": "網路使用情況:",
"createaddition.tooltip.energy.demand": "網路消耗量:",
"createaddition.tooltip.energy.supply": "網路生產量:",
"createaddition.tooltip.energy.selected": "面向的連接器:",
"createaddition.tooltip.energy.input": "輸入",
"createaddition.tooltip.energy.output": "輸出",
"createaddition.tooltip.accumulator.info": "蓄電池資訊:",
"createaddition.tooltip.relay.info": "紅石繼電器資訊",
"createaddition.tooltip.connector.info": "連接器資訊",
"createaddition.recipe.rolling": "軋制",
"createaddition.recipe.rolling.sequence": "Rolling in Mill",
"createaddition.recipe.charging": "充電中",
"createaddition.recipe.liquid_burning": "Liquid Burning",
"desc.immersiveengineering.info.mineral.sphalerite": "閃鋅",
"item.createaddition.capacitor": "電容",
"item.createaddition.zinc_sheet": "鋅板",
"item.createaddition.diamond_grit": "鑽石砂",
"item.createaddition.diamond_grit_sandpaper": "鑽石砂紙",
"item.createaddition.diamond_grit_sandpaper.tooltip": "鑽石砂紙",
"item.createaddition.copper_spool": "銅線軸",
"item.createaddition.copper_spool.tooltip": "線軸",
"item.createaddition.copper_spool.tooltip.summary": "R-Clicking two _Connectors_ will create a wire link between them and return an _Empty Spool_.",
"item.createaddition.iron_wire": "鐵絲",
"item.createaddition.iron_spool": "鐵線軸",
"item.createaddition.iron_rod": "鐵棒",
"item.createaddition.copper_wire": "銅線",
"item.createaddition.copper_rod": "銅棒",
"item.createaddition.gold_spool": "金線軸",
"item.createaddition.gold_spool.tooltip": "線軸",
"item.createaddition.gold_spool.tooltip.summary": "R-Clicking two _Connectors_ will create a wire link between them and return an _Empty Spool_.",
"item.createaddition.gold_wire": "金線",
"item.createaddition.gold_rod": "金棒",
"item.createaddition.brass_rod": "黃銅棒",
"item.createaddition.bronze_rod": "青銅棒",
"item.createaddition.cake_base": "蛋糕胚",
"item.createaddition.cake_base_baked": "烘焙蛋糕胚",
"item.createaddition.straw": "Straw",
"item.createaddition.seed_oil_bucket": "種子油桶",
"item.createaddition.seed_oil_bucket.tooltip": "種子油桶",
"item.createaddition.seed_oil_bucket.tooltip.summary": "A simple _flammable liquid_.",
"fluid.createaddition.seed_oil": "Seed Oil",
"item.createaddition.bioethanol_bucket": "生質酒精桶",
"item.createaddition.bioethanol_bucket.tooltip": "生質酒精桶",
"item.createaddition.bioethanol_bucket.tooltip.summary": "An efficient _flammable liquid_.",
"fluid.createaddition.bioethanol": "Bioethanol",
"item.createaddition.biomass": "生物質",
"item.createaddition.biomass_pellet": "生物質顆粒",
"item.createaddition.biomass_pellet.tooltip": "生物質顆粒",
"item.createaddition.biomass_pellet.tooltip.summary": "A _solid fuel_ which can smelt _5 items_ in a _Furnace_.",
"item.createaddition.spool": "空線軸",
"item.createaddition.spool.nbt": "Stores connection location.",
"item.createaddition.spool.tooltip": "線軸",
"item.createaddition.spool.tooltip.summary": "R-Clicking two _Connectors_ linked by a wire will remove the wire link and return a filled _spool_.",
"statusbar.createaddition.wire.linked": "Nodes linked",
"statusbar.createaddition.wire.linked_in": "Wire linked to input",
"statusbar.createaddition.wire.linked_out": "Wire linked to output",
"statusbar.createaddition.wire.connect": "Wire connector selected",
"statusbar.createaddition.wire.connect_in": "Wire connector input selected",
"statusbar.createaddition.wire.connect_out": "Wire connector output selected",
"statusbar.createaddition.wire.long": "Wire is too long",
"statusbar.createaddition.wire.obstructed": "Wire path is obstructed",
"statusbar.createaddition.wire.count": "Wire node is full",
"statusbar.createaddition.wire.removed": "Wire removed",
"statusbar.createaddition.wire.exists": "Wire connection already exists",
"statusbar.createaddition.wire.no_connection": "Wire not connected here",
"statusbar.createaddition.wire.invalid": "Invalid connection",
"block.createaddition.electric_motor": "電動馬達",
"deprecated.block.createaddition.electric_motor.tooltip": "電動馬達",
"deprecated.block.createaddition.electric_motor.tooltip.summary": "Generates _SU_ from _FE_ and has configurable _speed_. The energy consumption is based on the set _RPM_.",
"block.createaddition.alternator": "交流發電機",
"deprecated.block.createaddition.alternator.tooltip": "交流發電機",
"deprecated.block.createaddition.alternator.tooltip.summary": "Generates _FE_ from _SU_. The amount of energy produced is based on _RPM_.",
"block.createaddition.creative_energy": "創造模式發電機",
"block.createaddition.creative_energy.tooltip": "創造模式發電機",
"block.createaddition.creative_energy.tooltip.summary": "Generates an infinite supply of _FE_.",
"block.createaddition.rolling_mill": "軋機",
"deprecated.block.createaddition.rolling_mill.tooltip": "軋機",
"deprecated.block.createaddition.rolling_mill.tooltip.summary": "A kinetic component suitable for _rolling_ inserted _materials_. Can be powered by connecting to the shaft at the sides. Results have to be extracted from the component.",
"deprecated.block.createaddition.rolling_mill.tooltip.condition1": "When Powered by Kinetics",
"deprecated.block.createaddition.rolling_mill.tooltip.behaviour1": "Starts applying _rolling recipes_ to any items inserted from the side or the top of the block.",
"deprecated.block.createaddition.rolling_mill.tooltip.condition2": "When R-Clicked",
"deprecated.block.createaddition.rolling_mill.tooltip.behaviour2": "Collects the outputs manually.",
"block.createaddition.accumulator": "蓄電池",
"block.createaddition.accumulator.tooltip": "蓄電池",
"block.createaddition.accumulator.tooltip.summary": "Accumulates electric charge. ",
"block.createaddition.accumulator.tooltip.condition1": "輸出",
"block.createaddition.accumulator.tooltip.behaviour1": "Provides _FE_ to _wires_ connected to the _connector_ marked with a upwards arrow.",
"block.createaddition.accumulator.tooltip.condition2": "輸入",
"block.createaddition.accumulator.tooltip.behaviour2": "Accepts _FE_ from _wires_ connected to the _connector_ marked with a downwards arrow.",
"block.createaddition.connector": "Connector",
"block.createaddition.connector.tooltip": "連接器",
"block.createaddition.connector.tooltip.summary": "Connects Forge Energy compatible blocks with _wires_ to transfer _FE_.",
"block.createaddition.connector.tooltip.control1": "右鍵",
"block.createaddition.connector.tooltip.action1": "While holding a _Copper Spool_ or _Gold Spool_ to create a _wire link_ between two _Connectors_.",
"block.createaddition.connector_copper": "銅質連接器",
"block.createaddition.connector_copper.tooltip": "連接器",
"block.createaddition.connector_copper.tooltip.summary": "Connects Forge Energy compatible blocks with _wires_ to transfer _FE_.",
"block.createaddition.connector_copper.tooltip.control1": "右鍵",
"block.createaddition.connector_copper.tooltip.action1": "當拿著_銅線軸_或_金線軸_右擊兩個_連接器_來在兩個連接器之間建立一個_線纜連接_。",
"block.createaddition.connector_gold": "金質連接器",
"block.createaddition.connector_gold.tooltip": "連接器",
"block.createaddition.connector_gold.tooltip.summary": "Connects Forge Energy compatible blocks with _wires_ to transfer _FE_.",
"block.createaddition.connector_gold.tooltip.control1": "右鍵",
"block.createaddition.connector_gold.tooltip.action1": "當拿著_金線軸_右擊兩個_連接器_來在兩個連接器之間建立一個_線纜連接_。",
"block.createaddition.redstone_relay": "紅石繼電器",
"block.createaddition.redstone_relay.tooltip": "紅石繼電器",
"block.createaddition.redstone_relay.tooltip.summary": "Allows _FE_ to pass from the _input connector_ to the _output connector_ when receiving a _redstone signal_.",
"block.createaddition.redstone_relay.tooltip.condition1": "輸出",
"block.createaddition.redstone_relay.tooltip.behaviour1": "Provides _FE_ to _wires_ connected to the _connector_ marked with a upwards arrow.",
"block.createaddition.redstone_relay.tooltip.condition2": "輸入",
"block.createaddition.redstone_relay.tooltip.behaviour2": "Accepts _FE_ from _wires_ connected to the _connector_ marked with a downwards arrow.",
"block.createaddition.chocolate_cake": "巧克力蛋糕",
"block.createaddition.honey_cake": "蜂蜜蛋糕",
"block.createaddition.seed_oil": "種子油",
"block.createaddition.bioethanol": "生質酒精",
"createaddition.recipe.liquid_burning.burn_time": "Burn Time",
"block.createaddition.tesla_coil": "特斯拉線圈",
"itemGroup.createaddition:main": "Create Crafts & Additions",
"createaddition.command.cca_api.link": "Click here to open API documentation",
"createaddition.ponder.tag.electric": "Electric Appliances",
"createaddition.ponder.tag.electric.description": "Components which use electricity",
"createaddition.ponder.electric_motor.header": "Generating Rotational Force using Electric Motors",
"createaddition.ponder.electric_motor.text_1": "Electric Motors are a compact and configurable source of Rotational Force",
"createaddition.ponder.electric_motor.text_2": "Scrolling on the back panel changes the RPM of the motor's rotational output",
"createaddition.ponder.electric_motor.text_3": "The Electric Motor requires a source of energy (FE)",
"createaddition.ponder.electric_motor.text_4": "The motor's energy consumption is determined by the set RPM",
"createaddition.ponder.alternator.header": "Generating Electric energy using an Alternator",
"createaddition.ponder.alternator.text_1": "The Alternator requires at least 32 RPM to operate",
"createaddition.ponder.alternator.text_2": "It generates electric energy (FE) from rotational force",
"createaddition.ponder.alternator.text_3": "Its energy production is determined by the input RPM",
"createaddition.ponder.rolling_mill.header": "Rolling metals into Rods and Wires",
"createaddition.ponder.rolling_mill.text_1": "The Rolling Mill uses rotational force to roll metals into Rods and Wires",
"createaddition.ponder.rolling_mill.text_2": "To manually input items, drop Ingots or Plates on the top of the Mill",
"createaddition.ponder.rolling_mill.text_3": "Right-click the Mill to manually retrieve the output items",
"createaddition.ponder.automated_rolling_mill.header": "Automating the Rolling Mill",
"createaddition.ponder.automated_rolling_mill.text_1": "The Rolling Mill can be automated using a Belt and two Funnels",
"createaddition.ponder.automated_rolling_mill.text_2": "Input Funnel",
"createaddition.ponder.automated_rolling_mill.text_3": "Output Funnel",
"createaddition.ponder.cc_electric_motor.header": "Using ComputerCraft to control an Electric Motor",
"createaddition.ponder.cc_electric_motor.text_1": "The Electric Motor can be controlled using ComputerCraft",
"createaddition.ponder.cc_electric_motor.text_2": "Connect to the motor using 'peripheral.wrap(side)'",
"createaddition.ponder.cc_electric_motor.text_3": "Get to the API documentation by issuing the command '/cca_api' in the chat",
"createaddition.ponder.tesla_coil.header": "使用特斯拉線圈為物品充電",
"createaddition.ponder.tesla_coil.text_1": "特斯拉線圈會為放置在它下面的物品充電",
"createaddition.ponder.tesla_coil.text_2": "它可以為任何支持FE的物品充電",
"createaddition.ponder.tesla_coil_hurt.header": "危險的特斯拉線圈",
"createaddition.ponder.tesla_coil_hurt.text_1": "特斯拉線圈也能對附近的玩家和生物造成傷害",
"createaddition.ponder.tesla_coil_hurt.text_2": "可以透過紅石信號啟動",
"createaddition.ponder.tesla_coil_hurt.text_3": "準備好觸電吧!",
"createaddition.ponder.liquid_blaze_burner.header": "Liquid Fuel Burning",
"createaddition.ponder.liquid_blaze_burner.text_1": "Giving the Blaze Burner a Straw",
"createaddition.ponder.liquid_blaze_burner.text_2": "will allow it to accept liquid fuels by Buckets",
"createaddition.ponder.liquid_blaze_burner.text_3": "- or by pipes.",
"effect.createaddition.shocking": "觸電",
"death.attack.tesla_coil": "%1$s 受到了致命的電擊",
"death.attack.tesla_coil.player": "%1$s 在與 %2$s 的戰鬥中受到了致命的電擊",
"effect.createaddition.shocking.description": "Causes severely reduced movement speed"
}
could you try this build
create-fabric-0.5.0.i-local+1.19.2.jar.zip
Yes, the bug is gone with this build. Congrats! I thought this would be a hard nut to crack!
Okay. that means that CC&A is registering before Create, and when that happens, those items are assigned to null sections. That only becomes a problem when rendering the tooltip.
Huh... That sounds a bit weird but okay...
Anyway I'm leaving this to you to close when you see fit, like when a fixed version is released or something 😄