How to replicate:
1.Create superflat world.
2.Put the function(attachment) into your saves/Testing-Function1/data/functions/function(create this folder)
3.Load world and do /gamerure gameLoopFunction function:bombCraft
4.Put the advancement(attachment) into your saves/Testing-Function1/data/advancements/bomb(create this folder)/bombCraft(create this folder)
5.Load the world or do /reload
6.Do /scoreboard objectives add bombCraft dummy
7.Now put 1 fire charge in upper right corner of your inventory and 1-3 gunpowder 1 slot bellow it. This is how you create small/medium/big bomb. The problem is that it doesn't, or at least it doesn't do it visualy. Instead of the firecharge, a firework charge should appear with custom lore and name. If we "upgrade" it with redstone/tripwire hook(put in 1 slot bellow firecharge) we can see that it keeps track of which bomb tier it was, but visually the fire charge remains.
Put your questions in the comment. I suggest that this bug gets reviewed by someone with little commands/function/advancments knowledge since it may be hard to understand the code for someone with zero command knowledge.
Attachments
Comments 10
I already did, I tested it multiple times, if i set this function on clock, it works fine, but it doesnt when I use advancement to trigger it. You may want to look at it again.
Again use the reddit or discord, this is not a bug in the game's code, but a mistake in your files. Go to that reddit or discord, you have yet to even show yourself there, those are the places you go for command related problems.
There is no god damn bug, can someone competent please rewiev this?
The proof that this isnt a bug is that if you delete the advancement and do /gamerule gameLoopFunction function:bombCraft you can cleary see that code is working fine. The problem occurs when using advancement to trigger the function!
Im guessing that bug occurs because my function replaces item in my inventory and that triggers the advancement(advancement triggers when inventory_changed) so they kinda get in infinite loop or something so the game cant handle it.
Also: If you do /gamerule gameLoopFunction function:bombCraft and dont have the advancement in folder, thing work fine. As soon as you just put the advancement in advancement folder and do /reload the code stops working, even though everything that advancement does is that it loops the same function one more time.
I added another attachement(Function) which is simplified for you! Now test it out and you will realize tht this is a bug and not a code mistake!
Oh, found the actual problem now: MC-29318, not necessarily the invisible items, but it is missing the inventory updates.
This is a problem within your commands for certain; go to reddit's r/minecraftcommands or their discord for help with commands, advancements, etc.