Minecraft 1.20.1
Kube JS 2001.6.5
FTB Quest (+ x compat, world stage)
Create
I encountered a problem. I am a complete beginner at creating scripts, but I thought I could handle a simple task. However, I tried everything I could, and nothing worked out for me.
I want to disable crafting of the andesite alloy from the Create mod until a certain quest is completed. Nothing worked.
Here is where I stopped:
const RECIPE_ID = "kubejs:andesite_alloy_locked";
const QUEST_ID = "5FF4D38A28DF0437";
ServerEvents.recipes(event => {
event.remove({ id: "create:crafting/materials/andesite_alloy" });
event.shaped("create:andesite_alloy", [
"IC ",
"CI ",
" "
], {
I: "minecraft:iron_nugget",
C: "minecraft:andesite"
}).id(RECIPE_ID);
});
FTBQuestsEvents.completed(QUEST_ID, event => {
const player = event.player;
player.tell("§aТы открыл рецепт андезитового сплава!");
event.server.scheduleInTicks(20, () => {
player.recipeManager.add(RECIPE_ID);
});
});```