#kubejs private variables
38 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
cars, mechanisms, and progress variables...
not gonna lie im completely lost
he means that there are 2 identical mechanisms working on the same recipe and for each of these recipes you need to make separate variables, but how to do this if kubejs does not seem to support the class?
we need to make different contents of variables for each mechanism
??helpyou
╰( ͡° ͜ʖ ͡° )つ──☆:・゚˜”°•.˜”°• Many Help •°”˜.•°”˜*
Please provide a description of your issue with as much detail as possible. If you have an issue with a script provide the script. Explain what you can see happening and what you expect to happen. Be specific!
Tell us what is happening, we already know it "doesn't work".
Avoid using words like "it", tell us exactly what "it" is.
Don't assume anyone knows what you are talking about, be specific.
Provide screenshots or video if possible.
Provide the log.
the recipe is to find the coordinates of the block every tick and delete it, and on the next tick to take the next block, but for this you need to remember the coordinates of the previous block, this requires 3 variables that will be separate for each recipe because if they are confused, they will not be deleted those blocks
I think..... this is an nbt question?
recipe that finds blocks, wth
oh fuck me
it doesn't matter how the coordinates are stored. the main thing is that they are not confused with the same recipe of the same mechanism
Yes, it is custom machinery + kubejs
that wouldve been a great sentence to start with
xD
cuz "mechanism" makes no sense in this context lol
and yet I need to save the coordinates somewhere so that I can get them in the next tick. a class would be suitable for this, each mechanism would be an object with its own variables, but if kubejs does not support classes, you need to put them somewhere, and then get the coordinates
I understand, I'll try to express myself as accurately as possible
what if you made like a map that was based on remaining time in the recipe?
so on this tick delete this block, on that tick delete that one
cant you save it to the tile entity?
you mean to delete the block proceeding from the list?
maybe, tell me how
if so, then it is possible, but how to understand which block in turn we need to delete? for this again you need to save the quantity somewhere
heres an example of how i used tile entities when i worked on multiblocks in ATM6:
https://github.com/ladylexxie/Original-ATM-6/blob/master/kubejs/server_scripts/advanced_interactions/multiblock.js#L14
have to go to bed now tho
but based on the earlier code, your recipe is only like 1 tick long....
you can schedule stuff in the future....
I don't think we can plan something in the future
so like
Utils.server.scheduleInTicks(someTickCount, someData, callback => {
let data = callback.data
// do something with data
})
yes, the recipe takes 1 tick and you need to save the coordinates in it, and read it next time because all variables are erased at the next tick
what is stored initially in callback.data?
what you passed as someData