Immersive Engineering

Immersive Engineering

143M Downloads

Assembler doesnt use fluids

ChangeOtaku opened this issue ยท 15 comments

commented

Minecraft Version

1.19.2

Immersive Engineering Version

1.19.2-9.2.3-167

Expected Behavior

fluids getting used by Assembler

Actual Behavior

recipes that require fluids, needs manually-filled containers

Steps to reproduce

1- build assembler
2- power it
3- provide liquid
4- configure recipe that requires liquid-filled containers
(i didnt understand the "recursive" option, but i turned it on/off again and again to see if it changed anything)
image

Debug Crash Log

https://pastebin.com/cU2p4eJf

commented

Okay, so I managed to do some fixes on this, allowing things like coffee and anything else that can be specified with a bucket to be craftable with fluid.

Anything that requires a cell will not be able to substitute a fluid, because either us or IC2C would need to add explicit compat for that - and I'm not particularly bothered.

Also, anything that uses stacksizes in its ingredients doesn't work. That's a change I may tackle in 1.20.4 or something in making more overhauls to the Assembler in general.

I'm closing this one for now.

commented

@BluSunrize that's fine.
My solution, I could have posted this, was on startup to generate a list with all fluid containers
and simply have a Item -> Fluid Map to figure out what fluid is required.

On startup you can simply use the CreativeTab Item Scanning for getting all the item variants for fluid containers.

Regarding Stacksize, that is fine.

Anyways have a happy easter

commented

plus: when i fill the bucket by hand and put it back in, the crafting works but the bucket is also dropped... shouldn't it stay inside the assembler for continuous use? (i imagine thats what the "recursive" option is for, but i turned it on/off and nothing changed)

commented

The bucket isn't needed.
If the recipe is configured properly, the assembler can just apply the water directly without needing the bucket!

commented
commented

i think a video could be more useful, have i done something wrong here? https://youtu.be/esv5j4EvGto

commented

Can you figure out what mod adds that recipe?
Our assembler tries its best to be compatible with other mods, but it doesn't always work.

commented

@BluSunrize for the stack recipes, looks like you are sanitizing the input ingredients since minecraft supports stacksize inputs in "Ingredients".
The stack variant allows to have itemstack be present and it doesn't set the stacksize to 1.
It's just that the vanilla parser doesn't allow for NBT or stacksize. But both IC2Classics and Forge allow stacksize be present in the ingredient that is parsed.
That is the main problem. (Just look at the ItemStack variant of ingredients of function)

About fluid recipes:
We provide a list with all the valid fluid containers.
Not sure if IC2C could make that more accessible to you. But technically you could test if the provided example is a fluid container and which fluid it contains.
Here is the code by the way. A lot of the recipe related stuff is open source.

If there is anything i can help with, just ask.

@ChangeOtaku the lava cell isn't a bug, that should be a cell item and not be a fluid container, same with the thermometer iirc.

commented

well, isnt that a coincidence... that wasnt the recipe i wanted to do, i just used it in here because it was visually simpler, but i just saw that this one and the one i wanted both are from IndustrialCraft2 Classic

commented

well, for testing, i saved all recipes from IC2Classic that use fluids (that arent IC2C exclusive):
image

here are some stuff i found out:

3 types of recipe (from IC2Classic) never work on IE's Assembler:
1- anything that requires multiple items in the same crafting slot isnt even recognize by the assembler (that was kinda obvious, since its an ancient way of crafting that no recent mods use)
2- anything that uses water (with 1 exception)
3- anything set to use IC2's container, the "cell"

(so, the recipes from IC2 that work on IE are the ones that use other fluid than water and said fluid isnt stored in a IC2's cell, but in another container, like a bucket, etc...)

prints for more complete info:
image
image
image
image
image
image
image
image
image
image
image

commented

the main problem is that the Immersive Engineering "Assembler" should use the fluids in its tanks automatically, but it isnt doing this as it should with IC2 recipes that uses water or IC2's cells

(sorry if i end up writing something wrong/confusing, english isnt my first language and im not a programmer)

  • interesting what you said about the stack recipes, i havent seen recipes like that in a while, so i just assumed it was because IC2 is an old mod
  • even using vanilla water buckets in the recipes, the assembler isnt using the water in its tanks (only with IC2's recipes)
  • well, the lava cell thing seems counter-intuitive for me, but if its the intended way, i cant really complain kkkk
commented

@ChangeOtaku i am fully aware of the situation.

  • Stackcrafting: That is a relatively new feature introduced in 1.10.2 iirc, developed funnily enough by both the IC2Exp and IC2Classic team, or at least we saw the potential and made attempts for it first.
  • Buckets: There is no universal: "use fluids here" API. So she can only make educated guesses, the main issue could be because ic2c provides it with all possible containers as examples.
  • Lava/Water cell: I mean look at the output item. You are literally upgrading a cell to do a different functionality. Or would you say a bucket can be a thermometer?
commented
  • about stackcrafting, well... than it was false memories talking to me haha i remember it always being a thing in IC2

Its getting a little too technical so im not being able to follow, but it isnt really that important for me to understand kkkkk
so, i will just leave here my last thoughts:
(i think these should be valid ways to craft, but arent)
image
(funny enough, the first [left to right] recipe used the lava/water cells even thought i didnt set the Assembler to use them. plus: the middle one was the only one to pull fluid from the assembler's tanks)

considering the "only exception" i mentioned in the prints before, i took a deeper look into the recipes and what i think is happening is that for some reason all recipes that have IC2's cells as an OPTIONAL component doesnt work with Assembler's "fill container" function (i looked up all the recipes that worked and none of them accept a "water cell", "lava cell", ""milk cell"" or something like that... they ONLY accept vanilla buckets, but if a recipe REQUIRES or has the OPTION to use a cell, it wont work in the assembler as intended)

soooo... i looked other mod recipes... yeah, the problem doesnt have anything to do with IC2 (just that one about the lava cell and the thermometer, but that isnt a problem, i just thought that should work differently xD)

The Assembler doesnt use fluids if a recipe has a... i dont know the term, but a CONTAINER that can be more than one item, like these:
in this one, i need to provide a water bucket (or other container with water)
ezgif-3-823ec37a7f
in this, i need to provide a milk bucket (or other container with milk)
ezgif-3-3d64d309c8

commented

used CraftTweaker to force all forge:milk to be just minecraft:milk_bucket and the recipe in the gif above worked
image

commented

well, i kept testing some stuff and my suggestion (as someone who doesnt undestand about programming, modding, etc...) would be to make the assembler consume liquid based on the ingredient's tags, like... "consume 1000mb of water in the place of a forge:water ingredient" or something like that. plus: dont know if it was something i did wrong, but the assembler doesnt recognizes bottles as containers? even vanilla bottles?