Fabric API

Fabric API

108M Downloads

SingleStackStorage impl can cause unwanted side effects (ex. furnaces can't ever smelt)

TropheusJ opened this issue ยท 3 comments

commented

SingleStackStorage.extract calls setStack and appears to rollback afterwards if the transaction was aborted. However, this does not take into account any side effects of setStack. In the case of furnaces, it resets the cooking timer. A simulated extraction running every tick will completely prevent any furnaces from smelting items. This is exactly what happens here. (Note that this example does not use simulateExtract directly, howerver switching to use it instead behaves identically.)

commented

Ok this is not going to be fun, but I'll see what I can do. Probably a good use case for game tests at least.

commented

BTW this is somewhat related to #1912.

commented

Fixed by #1979.