#Create mod: mixing a fluid as an input will not work.
71 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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)]
the 10 is within the brackets
that is how the Fluid.of() works
Whoops, now I realized that I mistyped the , 10, Corrected
weird that it would need to be an array tho
putting it in brackets still seems to not work
can you drop the whole file?
sure, i have some recipes from a tutorial i haven't deleted yet though.
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.
Paste version of CraftTemp.js from @normal holly
Paste version of server.log from @normal holly
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
🙂
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
I have no idea what im doing lol
you are doing something really intensive somewhere, that is for certain
did my file fix the issue btw?
not really, going to check if the issue is with the mod version
create 6, checking the create kubejs build which is on build 2
also if that fixes it, please check your server log and see if the rates here got better, if not, you should probably look into that
Paste version of server.log from @normal holly
is it better now?
[15:50:50] [INFO] Added 10 recipes, removed 0 recipes, modified 2 recipes, with 8 failed recipes in 60.42 ms how would i go about fixing this?
im still insanely new so i have no idea what i'm doing wrong
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
👍
Paste version of example.js, foods.js, loottables.js, startingloot.js, crafting.js from @normal holly
A few questions:
- Does the tag apply correctly in food.js?
- Do all your recipes apply?
@strong fiber can confirm that the tag applies correctly and that all the recepies do as well
hmm
your code looks fine, which is why I am quite confused as to why this takes 60ms to load
[07:19:24] [INFO] Loaded 5/5 KubeJS server scripts in 0.007 s with 0 errors and 0 warnings
oh nice
what changed between that and this?
wait diff line
?
if you scroll down in the file you should see a line about added recipes
what does that say?
couldnt find one but i might be blind
Paste version of server.log from @normal holly
Forgot to @
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.
Paste version of server.log from @normal holly