#Trying to change recipe(s). First-time user.

1 messages · Page 1 of 1 (latest)

west coveBOT
#

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

north ermine
#

are these item tags or fluid tags that you want to change?

#

also does PHC have any modded recipe types, or are they all, say, vanilla shaped/shapeless (i.e. crafting table recipes)?

harsh comet
#

To be honest, I'm not sure. Again, everything is new to me. But it's the forge:milk which encompasses the milk bucket, bottle, etc. Then I have an entry to minecraft:milk that is "liquid" which the mech mixer will accept.

#

I believe they are all shapeless

north ermine
#

can you send some screenshots of what you mean

#

visuals will be easier to comprehend :p

harsh comet
#

One moment, need to get somewhere safe in-game. 🙂

#

So, the example I've been showing everyone is the recipe for "Cream" from PHC. It is ineligible to go through the mech mixer because of the milk.

north ermine
#

oh I see now

harsh comet
#

But, minecraft:milk is acceptable.

#

I need to change all the recipes from PHC that use forge:milk

north ermine
north ermine
#

you can't craft with fluids in a crafting table without a container item of some sort

#

but I believe you can craft with containers in a Create mixing recipe

harsh comet
#

Yeah, and the mech mixer won't take the containers.

north ermine
#

can you show me the mech mixer recipe for the cream

#

if there is one

harsh comet
#

That's my point: there isn't one. Otherwise you'd see the mech mixer tab up top next to the crafting table tab.

north ermine
#

ohhhh ok

#

that's odd

#

I would expect Create to autogenerate the Cream recipe since it's a vanilla shapeless type

harsh comet
#

I'll need to use a drain to turn the milk into it's liquid form, but then the recipe won't work, so I need to adjust the recipe

#

One sec, I'll post the Cream json.

north ermine
#

no I'm a bit confused as to why there's no Create mixing recipe for cream

#

if you check Cream's recipes, there should be an autogenerated mixing recipe

harsh comet
unique citrusBOT
#

Paste version of creamitem.json from @harsh comet

north ermine
#

yeah thats weird ok

#

um

#

no biggie!

#

if a Create recipe does not exist for Cream, we can create one

harsh comet
#

It's more than just Cream...but it's the simplest example. There are a lot of recipes that use milk and make automating more complicated meals impossible.

north ermine
#

because the recipes just don't exist?

harsh comet
#

Because milk is used somewhere in the process stream as an intermediary, either as itself, or turned into butter/cream/whatever. Create mech mixer won't accept anything with the forge:milk.

north ermine
#

it sounds to me like everything that uses forge:milk has a shapeless recipe, but not a Create mixing recipe

harsh comet
#

Exactly.

#

And that's intended per the Create devs.

north ermine
#

did they remove shapeless crafting or something?

#

autogenerated

#

wait a second

harsh comet
#

No, the issue is the mech mixer isn't intended to use milk in a container, just it's "liquid" form.

north ermine
#

ohhh that explains A LOT now. I'm confused because EMI shows Create shapeless recipes with containers

#

so I always assumed it accepted containers

harsh comet
#

Took me weeks to get someone just to verify that.

north ermine
#

ok wow I did not realize that

harsh comet
#

So I need to batch process all the PHC recipes that use forge:milk to instead use minecraft:milk.

north ermine
#

I wonder if the recipe autogenerator is getting confused because an item tag for milk is being used instead

harsh comet
#

Or, preferably, be able to use both.

north ermine
#

does minecraft:milk item tag even exist?

harsh comet
north ermine
#

that's a fluid tag

harsh comet
#

That's what is accepts...

north ermine
#

what you'd have to do is add Create mixing recipes for every PHC recipe that uses milk using forge:milk fluid tag

#

I don't believe minecraft has a minecraft:milk fluid tag

harsh comet
#

The picture I linked is using 250mB of fluid milk...or am I mistaken?

north ermine
#

no you're not mistaken

#

what I'm trying to say is that Create recipe accepts fluid milk

#

so yes you'd have to dump the milk in a drainer, then use that milk fluid in the recipe

harsh comet
#

Yes, we're saying the same thing.

north ermine
#

but you can't change every PHC shapeless recipe type to use the fluid milk, because... you just can't do that with shapeless crafting

#

what I imagine you'd have to do is compile all PHC recipes that use the #forge:milk item tag, then mass create custom Create mixing recipes which use the #forge:milk fluid tag

#

I believe KJS can mass scan-and-create recipes like this, I just don't know how as I've never done it

harsh comet
#

I was told KubeJS could handle the heavy-lifting with this.

north ermine
#

yes it should be able to

harsh comet
#

Yeah...frustration.

north ermine
#

somebody else who's more knowledgeable than me can certainly assist with this

#

there might also be some information from previous tickets in this server

harsh comet
#

I'll keep scanning...but without a background in this, not much is making sense and I could be passing right by what I need.

north ermine
#

how many incompatible recipes are you working with, exactly?

#

if it's just a few, you could simply copy-and-paste them in a script

#

if it's like... hundreds... that may be an issue

#

but still should be possible

harsh comet
#

I haven't done an exact count, but roughly dozens.

north ermine
harsh comet
#

I've had sparse programming study, and I get the gist of what these are doing in their respective applications, but it doesn't advance anything in my case. I just lack the knowledge to apply it.

#

It's like I need to teach myself Java/JavaScript first and come back in 6 months to look at things.

north ermine
#

I'm in the same boat here :p
have you used KJS before?

#

or is this first time ever

#

I know you mentioned it in the title of your post. just curious

#

in this case, if for some reason nobody responds to your ticket for a while, your best bet would be to have to learn the code, then run tests with your code in a minimal instance

#

(I would recommend doing that anyway tbh)

harsh comet
#

First timer.

#

Logically, I know what I need to do. But I have no means to get from A to B, currently.

north ermine
#

for example, you could take what code is in the second link, then apply it to your needs in some way. in this case:

ServerEvents.recipes((event) => {
  event.forEachRecipe([{ type: 'minecraft:crafting_shapeless', input: '#forge:milk' }], (recipe) => {
      console.log(recipe.json.get('key'));
  });
});

then see what it logs. then work with what's referenced

#

for now, you'll have to wait for somebody more knowledgeable with mass producing recipes like this to assist or run some tests yourself

#

I imagine you'll need to use .forEach() for this to work nicely

harsh comet
#

Yeah, I appreciate you getting me this far.

harsh comet
#

Anyone available to help me make some progress with this? I need to query all of Pam's HarvestCraft recipes for those that use milk in buckets/bottles/etc and "allow" them to use the liquid version "minecraft:milk".

brisk eagle
#

The absolute easiest way I can think to do this would be to go through the recipes using milk in EMI or JEI and make a list of ones you want to add mixing recipes for. Then you'd just need to write a script adding each of those recipes. I'm sure there are people who could make a more complex script to scan all the recipes added by the mod and then convert them to a different recipe type with the fluid inputs, but if there isn't a huge number of recipes needing added, that might be more trouble than it's worth for you if you don't have much experience with writing JS code.

harsh comet
autumn bay
#

You need to present your needs, and the more detailed they are, the better. For example: How would you like to change “what” recipes?

harsh comet
#

Let me dig up an example, brb.

unique citrusBOT
#

Paste version of creamitem.json from @harsh comet

harsh comet
#

So, the Create mod's Mechanical Mixer won't accept milk that comes in a container.

brisk eagle
# harsh comet Yeah, zero experience. There are 50-ish recipes I think...but I would gladly do ...

You'd just have to add the new recipes (it doesn't sound like you're actually trying to change any existing ones?). You can do that using the same format as a datapack JSON (which you can find examples of in the Create JAR file under data > create > recipes > mixing.

