Create Sifting

Create Sifting

2M Downloads

Custom recipes not working as expected

ClaudiusMinimus opened this issue ยท 5 comments

commented

I am very excited to have found your mod and am working on a new pack that will use it.

I wrote a script to loop over some .json to add a lot of sifting recipes and found only a few recipes worked. Initially I thought there may be something wrong with my script, so I hard coded the following example. What is interesting is the only two recipes to work (even though they show correctly in JEI) were the acacia sapling and the amethyst, but only one or the other and not both at the same time. I could only determine something is going on with the mod. I have included screenshots of the below recipes in JEI, the
kubejs log kubejs log server.txt (there are two errors in the server.txt pointing to built in recipes). latest.log, debug.log, and the list of mods used in the pack are at the bottom.

  • Minecraft 1.19.2
  • Forge 43.2.0
  • create-1.19.2-0.5.0.g
  • create-stuff-additions1.19.2_v2.0.1c
  • createsifter-1.19.2-1.3.3.g
ServerEvents.recipes(event => {

    event.recipes.createsifterSifting([Item.of('minecraft:acacia_sapling').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:bamboo').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:birch_sapling').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:dark_oak_sapling').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:jungle_sapling').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:oak_sapling').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:spruce_sapling').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    event.recipes.createsifterSifting([Item.of('minecraft:amethyst_shard').withChance(0.20).toJson()], ['createsifter:string_mesh','minecraft:dirt']);
    as
    
});

image
image
image
image
image

List of Mods

  • appleskin-forge-mc1.19-2.4.2
  • architectury-6.4.62-forge
  • balm-4.5.3
  • Bookshelf-Forge-1.19.2-16.2.16
  • BorderlessWindow-1.19.1-1.5.2
  • bwncr-forge-1.19.2-3.14.1
  • clienttweaks-forge-1.19-8.1.0
  • cloth-config-8.2.88-forge
  • Clumps-forge-1.19.2-9.0.0+14
  • comforts-forge-6.0.3+1.19.2
  • configured-2.0.1-1.19.2
  • Controlling-forge-1.19.2-10.0+7
  • craftingstation-1.19.2-6
  • craftingtweaks-forge-1.19-15.1.0
  • create-1.19.2-0.5.0.g
  • create-stuff-additions1.19.2_v2.0.1c
  • createsifter-1.19.2-1.3.3.g
  • curios-forge-1.19.2-5.1.1.0
  • defaultoptions-forge-1.19-15.0.0
  • DefaultWorldType-1.19.1-3.1.0
  • drippyloadingscreen_forge_1.6.6_MC_1.19-1.19.2
  • EasierVillagerTrading-forge-1.19.2-1.2.0
  • EasyEmerald-Forge-1.19.2-1.4.15
  • EditSign-1.19.2-2.6.0
  • EnchantmentDescriptions-Forge-1.19.2-13.0.13
  • fancymenu_forge_2.13.1_MC_1.19-1.19.2
  • ftb-chunks-forge-1902.3.14-build.218
  • ftb-essentials-1902.1.10-build.47
  • ftb-library-forge-1902.3.11-build.166
  • ftb-quests-forge-1902.4.4-build.150
  • ftb-ranks-forge-1902.1.14-build.70
  • ftb-teams-forge-1902.2.11-build.87
  • ftbbackups2-forge-1.19.2-1.0.17
  • GameMenuModOption-1.19-1.18
  • inventorysorter-1.19.2-21.0.4
  • item-filters-forge-1902.2.9-build.46
  • jei-1.19.2-forge-11.5.0.297
  • konkrete_forge_1.6.0_MC_1.19-1.19.2
  • kubejs-forge-1902.6.0-build.135
  • LibX-1.19.2-4.2.8
  • light-overlay-7.0.1-forge
  • MouseTweaks-forge-mc1.19-2.23
  • NoChatReports-FORGE-1.19.2-v1.5.1
  • Patchouli-1.19.2-77
  • Placebo-1.19.2-7.0.1
  • polylib-forge-1900.0.2-build.42
  • polymorph-forge-0.46.1+1.19.2
  • PowderPower-Forge-1.19.2-3.6.13
  • rhino-forge-1902.2.2-build.264
  • ShiftedLib-1.0.2-1.19.2
  • shulkerboxtooltip-forge-3.2.2+1.19.2
  • shutupexperimentalsettings-1.0.5
  • signtools-forge.1.19-1.0.2
  • SkyblockBuilder-1.19.2-4.2.6
  • SkyGUIs-1.19.1-2.1.2
  • spawnermod-1.19.0-1.9.1+Forge
  • starlight-1.1.1+forge.cf5b10b
  • theoneprobe-1.19-6.2.2
  • toms_storage-1.19-1.3.10
  • Witherproofed-2.7.4-1.19.2
  • WitherSkeletonTweaks-1.19.2-8.0.0

I look forward to hearing from you!

Thank you,
CM

commented

I think I found the issue, but won't know until I do a bit more testing, I have been testing a lot today. However, I won't be able to post the results until tomorrow. Just wanted to give you a heads-up!

commented

I believe there are two issues:

  1. If an unobtainable block/item is in the script, then the entire script fails without any errors.
  2. Adding sift-able items seems more reliable using a datapack and not event.recipes.createsifterSifting(...)
commented

Hi!
Very happy to know about your excitement!
To the kubejs integration you need to put every output in the same recipe. Like in the datapack recipe (kind of).

ServerEvents.recipes(event => {
    event.recipes.createsifterSifting([
        Item.of('minecraft:acacia_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:bamboo').withChance(0.20).toJson(),
        Item.of('minecraft:birch_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:dark_oak_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:dark_oak_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:jungle_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:jungle_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:oak_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:spruce_sapling').withChance(0.20).toJson(),
        Item.of('minecraft:amethyst_shard').withChance(0.20).toJson()
    ], ['createsifter:string_mesh','minecraft:dirt']);
});
commented

About the item error, I think it's a kubejs thing.

commented

Thanks for the insight!