Tooltips Not Showing Correctly
SomewhatDamaged opened this issue · 13 comments
Describe the bug
Not sure what is going on here, but here we go. When a datapack is the only source of data, some tooltips are not shown.
Expected behavior
All data should be in a tooltip.
To Reproduce
Steps to reproduce the behavior:
- Disable autovalues
- Make a datapack with
withDefaults
withOverrides
disabler
- Reload to ensure datapack is only source of data
- Disable PMMO source using
/datapack
command - See error
{
"xp_values": {
"BLOCK_PLACE": {
"farming": 1
},
"ENCHANT": {
"magic": 10
},
"CONSUME": {
"endurance": 30,
"cooking": 10
},
"SMELT": {
"cooking": 25
},
"CRAFT": {
"crafting": 10
},
"FISH": {
"fishing": 100
}
},
"override": true
}
Versions:
- Minecraft: 1.20.1
- Loader: Forge-47.1.3
- PMMO: 1.20.1-1.2.10
Additional context
Something else that might be helpful. When I generate the datapack, blocks do not automatically have a "CRAFT": {} put into the json file in the "xp_values" object. I add it in manually and it shows it on hover, but it doesn't give me the xp for it. I wonder if that's connected to the issue, I would think a block would automatically get a "CRAFT" field under "xp_values"?
Blocks cannot be crafted or held. They only exist in the world. Items on the other hand... Block items pose a unique intersection that makes the distinction between them murky
So with this it seems like there is no way to grant crafting experience for any type of block? I'm currently going through all the food items and I ran into issues giving XP to food blocks, like cake. I'm wondering why I'm getting that 10 crafting xp though from the defaults? There's quite a few block food items in modpacks, generally the bigger more exciting meals, so it would be neat if that was possible. It's fine if not though!
Ahh okay, that makes more sense then on maybe why some of these aren't working. I'll do some more testing!
You craft items, not blocks. When it is in your inventory, it is an item
. When it is in the world, it is a block
.
Put the CRAFT
xp on the item version of it.
I'm pretty sure that's what they did and it wasn't working. Something about block items isn't awarding crafting XP.
Yeah I have been using the items but it wasn't working for cake
when I try to add cooking xp to making it so thought maybe because it's a block I needed to add xp to the block. That all makes sense though!
does it work if it's on both? I think the tooltip might defer to the block for block items but still uses the item config for the XP awarded.
It is working for cake now, it looks like you're right, the tooltip defers to the block so you have to add the craft xp there to get it to show up on hover. The item itself is what gives the xp, which is working for cake. This isn't working for my farmers delight compat, so I'll have to figure out what's going on and modify some stuff there. Awesome thank you for the help!
Hmm, not sure if this matters since it's another mod, but it seems like you can't add xp to cake equivalent items in farmers delight. The farmersdelight:roast_chicken_block
is crafted in a crafting table and placed on the ground the same as cake is. There is a farmersdelight:roast_chicken
that is an item, but that is the Plate of Roast Chicken
you get from scooping the roast chicken with a bowl, not the item created from the crafting table. When I give it the same treatment as cake, which works perfectly for cake, it doesn't work for that block 🤷 . Just a bummer because all of the best / most expensive meals in all of the cooking mods are block based like cake, but they aren't giving XP for some reason.
Nevermind, I just had it configured wrong. I am now getting xp from crafting these blocks. I think I've figured out the issues and I'm not sure that there's anything actionable here, sorry to waste your time!!