Refund clay jars when crafting with Linseed Oil

Grant Fomin shared this feedback 12 months ago
Considered (Not Planned)

There doesn't really need to be an explanation for this. Clay jars are actually quite expensive to produce in-bulk (requiring 10 clay apice, which is a pretty sizable chunk of mining equivalent roughly to a full size block for one jar from what I can tell), and late game linseed oil is needed in large amounts when reforging steel tools and when fussing around with mechanical blocks.

Industrial flax farming is a fair requirement as its all a part of the tech progression and assumed that by the time you would need it you would have the means to get it. Flax is also renewable, you can farm the same patch of turf indefinitely. When playing on a server where other players claim lots of territory this is important because you might have a very limited area from where you can find resources like clay.

That and getting your jar back is just... realistic. You don't have to break it to get the oil out, and presumably have the means to clean it out and use it again.

I equate it to crafting a cake in minecraft and losing the three buckets holding the milk.

Comments (12)

photo
2

This should definitely be done, since (de)constructing mechanical blocks already returns clay jars. The lack of it in the steel tool crafting is an inconsistency and is only there because there's a bug/exploit happening in the crafting system when the crafting process outputs more than one item.

When the crafting inventory has not enough space to take all the outputted items, the process gets stuck and you can infenitely clone the item(s) - in this case the steel tools. I ran into the exact same issue with the Art of Brewing mod and its linseed bread recipe, which outputs the bread itself and the yeast for fermenting purposes.

Fixing/overhauling the crafting system would probably take some time and effort, so I doubt it will be done in the near future, but nevertheless, imho, it should definitely get fixed, due to said inconsistency in vanilla, but also for the sake of modding flexibility. Otherwise, you can never make a crafting recipe that outputs more than one item.


P.S.: This rather is a bug and I reported it on the forums already, back before the support page launched.

photo
1

in the mod with water when you make a fishing net with linseed oil you indeed get the empty clay jars returned! all 5 of them...

photo
3

We have experimented with this recently. It is very easy to add the empty jars to the results of recipes. The issue is that when we have recipes returning more than one item it causes some inventory problems and a nasty exploit.


The sequence for crafting is:

  • Check that all required items are available in the input inventory
  • Move those items to the hidden crafting inventory (1 type at a time because that's how inventories work)
  • Wait until the crafting is complete
  • Add the results (1 type at a time) to the output inventory
  • Clear the hidden crafting inventory

There are two ways to interrupt crafting. If there is no room in the output inventory the crafting is paused. If crafting is canceled, the items are moved from the hidden crafting inventory back to the input inventory.

It is these interrupts and the way items are transferred one type at a time that causes problems.


When crafting is complete we start transferring results one type at a time. If there is room for the first result it transfers. If the output inventory is full after this transfer then the second result will not transfer and crafting will pause. At this point, you can cancel crafting and the hidden crafting inventory is returned to the input inventory. This leaves you with the prerequisites AND the first result. This can be repeated infinitely (perhaps with only the consumption of fuel) to farm free items.


We made an attempt to work around this by allowing the crafting component to temporarily expand the inventory but it turned out to be a dead end. That leaves the only resolution to be changing the way inventories work so we can check if there is free space for all of the results before any transfers happen. This is not a small change and it would have to be planned carefully to work with all game systems. Those game systems might all need small changes as well to work with the new system. So it becomes an even larger task. Then we have to test every possible inventory interaction that is possible to make sure that we get reliable results in every possible situation. This sounds simple but there are a lot of cases and conditions that they can be tested in. So it becomes an even larger task. Add finding fixes for any bugs that are found and time for more testing and you can start to see just how large this task becomes.


I'm not saying it won't happen. We may end up updating the inventory for other reasons. If we do that then there is no impediment. Unless that happens, it is far beyond the scope of work just to add some missing jars. I would also point out that the jars can be modded into the recipes with a few minutes of copying and pasting. So if you're ok with the exploit then feel free to mod them in and enjoy.

photo
2

Could you just add a check that prevents crafting start if there is insufficient inventory space for all the products, and then either

lock the inventory during production, or

reserve the slots needed so it never goes over?


I feel like this is a core aspect of the game that really needs to be robust instead of avoided.

photo
1

Why not a for statement counting total slots free in machine and players inventory. Another if check on the var that the for statement produced (on the supplied inventory or the player's inventory available count), if both = true then begin crafting. Work it just like when you break down a mechanical block where it returns an empty clay jug. On cancel, just return the supplied inventory items. On crafting start and the if check fails then prompt the user not enough free slots are available - Break;. If your guys code is open-source I will gladly help you guys make this a reality. If not, feel free to msg me the block you guys were testing with.

photo
1

Good explanation, I am not sure you may have thought of this already but it gave me an idea; when crafting finishes ("crafting is complete" step) send out an event message or something similar that the GUI can hear and then it locks down / greys out / removes the cancel crafting button. Now you simply do not worry about the crafting being cancelled, if the player did not cancel it before he is now beyond the point of return for it. Things that have long crafting times are usually expensive and on the reverse short crafting times are usually inexpensive so it is no problem. Hope this helps.

photo
photo
1

wonderfully thorough explanation and i thank you for the full logic explained here, appreciated and makes sense

photo
2

Now that the crafting has been overhauled in 0.7, can this be revisited?

photo
1

Made a quick test this morning after last evening patch.

I crafted some Ink with coal and Linseed oïl, my clay jar was on the output as well as the Ink


==> I didn't try any other craft bu the mecanism seems implemented with 0.7.1

photo
1

That is odd, the jar isn't refunded in the forge when making steel tools/weapons.

photo
photo
2

It's a pity the jars don't work more like the personal Oxygen/Hydrogen tanks in SE, i.e. having a percentage full. Then besides being able to reuse containers you could have different sizes of container. It would be really nice if my windmill could produce Linseed oil by the Barrel.

photo
1

Although a nice little thing you can take advantage of, is to plant 9 of the 10 flax seeds. Then use the 10% left bag in making linseed oil :)

This little bug or whatever it is has always existed. It never grabs the data value from the flax seed bag itself, it just looks for the item. As for the barrel, I vote for that as well. I am a hoarder and would love to fill my storehouse.

photo