Item storage refactoring
#1
It's about time we had yet another refactoring Smile

It seems that there are places in MineCraft where an item storage of a kind is used more and more. First the player inventory and chests, then minecarts-with-chests, then dispensers and droppers, hoppers etc. All of these use some form of item storage in a XY grid.

Therefore it would be beneficial if all these shared the same interface to that item storage management.

What I'm proposing is making the cInventory class more generic - add variable width and height, and make all those objects use this storage model. Then all the handling functions will be shared among all of the objects, making interaction and scripting easier.
Reply
Thanks given by:


Messages In This Thread
Item storage refactoring - by xoft - 03-26-2013, 07:01 AM
RE: Item storage refactoring - by keyboard - 03-26-2013, 10:31 AM
RE: Item storage refactoring - by xoft - 03-26-2013, 05:35 PM
RE: Item storage refactoring - by xoft - 04-11-2013, 05:53 AM



Users browsing this thread: 2 Guest(s)