IRequestProvider rewrite
asiekierka opened this issue ยท 3 comments
The logic for IRequestProvider should be moved in the following manner:
- IRequestProvider is rewritten to only have two functions: List getNeededItems() and ItemStack offerItem(ItemStack item).
- The logic for taking and keeping track of StackRequests is moved to a separate Registry class, maintained by the robotics code - that way, we hide the implementation from the implementer.
This is a breaking change but nothing uses the API at the moment (is it even possible to?) so I don't care.
@asiekierka what do you think of https://github.com/hea3ven/BuildCraft/blob/fcce9cd6013ec63c4a3fc479b1931950b1c80c5c/api/buildcraft/api/robots/IRequestProvider.java as the api, having no continuity between two calls to getNeededItems() overcomplicates a lot the StackRequests registry implementation.
Is the amount of request slots expected to be constant or not? Either way, I like this API. Just document nuances like that, if you could.