#Create mod: mixing a fluid as an input will not work.

71 messages · Page 1 of 1 (latest)

normal holly
#

I want to make a mixing a recipe with the Create mod, the recipe works when I use Fluid.of() as an output, but I can't seem to use it in the input.

jade tigerBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

bitter bay
#

Read the error message

#

Can't cast Fluid.of('minecraft:lava', 10) to array

#

That means that you passed it plainly

#

While the function expected an array

#

Use [Fluid.of('minecraft:lava', 10)]

strong fiber
#

that is how the Fluid.of() works

bitter bay
#

Whoops, now I realized that I mistyped the , 10, Corrected

strong fiber
#

weird that it would need to be an array tho

normal holly
strong fiber
#

can you drop the whole file?

normal holly
#

sure, i have some recipes from a tutorial i haven't deleted yet though.

strong fiber
#

it's fine

#

also, could you drop the logs?

balmy escarpBOT
#

Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.

normal holly
balmy escarpBOT
#

Paste version of CraftTemp.js from @normal holly

normal holly
balmy escarpBOT
#

Paste version of server.log from @normal holly

strong fiber
#

I am in physical pain after seeing this

#

it works fine for me

#

could you try to replace your file with this?

ServerEvents.recipes(event => {
    //tutorial files
    event.shapeless('kubejs:mammothwool',[
        "kubejs:thickstring",
        "kubejs:thickstring",
        "kubejs:thickstring",
        "kubejs:thickstring",
    ]);

    event.shaped('minecraft:leather_leggings', [
        'AAA',
        'ABA',
        'A A'
    ],{
        A:'kubejs:mammothwool',
        B:'minecraft:shears'
    }).damageIngredient('minecraft:shears', '3');

    // The two removal loops below this are duplicates?
    [
        'minecraft:iron_ingot_from_smelting_iron_ore'
    ].forEach((recipeID) => event.remove({id: recipeID}));

    [
        'minecraft:iron_ingot_from_smelting_iron_ore'
    ].forEach((recipeID) => event.remove({id: recipeID}));

    //my files

    event.recipes.create.sandpaper_polishing('kubejs:sharpened_pebble', 'kubejs:pebble');

    event.recipes.create.sandpaper_polishing('kubejs:sharpened_stick', 'minecraft:stick');

    event.recipes.create.mixing([Item.of('thermal:sulfur_dust').withChance(0.3)], ['minecraft:coal_block', Fluid.water(10)]);

    event.recipes.create.mixing(['minecraft:stone', 'minecraft:dead_bush'], [Fluid.of('minecraft:lava', 10)]);

    event.recipes.create.milling(['minecraft:quartz', Item.of('minecraft:quartz').withChance(0.5)], 'minecraft:quartz_block');
});```
#

even if that doesn't fix it it is a lot better due to it not constantly reopening the serverevents

#

also your .forEach loops are duped

#

also, this is seriously impressive in a bad way
[15:29:03] [INFO] Added 8 recipes, removed 0 recipes, modified 2 recipes, with 9 failed recipes in 12.89 ms

strong fiber
#

I am seriously flabbergasted at how you got to that

#

for comparison, this is from what I am doing rn
[21:32:38] [INFO] Added 393 recipes, removed 593 recipes, modified 1077 recipes, with 44 failed recipes in 16.01 ms
that is 2063 recipes, with 44 failed, so roughly 2% failure rate (which still sucks tbh), in 16ms, which averages to 0.0077ms per recipe
whereas you do 10 recipes, with 9 failed, so that is 90%, and in 12ms, which means that on average your recipes take 1.2ms

normal holly
#

I have no idea what im doing lol

strong fiber
#

you are doing something really intensive somewhere, that is for certain

#

did my file fix the issue btw?

normal holly
#

not really, going to check if the issue is with the mod version

strong fiber
#

yeah I am thinking the same

#

are you on create 5 or 6?

normal holly
#

create 6, checking the create kubejs build which is on build 2

strong fiber
#

get the newest one

#

this version

strong fiber
normal holly
#

build 8 fixed the problem. Should've checked mod version first smh.

balmy escarpBOT
#

Paste version of server.log from @normal holly

normal holly
#

is it better now?

normal holly
#

im still insanely new so i have no idea what i'm doing wrong

strong fiber
#

So I won't be available for the next hours due to sleep, but if you can just drop your other server script files in here I can take a look when I wake up

#

Also if you could check whether all recipes you are touching are still in the game

normal holly
#

👍

balmy escarpBOT
#

Paste version of example.js, foods.js, loottables.js, startingloot.js, crafting.js from @normal holly

strong fiber
#

A few questions:

  1. Does the tag apply correctly in food.js?
  2. Do all your recipes apply?
normal holly
#

@strong fiber can confirm that the tag applies correctly and that all the recepies do as well

strong fiber
#

hmm

#

your code looks fine, which is why I am quite confused as to why this takes 60ms to load

normal holly
strong fiber
#

oh nice

strong fiber
normal holly
#

just reloaded today and the errors seem to have solved themself 🤷‍♂️

#

uh

strong fiber
#

wait diff line

normal holly
#

?

strong fiber
#

if you scroll down in the file you should see a line about added recipes

#

what does that say?

normal holly
balmy escarpBOT
#

Paste version of server.log from @normal holly

strong fiber
#

not seeing it either

normal holly
# strong fiber not seeing it either

Yeah does that mean anything? Idk why its not there. When I get home today I'll boot up mc to grab the server log again and see if its changed.

normal holly
balmy escarpBOT
#

Paste version of server.log from @normal holly