CC: Tweaked

CC: Tweaked

65M Downloads

Inventory changed event

Closed this issue ยท 1 comments

commented
  • Explanation of how the feature/change should work.

inventory event fires when the attached inventory peripheral has been changed. Turtle already has same event and I don't get it why It has the event, but the inventories has not

  • Some rationale/use case for a feature. My general approach to designing new features is to ask yourself "what issue are we trying to solve" and then "is this the best way to solve this issue?".

Sleep until someone will put items into an inventory. And no needs to write infinite loop that will cause performance hits

commented

Thanks for the issue!

This has come up a couple of times, but sadly there's no efficient way to implement it. For turtles, we have a custom inventory implementation that tracks changes. We can't do that for inventories coming from other mods, so we'd just have to poll the inventory on the Java side, which is no better than doing it in Lua!