#Are there any mods / libraries that are known to cause problems with KubeJS?
1 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of harderWood.js from @maiden otter
I'm thinking it could also have to do with the priority but I am not sure
it probably doesn't
??kjslogs
You can find your KubeJS server log here. You should send it if asked, as it contains helpful information: minecraft/logs/kubejs/server.log
If you are on 1.18 or below it will be called server.txt.
Paste version of server.txt from @maiden otter
oh yeah I should have added the log too, it shows that for some reason it reads barriers
log strippedLog before making the recipe then send the log again
doesn't it already do that?
ah I suppose not
it does it later
wait but that shouldn't effect it now should it
like this?
// multiple items
else if (typeof woodlog === 'object') {
cyc.logOnce('This seems to be an array of items.');
let strippedLogList = woodlog.itemIds.filter(item => /.*stripped.*/.test(item));
let strippedLog = strippedLogList.filter(item => /.*log.*/.test(item));
let unstrippedLog = woodlog.itemIds.filter(item => /.*(?!.*stripped).*log.*/.test(item));
cyc.logOnce(strippedLog) // <------------------------------ here
if (strippedLogList.length == 0) {
console.log('Planks Recipe creation skipped for: ' + woodlog);
return;
}
cyc.logOnce(strippedLogList)
event.shapeless(`4x ${plank}`, Ingredient.of(strippedLogList)).id(r.getOrCreateId());
if (false){ // [17:22:26] [ERR ] server_scripts:harderWood.js:49: Failed to create recipe for type 'kubejs:shapeless': dev.latvian.mods.rhino.Undefined@0 is not a valid result!
console.log('Logs Recipe creation skipped for: ' + woodlog);
return;
}
event.shapeless(strippedLog[0], unstrippedLog[0]);
}
what is your cycle thing
wdym
i have never seen the syntax cyc.logOnce
oh yeah it's a function I made to only log something one time, it's a little hacky though
then its useless
cause the first recipe isnt erroring
unless it is and i missed something
the first one seems to be erroring too:
[20:00:02] [INFO ] server_scripts:libraries/logutils.js:14: log 2/4: byg:skyris_planks
[20:00:02] [INFO ] server_scripts:libraries/logutils.js:14: log 3/4: This seems to be an array of items.
[20:00:02] [INFO ] server_scripts:harderWood.js:42: Planks Recipe creation skipped for: [Item.of('minecraft:barrier', "{display:{Name:'{\"text\":\"Empty Tag: byg:skyris_logs\"}'}}")]
[20:00:02] [INFO ] server_scripts:libraries/logutils.js:14: log 4/4: ['twilightforest:mangrove_log'] ```
yes but in game the recipe doesn't work.
so they're working
as in they're giving me information on wether a recipe failed or not
if it fails it skips, simple as
(normally it's supposed to skip some, as some logs don't have planks etc.)
but it is creating bad recipes which are erroring
so you obviously arent skipping enough recipes.
listen all I know is that the script here is later in queue for things I'm looking for
all I know is that it works when I have less mods, and it stops working with more mods
by logging the thing that is erroring you snould be able to figure out what condition you need to check to skip the bad recipes
so log (using a standard log statement) the strippedLog array just before the recipe creation on line 57
then send the log, or have a look at it yourself, to see what the array looks like for the recipes throwing errors
sorry 52
Paste version of server.txt from @maiden otter
hmm
as expected if it skips it returns
so the log is not shown unless the recipe works
I should move it back igg
no?
thsi recipe is erroring
and you can see the cause is the array youu are getting the ingredient from is empty
I feel like you're looking at the wrong stuff
that was an error that happened when the script worked too
I was trying to figure out why - if I remember correctly it was because of some recipes having separate log recipes - but it doesn't seem to relate
after all, recipes such as the skyris planks get skipped but don't have that error
so what is your actual issue?
all you have said is 'this doesnt work' and thenmsent the log and script
so that is the information i am working off, starting with the first error in the log
on a large modpack
on a small modpack it works
I'm trying to find the mod that's causing it
A binary search is a way of finding a faulty mods/scripts when you have a lot of them, but without having to remove them one-by-one.
The procedure is simple:
- Take half of the existing mods/scripts and move them out, into another folder.
- Run the game.
- Does the issue still exist?
If YES: Repeat from step 1 with the current things.
IF NO: Swap out the current things with the ones you moved out, and repeat from step 1. - Repeat this process until the problematic mod(s)/script(s) have been found.
with 292 mods I doubt I can do binary search in a reasonable amount of time
well its more reasonable that removing them one by one
will still take a good 30-60 minutes,but its more productive t an trying to get suppot without providing enough information
so far someone suggested it might be hammer lib, though that was on another pack and this one doesn't have it
so I should look into what hammer lib does, so maybe I could figure out what other library or mod does the same
and then my search would be easier
I doubt it would take so little time
after all I have to disable half of the mods one by one, then run minecraft, then check, then close minecraft, then do the process again
in short, binary search is unfeasable
hammer lib mixins to kubejs
it is the only mod known to do that (apart from maybe modern fix,but that is okay aiui cause the author is actually in the server)
in this case
the same mod creator that made hammerlib seems to have made libraries for microblocks and multiparts
my modpack has CB Multipart, which is a new mod that does essentially the same thing
considering that the microblock and multipart mods have hammer lib as their dependency it is possible that CB Multipart might have integrated parts of it within the code
so I'll try disabling that and the project red mods
I'll tell you if I find something new
check your logs for a passive agressive message from the hammerlib author
latest.log ?
yep
if its there, then theres like a 0.5% chance that one of his mods is causing a problme
if its not there, its about a 0.05% chance
it will be something like
hello kubejs this is your "friend" hammerlib
I've injected x recipes into your flawed recipe system
or smth
I could not find something like that in the logs
I will try to disable the mod anyways just to check
If that doesnt work, can you start from scratch explaining your problem. dont assume the solution this time though ('removing mods' is a solution)
??xy
The XY problem is when you really want to do X, and you think that Y can achieve X. However, you can't get Y to work, and so ask for help exclusively about Y.
This can lead to a lot of confusion from the people trying to help you, as Y can seem like a very random thing to want to do, and a lot of the time isn't the best way to achieve X anyway.
Its fine to ask about Y, just always include some context about X so you can be put on the right track if Y won't do X well, or there is an easier way to do X.
you havent given enough information about X, but you have kept trying to push Y
I will explain in the meantime
I made a script for autonomous planks recipe creation on a pack with a few mods as to avoid having to load every single one every time, and when I found that it worked, I transferred it over to my larger pack, where unfortunately (with the same code) it stopped working.
I had copied the script on another pack I am working on too, and it had the same results, but someone told me it could've been hammer lib, which unforunately isn't in the main pack I'm making
which is the reason I had been assuming a library to be causing this
also unfortunately disabling CB multiblock didn't work
multipart*
what do you mean by 'stopped working'.
there are errors in your log,but you said before that those are not related (btw posting logs with unrelated errors is incredibly unhelpful. try stop the errors from happening before asking for help)
if you need help stopping those errors, ask
Before the recipes happened, now they don't happened
if you want I can also tell you what the script does
it takes the log -> planks recipes, and modifies them so that you can only use stripped logs
can't remember if it straight up modifies them or just removes and replaces them though
probably the latter
post your mod list