ServerEvents.recipes(event => {
  event.custom({
    // JSON recipe 1 text goes here
  })
  event.custom({
    // JSON recipe 2 text goes here
  })
  // etc.
})```
harsh comet
#

And Pam's HarvestCraft (PHC) has all these recipes that require milk in buckets/bottles/etc. Create only accepts the "minecraft:milk" tag for the fluid version of milk. I would like to convert the instances in the PHC recipes to use the fluid version of milk.

#

How is KubeJS actually used? Am I running Scripts from inside the game, or creating new .jsons that get loaded? I haven't been too clear on this.

autumn bay
brisk eagle
#

For recipe events, the server scripts will load when you enter/reload the world. It isn't creating any additional JSON files, if that's what you're asking.

harsh comet
#

Yes, I was asking that.

#

I'll have to look up a tutorial.

#

Are scripts like these world-specific?

autumn bay
harsh comet
autumn bay
harsh comet
#

The KubeJS wiki shows:event.replaceInput(
{ input: 'minecraft:stick' }, // Arg 1: the filter
'minecraft:stick', // Arg 2: the item to replace
'#minecraft:saplings' // Arg 3: the item to replace it with
// Note: tagged fluid ingredients do not work on Fabric, but tagged items do.
)

#

Which would seem to do what I want, but I'm unsure.

#

Well, my issue is that the PHC recipes that use milk use "containerized" milk (bucket, bottle, etc) with the "forge:milk" tag, but Create's Mech. Mixer only accepts the "minecraft:milk" tag. So I'd want to either change the PHC recipes or, I guess, create new recipes specifically for the mixer that mimic PHC but use the fluid tag instead...? Again, I'm new to this, so I'm not sure.

autumn bay
#

Okay, I think I see what you mean

ServerEvents.recipes(event => {
  event.replaceInput(
      {mod: 'pamhc2foodcore'}, 
      '#replacetag',            
      '#replacedtag'
    )
})
harsh comet
#

Where '#replacetag' is what I want to replace and the other is what I'm replacing it with?

harsh comet
#

Ok, I'll give it a shot.

autumn bay
harsh comet
#

I think what you just offered is the better way to go. My whole goal is being able to automate these recipes through the mixer.

autumn bay
#

I'm not sure how Create works with automatic mixer recipes, but it would be nice if you could automatically register recipes when you add the “minecraft:milk” tag to the item you need.

harsh comet
#

The mixer is showing as a process now...but not sure what I did with the whole "Empty tag..."

#

I'm guessing PHC doesn't recognize the minecraft:milk tag...?

#

ooooooooh crap...wouldn't I also have to specify a mB amount for each recipe?

unique citrusBOT
#

Paste version of creamitem.json from @harsh comet

harsh comet
unique citrusBOT
#

Paste version of butter.json from @harsh comet

autumn bay
#

PHC's mixer does not support fluid

harsh comet
#

I mean, not that you are required to, but this has all been discovered in this thread.

#

I know PHC is trying to pass milk as an item to the mixer, which only accepts fluid.

autumn bay
#

So if you want to make a similar recipe in PHC, it is very simple to implement in create

ServerEvents.recipes(e => {
  e.recipes.create.mixing('diamond', 'coal_block')
  e.recipes.create.mixing('diamond', 'coal_block').heated()
  e.recipes.create.mixing('diamond', 'coal_block').superheated()
  e.recipes.create.mixing([Fluid.water(10), 'dead_bush'], ['#minecraft:saplings', '#minecraft:saplings'])
  e.recipes.create.mixing(['diamond', Item.of('diamond').withChance(0.3)], 'coal_block')
})

Just change the items you want, the tags actually work too

#

If you want to implement a mixing recipe in phc, just combine the barreled or bottled fluids (in this case the fluids will be considered "items")

harsh comet
#

I don't know how...

#

You're throwing blocks of code at someone who hasn't coded outside of Fortran in 20 years.

#

I get the gist of things, but the syntax and what is actually happening in the code is all new to me.

autumn bay
#

You don't need to be able to write code, you just need to replace part of the text segment.

harsh comet
#

So, for the cream... it has two ingredients...the mixing bowl...and whatever milk I'm supposed to use.

#

e.recipes.create.mixing('pamshc2foodcore:creamitem', ['pamshc2foodcore:mixingbowlitem', '?????'])

autumn bay
#

Actually you have many choice
Take creamitem as an example
1.If "milk" is an item and you want to keep Phc's mixing method

event.shapeless(pamhc2foodcore:creamitem', [ 
  '#forge:tool_mixingbowl',
  'kubejs:example_item' // Milk stored in item
])

2.If "milk" is an fluid and you want to keep Phc's mixing method

event.shapeless(pamhc2foodcore:creamitem', [ 
  '#forge:tool_mixingbowl',
  'kubejs:example_item' // Milk stored in bottle or bucket (other mods)
])

3.If "milk" is an item and you want to use create's mixing method

event.recipes.create.mixing('pamshc2foodcore:creamitem', ['kubejs:example_item'])

4.If "milk" is an fluid and you want to use create's mixing method

#

If you don't know what fluid is considered an item, type in the command /kjs hand to get the information you want

harsh comet
#

ServerEvents.recipes(e => {
e.recipes.create.mixing('pamshc2foodcore:creamitem',
[Fluid.of('minecraft:milk', 500), 'phc2foodcore:mixingbowlitem'])
})

#

Doesn't work. I'm feeding the mixer liquid milk and the mixing bowl

autumn bay
#

Is there any error in kubejs after typing /reload?

harsh comet
brisk eagle
#

@harsh comet I think it would help if you just clarify what you're trying to do, because it seems like you and @autumn bay might be talking past each other a little bit. Are you wanting to remove or overwrite the existing recipes, or are you only wanting to add Create versions of those recipes using the fluid instead of the item container (e.g. bucket/bottle of milk)?

autumn bay
harsh comet
#

Not sure how many times I can explain it.

#

What is in the screenshot above needs to "work." Liquid milk and a mixing bowl creates Cream.

brisk eagle
#

Sorry, I'm just trying to get clarity so you can get more effective help. If you're just adding recipes, you shouldn't need to do anything with the existing recipes or tags, you'd just have to add the new create:mixing recipes.

harsh comet
#

ServerEvents.recipes(e => {
e.recipes.create.mixing('pamshc2foodcore:creamitem',
[Fluid.of('minecraft:milk', 500), 'phc2foodcore:mixingbowlitem'])
})

#

I thought this would do it.

brisk eagle
#

To verify, you already have KubeJS Create installed?

harsh comet
#

yes

#

I'm guessing "minecraft:milk" is a tag for liquid milk that originates in Create, because vanilla doesn't have "liquid" milk, just buckets/bottles. But I don't know what to pass for the fluid ID

brisk eagle
harsh comet
#

What about the tag (upper-right)?

brisk eagle
#

Do you have more than one fluid in that tag that should be usable in the recipe?

harsh comet
#

Five items have the "forge:milk" tag.

#

various mods

brisk eagle
#

You're not trying to use items, though, you're using the fluid. Those are two different things.

harsh comet
#

YES, i know...

brisk eagle
#

If you want to use the items, you can use the item tag. If you want to use the fluid, you would have to use the fluid or the fluid tag. You can't use items as fluids, or vice versa

harsh comet
#

I was answering your question.

#

I've stated I want to use liquid.

brisk eagle
#

Then you can't use the item tag for that, you would just use the fluid create:milk

harsh comet
#

create milk doesn't do anything...not even sure where you get that.

#

JEI shows the liquid milk as originating in Minecraft...which must be wrong...

#

I'm diggin through the Create .jar and can't find anything on milk

brisk eagle
#

The milk item is from Minecraft, but the milk fluid is from Create. Try looking in the emptying or filling folder in data > create > recipes, you should see something in there for filling/emptying milk buckets that tells you the fluid ID

#

Then (I believe) you would use Fluid.of('create:milk', AMOUNT) in the recipe, like you had before

harsh comet
#

minecraft:milk

unique citrusBOT
#

Paste version of milk_bottle.json from @harsh comet

harsh comet
#

which, doesn't work after /reload

#

Not sure if I need to exit game, or rebuild everything, or it simply doesn't work.

harsh comet
#

gave up