Fix registerPotionBrewing not working because it was a server script by making it a startup script - #33
Fix registerPotionBrewing not working because it was a server script by making it a startup script#33Minimaxi28 wants to merge 1 commit into
Conversation
|
My example scripts just run without a problem. Can you describe what exactly doesn't work? Saying something doesn't work without any information is not really helpful. |
|
Ok my bad, it seems that even though it's a server script, it only actually applies when restarting the game ? If I copy paste everything shown here https://github.com/AlmostReliable/morejs/wiki/Potion-Brewing in If I modify example: If I restart my game instead of doing which is not related to my issue but the wiki is also wrong on that now, if I remove event.addCustomBrewing(
"minecraft:gold_ingot",
Ingredient.customNBT("minecraft:potion", (nbt) => {
return nbt.contains("Potion") && nbt.Potion == "minecraft:water";
}),
Item.of("minecraft:potion", { Potion: "kubejs:felix_felicis" }) // This is a custom made potion. It's not vanilla
);and restart the game, the recipes do show up like expected So actually it's the wiki that needs to be updated because it's a server script that only works on startup (very unintuitive, it would be better just a startup script), MoreJSEvents doesn't exist, it's MoreJS, Ingredient.customNBT doesn't exist (I don't know what that one became), also removeByPotion and removeByCustom don't exist too. My bad for not having tested more
|
Its not. Its invoked on world- oading which is part of the server. Minecraft has two loading states when bootstrapping the server. First world related stuff are loaded like worldgen, enchantments, potions etc. After that data related resources are loaded like tags, recipes etc. And minecraft does not reload world stuf on I will yeet all information about |
|
Ah yes indeed, so it's even more confusing because it's written nowhere that it's what you should do |

Issue Reference
Proposed Changes
Additional Context
Tested with
in startup_scripts, it correctly removes the potion recipes using 'minecraft:rabbit_foot' as an ingredient and correctly adds the "minecraft:acacia_log" to "minecraft:harming" recipes.