-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ISpecialInventory #257
Comments
+1 Although I've been told it could never work with RP for some reason that never made any sense to me. |
I'd like to see this as well. ISidedInventory is very limiting, especially compared to the liquid API. |
Why hasn't this been added? |
Because its hated passionately by some very vocal people. |
Who would that be? Eloraam? |
The current, general concept of the inserter getting to choose what it gets to put into my blocks/machines - without some significant hackery on my part - has me in favour of this interface. I'd like to hear the reasoning of these seemingly vocal people. "I hate it" doesn't hold much water, by itself. |
I'd like it if extractItem took a parameter that could filter the extracted items, something like this: public interface IStackFilter {boolean acceptsStack(ItemStack stack);} Still not seeing how you could hate it, though. |
I have an idea.. |
So did I, immibis@ab7f9be ICustomInventory is the equivalent of ISpecialInventory. (Edit: ILinearInventory can do more than IInventory and is less retarded - I'm not duplicating it for no reason, and InventoryAdapters has a method to create ILinearInventory wrappers for IInventory objects) |
Immibis, bear in mind isided is in vanilla in 1.5.. |
There was talk of creating a pluginable mediator object that could allow inventories to interact with each other, even if they use different interfaces. I think it was @ScottKillen who had the idea. |
@CovertJaguar My aged brain does not recall it, but I'll be happy to look into it. 😄 |
Ah, no it was xcomp. My bad. |
Also it would appear that Overmind has a solution. |
Yes, well there have been disagreements over his solutions in the past. |
@cpw, are you going to clue us in on your idea anytime soon, or should we just keep throwing our own ideas at the wall to see if one sticks? As I see it, the issue is basically a disagreement on what parts of the system should be "smart". Buildcraft provides an (essentially) dumb transport system and assumes that storage blocks can be smart, and so provides ISpecialInventory to allow them to define custom behaviour. RedPower, on the other hand, provides a smart transport system, and assumes that storage blocks are dumb containers, to be rifled through at will. Neither approach is good or bad, simply different architectural decisions. Looking at it in that light, including ISpecialInventory in its current state would be a Bad Idea, as it provides no suitable interface for RedPower-style transport architecture. As it stands, we have four possible pairings, three of which are solved adequately. ISidedInventory handles Dumb->Dumb and Smart->Dumb transport->storage pairings, while ISpecialInventory handles Dumb->Smart pairings. We need a way to handle Smart->Smart pairings, and might as well absorb ISpecialInventory's Dumb->Smart support in the process, to keep the clutter to a minimum. So, really, the question to ask is this: What API does @Eloraam need to be able to talk to a smart storage block? I could make some reasonable guesses, like the ability to ask how many it has of a particular item, or how many (more) of that item it can store. But, really, I think the right person to ask the question of is the lady herself, because (for reasons I hope are obvious) nobody else is better qualified to tell us what would work best for her. |
I am of the opinion that we do whatever we feel best because of 1.5. And then, Elo will probably fix her side when she updates for 1.5. |
I think we wait and see what 1.5.1 brings.. |
That statement is both interesting and worrying, cpw. :P |
Seems this never got stable enough for everyone to accept. Feel free to try again with actual code and documentation/implementation next time. |
Meh, its been stable for a year or something, people just don't like it. But its not really needed anymore anyway. |
The Blogpost is available here: https://neoforged.net/news/20.2registry-rework/ --------- Co-authored-by: Minecraftschurli <minecraftschurli@gmail.com> Co-authored-by: Dennis C <xfacthd@gmx.de> Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
I'm happy to see the BuildCraft liquid API being added to Forge. I'd really love to see ISpecialInventory make the transition as well.
ISpecialInventory is similar to ISidedInventory in that it provides an interface for inserting and removing items from specific sides of a block. Unlike ISidedInventory, however, it leaves the underlying details of how items are stored up to the implementing TileEntity. This has some major advantages:
Currently, using BuildCraft's ISpecialInventory adds flexibility and cleanliness to your code, but leaves you tied to BuildCraft and not able to interface with other item transport systems--like Redpower's tubes--without adding redundant and ugly code... sometimes exceptionally ugly. Moving it to Forge, where it could be easily shared by all item transport systems, would be a major gain for anyone making blocks that produce, consume, store, or convert items. (Isn't that most of us?)
The text was updated successfully, but these errors were encountered: