#Trying to change recipe(s). First-time user.
1 messages · Page 1 of 1 (latest)
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)?
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
can you send some screenshots of what you mean
visuals will be easier to comprehend :p
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.
oh I see now
But, minecraft:milk is acceptable.
I need to change all the recipes from PHC that use forge:milk
ok so what's being used here is an item tag, which only apply to items
in here, a fluid tag is being used
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
Yeah, and the mech mixer won't take the containers.
That's my point: there isn't one. Otherwise you'd see the mech mixer tab up top next to the crafting table tab.
ohhhh ok
that's odd
I would expect Create to autogenerate the Cream recipe since it's a vanilla shapeless type
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.
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
Paste version of creamitem.json from @harsh comet
yeah thats weird ok
um
no biggie!
if a Create recipe does not exist for Cream, we can create one
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.
because the recipes just don't exist?
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.
it sounds to me like everything that uses forge:milk has a shapeless recipe, but not a Create mixing recipe
No, the issue is the mech mixer isn't intended to use milk in a container, just it's "liquid" form.
ohhh that explains A LOT now. I'm confused because EMI shows Create shapeless recipes with containers
so I always assumed it accepted containers
Took me weeks to get someone just to verify that.
ok wow I did not realize that
So I need to batch process all the PHC recipes that use forge:milk to instead use minecraft:milk.
I wonder if the recipe autogenerator is getting confused because an item tag for milk is being used instead
Or, preferably, be able to use both.
does minecraft:milk item tag even exist?
This.
that's a fluid tag
That's what is accepts...
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
The picture I linked is using 250mB of fluid milk...or am I mistaken?
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
Yes, we're saying the same thing.
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
I was told KubeJS could handle the heavy-lifting with this.
yes it should be able to
Yeah...frustration.
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
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.
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
I haven't done an exact count, but roughly dozens.
https://discord.com/channels/303440391124942858/1224379041029689434
<#1153840062467944579 message>
https://discord.com/channels/303440391124942858/1057891104256696360
I found a few resources that may be useful for what you may need
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.
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)
First timer.
Logically, I know what I need to do. But I have no means to get from A to B, currently.
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
Yeah, I appreciate you getting me this far.
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".
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.
Yeah, zero experience. There are 50-ish recipes I think...but I would gladly do the grunt work to be able to get them to function the way I want. Any suggestions on where I could find a template to change a recipe or whatever I would need to do?
You need to present your needs, and the more detailed they are, the better. For example: How would you like to change “what” recipes?
Paste version of creamitem.json from @harsh comet
So, the Create mod's Mechanical Mixer won't accept milk that comes in a container.
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.
})```
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.
Try this?
ServerEvents.tags('item', event => {
event.add('minecraft:milk', [
'kubejs:example_item',
])
})
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.
Yes, I was asking that.
I'll have to look up a tutorial.
Are scripts like these world-specific?
Yes, if you're referring to the script I gave you.
How are these run? Am I physically typing something in-game, or am I setting up text files in a folder that get loaded?
Create a new file named Example.js, copy the code I gave you into the file, and put it in the kubejs/server_scripts folder.
Ok. Done. Opened my world. I don't understand what I've actually accomplished.
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.
Okay, I think I see what you mean
ServerEvents.recipes(event => {
event.replaceInput(
{mod: 'pamhc2foodcore'},
'#replacetag',
'#replacedtag'
)
})
Where '#replacetag' is what I want to replace and the other is what I'm replacing it with?
yep
Ok, I'll give it a shot.
This script offers to add “minecraft:milk” tags to specific items, but of course I'm not sure what idea you would use to modify the recipe
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.
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.
Well...I did...something.
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?
Paste version of creamitem.json from @harsh comet
This is a recipe that works from another mod:
Paste version of butter.json from @harsh comet
A problem, the bottled or barreled milk in PHC seems to be included in the recipe as an item.
If you want the same recipe in Create's mixer, you can check
https://wiki.latvian.dev/books/kubejs/page/kubejs-create
First you need to confirm whether "milk" is an item or a fluid
Download: CurseForge, Modrinth
The example scripts are only here to demonstrate the recipes. They a...
PHC's mixer does not support fluid
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.
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")
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.
You don't need to be able to write code, you just need to replace part of the text segment.
I get that.
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', '?????'])
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
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
Is there any error in kubejs after typing /reload?
No. I may have the fluid id wrong...not sure where to find it
@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)?
I don't understand what he wants to do, so I give all the possibilities.
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.
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.
ServerEvents.recipes(e => {
e.recipes.create.mixing('pamshc2foodcore:creamitem',
[Fluid.of('minecraft:milk', 500), 'phc2foodcore:mixingbowlitem'])
})
I thought this would do it.
To verify, you already have KubeJS Create installed?
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
Try create:milk as the fluid. Minecraft doesn't have a vanilla fluid for milk, it's added by Create
What about the tag (upper-right)?
Do you have more than one fluid in that tag that should be usable in the recipe?
You're not trying to use items, though, you're using the fluid. Those are two different things.
YES, i know...
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
Then you can't use the item tag for that, you would just use the fluid create:milk
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
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
Paste version of milk_bottle.json from @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.
Ticket closed!
Ticket closed!
gave up