What im trying to do is make a centrifuge recipe that takes 50 water cells and makes 1 heavy water cell and 49 empty ones. I use the method used in getSubItems to get the cells with fluid. I know that works bacause if i set the input to a random item like iron ingots it works but if i set it to the water cells the recipe is not working.
How do i use the fluid cells in machine recipes?
-
-
never use getSubItems to acquire Items. That Method is Clientside Only and only exists for Creative Mode and NEI Displays
-
i mean the getItemStack(Fluid) used by it. That part works but i cant get it to work with water cells on the input.
-
try just using getIc2Item("waterCell") or something instead of trying to manually fill it with water.
-
filling them is not the problem. i cant use fluid cells as inputs. even if i make the output a random item like iron ingots it still wont take them. i can use them as outputs fine but not inputs.
-
Oh youre using universal fluid cells? That is probably the Issue. They dont work right as Inputs.
-
universal fluid cells are the only fluid cells. and they work in the compressor.
-
What error are you getting when doing Cell -> Cell + Empty Cells? There's been a lot of work (some quite recently) to make universal fluid cells work in machine recipes, especially if a different recipe using them already exists (hence the compressor recipe is fine).
As an aside, getSubItems was patched to be universal in 1.11 and was made universal in 1.12 so you're clear to use it without concern.
-
I dont get any error. I think the machines cannot handle NBT in inputs. Empty cells work but that is no use to me.
-
They all use the same base recipe manager which can definitely use NBT. It does sometimes need slightly different passing in though to ensure it checks the way you need, but for what you're doing it shouldn't. The extractor has an air cell to empty cell recipe which means universal fluid cells definitely do work as inputs too.
Try something like...
JavaIRecipeInput input = Recipes.inputFactory.forStack(IC2Items.getItem("fluid_cell", "water"), 50); ItemStack outputA = IC2Items.getItem("fluid_cell", "ic2heavy_water"); ItemStack outputB = IC2Items.getItem("fluid_cell"); outputB.setCount(49); //49 Empty universal fluid cells output Recipes.centrifuge.addRecipe(input, Arrays.asList(outputA, outputB), null, false);
-
does not work. and the extractor cant use cells air cells either.
-
Which version of IC2 are you compiling against/using? It did previously have some problems so older versions won't work.
-
industrialcraft-2-2.8.73-ex112-dev.jar
-
That'd do it, the extractor recipe was only fixed in 86 and I would doubt fluid containers would work reliably before it too. Try updating and trying again with 96. Curse is definitely due a bump in version soon if it works.
-
also how would i disable the water to coolant recipes so i can make heavy water be used instead?
-
You'd have to remove the recipes from the canning machine's enriching recipe manager; the cleanest method being removing it from the ICannerEnrichRecipeManager#getRecipes() iterator. Whilst not really recommended normally, it remains the best way to remove recipes if that is what you want to do.