[Bug] Potion of Cell Growth appears to have a chance to fail
MuteTiefling opened this issue · 9 comments
Describe the bug
Potion of Cell Growth appears to have a chance to fail. It also requires a low heat Adv. Incubator and this doesn't seem right.
To Reproduce
Steps to reproduce the behavior:
- Place 3x Organic Substrate and a basic Helix in a low heat adv incubator
- Wait for it to process
- Seemingly 2 out of 3 tries will result in Organic Substrate out rather than Potions of Cell Growth
Expected behavior
Potions of Cell Growth seem like they should be a guaranteed recipe and available in a standard incubator
Result that time was more Substrate
Additional context
https://discord.com/channels/1263959668997357570/1263961875998179520/1304296437693026364
I think the problem is that is_low_temperature in the recipe json was defaulting to true rather than to false. I've made it not default to anything at all, and moved the non low temperature recipes to explicitly be non low temperature
I also have this problem. and it is way worse than his stated 2/3 times it doesnt work. I set 5 advanced incubators running with a full stack of 64 basic helix in the top with 3 bottles of organic substrate in the bottom. they have been running for what seems like hours and they currently all have 15 in each stack. so thats 245 tries without getting any potion of cell growth. I have gotten 3 potions of cell growth so far on this map but it hardly ever works.
Also, every time i try and make some I do 3 bottles of organic substrate in the bottom every time but as soon as I pull out 1 bottle of cell growth the other 2 vanish. this has happened every single time I have had a success. This is absolutely the most broken thing i have ever seen.
And before anyone makes some stupid comment, yes i have tried every other combination known to man to try and get this to work. 1 helix instead of a stack. 1 substrate instead of 2 or 3. overclockers, no overclocking. chorus fruit, no chorus fruit. Advanced incubator, regular incubator. etc. etc. etc. i have been at this all day long. this is unbelievably ridiculous....
I figured it out, and once again it was an incredibly super obvious problem.
In BasicIncubatorRecipe:
override fun assemble(input: IncubatorRecipeInput, lookup: HolderLookup.Provider): ItemStack {
return getResultItem(lookup)
}
override fun getResultItem(lookup: HolderLookup.Provider): ItemStack {
return outputStack
}Problem with this is that it was using the exact same instance of ItemStack everywhere. So when you remove it from the machine the first time, that mutates that instance of the stack to have a count of 0. But since that's the same instance that was in the recipe, that means all future versions until relaunch output that ItemStack with count 0.
override fun getResultItem(lookup: HolderLookup.Provider): ItemStack {
return outputStack.copy()
}This fixes the problem. I'm so ashamed.






