[Bug] Mob Cards Drop With Object ID Instead of Readable Name
Routhinator opened this issue Β· 20 comments
Minecraft and Mod version π
Minecraft: 1.20.1
Easy Mob Farm: 8.5.1
Describe the bug π
All cards are dropping with the entity object name instead of the friendly name in 8.5.1 it seems.
IE:
entity.minecraft.blaze Capture Card
instead of Blaze Card
entity.minecraft.skeleton_horse Capture Card
instead of Skeleton Horse Card
Does not appear to affect the cards in the REI interface, or cards spawned in via creative, only those aquired via the loot table.
To Reproduce βοΈ
- Hover over any mob card after getting a drop
Expected behavior βοΈ
Should have the friendly name instead of the object name,
- πΈ
Debugging π οΈ
No crash here, just a cosmetic bug.
Is the issue happening in combination with other mods? (If yes, please provide a full list) π§©
Not sure if related to another mod, however here is the full mod list for the experimental pack I have together:
https://modrinth.com/modpack/magpunkrpg/version/9cUhQeG6
Interestingly, I have just discovered this does not affect Honeyed Archer Cards when they drop
I attempted to reproduce the issue but was unable to do so. :/
If you're still able to reproduce it, could you please provide the following details to help me investigate further?
- Is the name displayed correctly in the hotbar (not the inventory)?
- Does the card show the proper name after reloading the game?
- While holding the card in your hand, run the command
/data get entity @s SelectedItem
. What data is displayed in the output?
This information will hopefully help me isolate the issue more effectively. Thank you!
Thank you for the update! It seems that the issue is related to one of the mods that modify tooltips.
In the latest update, I ensured that the name is translated before passing it to the tooltip. However, if itβs still not displaying correctly, it likely means that a mod is converting the tooltip into plain text and ignoring the translation.
Iβll try to reproduce the issue using the mods youβve shared and may adjust the logic further if necessary.
Hi @MarkusBordihn, thank you for your continued support. I have been attempting to do some debugging of my own and not leave this up to you, but it's been a busy week. I did take some time to gather answers for your questions above this morning.
I am still able to reproduce it 100% of the time with most Vanilla mobs that would generally use the entity name without additional logic. A clear exception to this seems to be Sheep - Sheep are not affected and I am guessing this may be due to extra required parsing of the entity in order to determine its colour and add it to the card title. In addition to Sheep, no aquatic creatures or creatures added by 3rd party mods seem to be affected. Fish, for example Bass, show up with a proper name.
To your specific questions:
{id: "easy_mob_farm:mob_capture_card", tag: {Damage: 0, MobCaptureData: {Type: "minecraft:skeleton", Rarity: "COMMON", Foil: 0b, Data: {ArmorItems: [{}, {}, {}, {}], Tags: ["in.eid_1", "in.eid_2", "in.eid_3", "in.eid_4", "in.eid_5", "in.checked", "in.eid_6", "in.eid_10", "in.eid_7", "ts.mm.parsed", "ttm.bleed", "ttm.target", "ttm.bleed50"], AbsorptionAmount: 0.0f, LeftHanded: 0b, HandItems: [{id: "minecraft:bow", tag: {Damage: 0}, Count: 1b}, {}], StrayConversionTime: -1, Invulnerable: 0b, Brain: {memories: {}}, dd_scaled: 1b, "puzzleslib:spawn_type": "NATURAL", ArmorDropChances: [0.085f, 0.085f, 0.085f, 0.085f], CanPickUpLoot: 0b, HandDropChances: [0.085f, 0.085f], Health: 24.0f, umbrellaTimer: 0, PersistenceRequired: 0b, BalmData: {}, cardinal_components: {"zenith:no_pinata": {"zenith:no_pinata": 0b}, "zenith:boss_data": {miniboss_luck: 0.0f}, "zenith:movable": {"zenith:movable": 0b}, "mythicmetals:combustion_cooldown": {cooldown: 0}, "zenith:affix_cooldown": {"affix_cooldown.zenith:breaker/mob_effect/spelunkers": 57542597L, "affix_cooldown.zenith:sword/mob_effect/elusive": 21523L, "affix_cooldown.zenith:armor/mob_effect/bolstering": 57542679L, "affix_cooldown.zenith:armor/mob_effect/blinding": 159438L, "affix_cooldown.zenith:shield/mob_effect/venomous": 21035810L, "affix_cooldown.zenith:sword/mob_effect/weakening": 514194L, "affix_cooldown.zenith:armor/mob_effect/nimble": 10187266L}, "eldritch_mobs:eldritch_modifiers": {numMaxAbilities: 0, titleSet: 0b, checkedIfSpawnedInSoothingLanternChunk: 1b, healthIncreased: 0b, abilities: {}}, "zenith:burns_in_sun": {"zenith:burns_in_sun": 0b}}}, Name: "entity.minecraft.skeleton"}}, Count: 1b}
Hmmm. Doing some fresh testing and.. I cannot reproduce this in a fresh local world.. I wonder if this is somehow "stuck" in the server..
Hmm, this issue could occur if the server's mod version doesn't exactly match the client version.
Unfortunately, since this mod doesn't use custom network packets, there's no built-in version check to ensure compatibility.
If you're only able to reproduce this issue on the old server world, I recommend trying the following steps:
- Create a backup of the server world.
- Copy the world folder to your client.
- Use the "Optimize World" option in the client world selection to update the world.
- Copy the optimized world back to the server.
This process will automatically clean up any outdated or leftover references in the world data, which should resolve any potential caching issues.
I'll keep this bug open to monitor if others experience the same problem. Let me know if the steps above resolve it!
I've validated the mod version on both sides, I'll try the optimize option and see how that goes. I use an mrpack to deliver the mods consistently to client and server, on the server I use https://github.com/nothub/mrpack-install FWIW.
Will update once I've tested this.
OK It worked! Not for existing card items, but for new drops!
It took a lot to get this done.
FWIW, this can be done on the server with --forceUpgrade --eraseCache
attached to the command, however in my case there was a mod that was causing an OOM problem when optimizing the map. As a result, it was easier to achieve this locally. (Oddly whatever was doing this in the optimization process, does not cause memleaks during play or when doing mapgen with chunky, so I'm at a loss there)
With the memleak, I bumped memory to as much headroom as I could afford, which in my case was 12GB, and then started the process.
- Start Minecraft
- Go to world, click edit, hit Optimize world, check "Clear Cache" and then "I know what I'm doing"
- Wait until you see the process start to stop for a second or two at a time, in my case this was 100K chunks. This means you are almost at an OOM.
- Click cancel to prevent an OOM causing a corrupt chunk
- Repeat until you have processed all chunks (in my case I had 16 million, so 16 times for complete optimization.
Optimization will skip already optimized chunks, and the OOM in my case only occurred when it was optimizing, not skipping.
If you do hit an OOM because you walk away, most times it won't corrupt a chunk, if it does you can pull a second copy of the world to your desktop and use Minecraft Region Fixer to replace corrupt chunks from the second copy, and then repeat.
Uhmmm.. ok so I may have spoken too soon. It still does it when the map is on a server... it does not do it when the map is on the local client in single player???
Confirmed through further testing. Even the un-optimized copy of the world is the same. Single Player has been fixed by your updates. Multiplayer has not.
I can confirm that this happens on my fabric pack on a server. Please let me know what information I can provide to help narrow this down.
It's worth noting that this does not happen with cards from modded creatures by the looks of it.
@Dalethium do you have any mods in common with my linked pack?
Thanks. @MarkusBordihn this is an especially interesting development as it appears that @Dalethium 's pack does not use any tooltip mods, which was the previously suspected cause of this behaviour.
Thanks for sharing the additional details. I'll set up a test server to conduct further testing on my side.
It's strange that this issue doesn't occur with modded mob names. As a potential workaround, I could consider adding the problematic vanilla mob names to my mod's namespace.
This might help resolve the issue while maintaining compatibility. I'll investigate this further.
I was able to reproduce the problem and I'm currently working on a fix.
The issue occurs in certain cases when there are too many layers of encapsulated translatable components.
As a result, the server may send plain text to the client instead of the translatable version.
As shown in the screenshot, the card's name is displayed incorrectly, while the description appears as expected.
I'll apply the fix to the name and include it in the next update.
Thank you for your patience! π