#Sequenced Assembly Deploying

85 messages · Page 1 of 1 (latest)

stuck kraken
#

I have this sequenced assembly recipe that try to use sandpaper in deploying, however it simply does not work even though there are no errors. I can fill a diamond with water but after that I can't deploy sandpaper on it.

let diamond = 'kubejs:incomplete_diamond'
event.recipes.create.sequencedAssembly(
  ["kubejs:gem_quality_diamond"],
  Item.of('minecraft:diamond'),
  [event.recipes.create.filling(diamond, [diamond, Fluid.of('minecraft:water', 250)]),
  event.recipes.create.deploying(diamond, [diamond, '#create:sandpaper']).damageIngredient(1)]
).transitionalItem(diamond).loops(8)
slender ploverBOT
#

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

left quail
#

I think it's createDeploying() not create.deploying()

stuck kraken
#

create.deploying() works in my other recipes but ill try it

haughty ventureBOT
#

You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or below it will be called server.txt.
Please send it if asked, as it contains helpful information.

lean cedar
#

Even if there is no error, there may be a parsing warning

stuck kraken
haughty ventureBOT
#

Paste version of server.txt from @stuck kraken

left quail
#

I'm running some tests and it seems Create has an aversion to "deploying" sandpaper...

#

I tried your code with an axe and that deploys and is damaged just fine. Presumably Create has custom logic for create:sandpaper_polishing wich overrides/messes with regular deployment recipes :/

stuck kraken
#

tragic

left quail
#

truly

stuck kraken
#

a dumb hack might be to just make another item just for this lol

left quail
#

"if it's stupid and it works it aint stupid" as they say

#

or you could add your own sandpaper without the #create:sandpaper tag

stuck kraken
#

yeah thats the plan

left quail
#

I'm looking into custom ingredient actions. It seems like we can hack the hell out of the sandpaper_polishing

lean cedar
#

Good idea

left quail
#

While we're at it: you should probably report "deployers can't deploy sandpaper" as a bug

left quail
#

I found a way without making new items or custom ingredient actions

#

but it's curesed

stuck kraken
#

what is it

left quail
#

I think I was wrong about that. :/
Manipulating the NBT is not a thing without custom ingredient actions (as far as I can tell) so I'm going back to that when I wake up.

The last attempt was making a function wich generated NBT-filtered sandpaper_polishing recipes to fill in the gaps in the sequenced assembly.

left quail
#

Never mind! I got it!
I just messed up with the double quotes for strings inside NBT compound tags written as single-quote strings.
This function will spoof the sequenced assembly step with NBT manipulation of the sandpapered item.

#

oh. too long for Discord :/

haughty ventureBOT
#

Paste version of sequencedAssemblySpoofFunction.txt from @left quail

left quail
#

There we go!

#

Instructions:
Once, in your server scripts with the sequenced assembly recipe, call sequencedSandpaperStep(outputItem, inputItem, recipeID, transitionalItem, assemblyStepIndex, assemblyStepCount, assemblyLoopCount)

where
assemblyStepIndex is the step where you deploy #sandpaper (should be 2 for you)
assemblyStepCount is how many steps there are per loop (2 again)
assemblyLoopCount is how many steps there are per loop (so 8)
and recipeID is the ID of the sequencedAssembly recipe (you have to call .id('<anything>') on your sequencedAssembly recipe registration event.recipes.create.sequencedAssembly().transitionalItem().loops().id('SomeText') )

and you register the sequenced assembly just like normal with the sandpaper deployment staged as if it did work.

#

I'm getting a coffe

stuck kraken
#

This is genius! Unfortunately it still doesnt work :( . Here's my current code

haughty ventureBOT
#

Paste version of code.js from @stuck kraken

left quail
#

@stuck kraken could I have your kubejs server.log file?

stuck kraken
haughty ventureBOT
#

Paste version of server.txt from @stuck kraken

left quail
#

is there another problem besides the output always being 'kubejs:gem_quality_diamond'?

#

no need for .ignoreNBT() or .damageIngredient() btw

#

@stuck kraken?

stuck kraken
#

no

left quail
#

then I'd say you should try to put
[Item.of("kubejs:gem_quality_diamond").withChance(1), Item.of("minecraft:coal").withChance(9)]
as the outputItem of the function. But I dont know if create.sandpaper_polishing supports chance based output :/

stuck kraken
#

I can set [Item.of("kubejs:gem_quality_diamond").withChance(1), Item.of("minecraft:coal").withChance(9)] as the output and there are no errors but it doesnt work

left quail
#

then you'll heve to use customIngredientAction or make sure deploying sandpaper is not the last step in the sequence (by reversing the order, for example)

#

wait. did you pass that as the first function parameter of sequencedSandpaperStep?

stuck kraken
#

yes

left quail
#

hmm...

stuck kraken
#

also i just tried reversing the order and it works sorta

#

it just completely ignores the filling step

left quail
#

did you remember to change the assemblyStepIndex to 1?

stuck kraken
#

yes

left quail
#

weird. can I get the new log?

stuck kraken
haughty ventureBOT
#

Paste version of server.txt from @stuck kraken

left quail
#

assembly step count is 1, should still be 2

#

if I've logged correctly 😅

#

nvm. I have

stuck kraken
#

well now its back to deloying once and getting stuck

left quail
#

same on my end.

#

there seems to be a problem wit having a recipeID with no domain (eg: 'diamond_gem')
try 'kubejs:diamond_gem'

#

unless that's an item you've implemented

#

with no domain it defaults to minecraft:<your id here> so the item doesn't match the NBT of the recipe

#

I have it working now

#

(with the assembly step order reversed)

stuck kraken
#

oh damn it works now

left quail
#

😎

stuck kraken
#

That was quite the adventure, thank you for patience and support!

left quail
#

No problem, m8. I had fun

#

what are you working on, btw? I assume a modpack

stuck kraken
#

although the chance thing just seems to be 50/50

#

nvm made a mistake

left quail
#

deep sigh of relief

stuck kraken
#

nvm again

#

it is just output everything in the array once

#

so one diamond makes 1 gem quality diamond and 1 coal

left quail
#

that will be... One log and one code dump, please

#

I'm getting 9 to 1

stuck kraken
#

what do you have as the output for sequencedSandpaperStep

left quail
#

[ Item.of("minecraft:emerald").withChance(1), Item.of("minecraft:coal").withChance(9) ]

#

but I have the assembly steps in reversed order. And in your last log you didn't

#

that is to say: I have polish, then wash
but I think you have wash, then polish

stuck kraken
#

yeah that seems to fix it

#

unfortunate i guesss

left quail
#

create:sandpaper_polishing not supporting chance based output means you can only have the last step be random with customIngredientAction() if you want it to be deploying sandpaper.
In my opinion polishing first makes more sense though

#

nvm. there is a "fix" wich makes the AVERAGE correct but each instance is still scuffed

#

this
[ Item.of("minecraft:emerald").withChance(0.1), Item.of("minecraft:coal").withChance(0.9) ]
outputs an emerald 10% of the time and coal 90% of the time. but sometimes both and somethimes nothing :/
average is correct tho