Inactive [MECH] Backpack v2.2.0 (The Ultimate Inventory Expander!) [953]

Discussion in 'Inactive/Unsupported Plugins' started by Afforess, Feb 25, 2011.

  1. Offline

    Afforess

    Backpack
    Because One is never enough!
    Preface:
    Backpack is the ultimate salvation in inventory management. Your standard minecraft inventory has 36 slots in it, just enough to be handy, but terrible for long journeys or mining expeditions to the other side of the map. Backpack nonatuples your existing inventory space. (For those of you not familiar with latin, that's 9x the space).
    How is this massive inventory boost possible? The mouse wheel. (Thanks to Edward Hand for the idea!) Sneaking while Scrolling through each of the quickslots switches you to a new inventory page. This gives you freedom to scroll through NINE different pages. Scrolling without sneaking allows you to scroll through your inventory like normal.

    If you don't quite get it, I've made a short video demonstrating:
    FAQ:​
    Is there a way to change the number of pages? I only want certain users to have x amount of pages.
    Yes, see the next question down!
    Is there permission or group manager support!
    Nope! There is however a configuration file (aptly named "config.xml") that is created on the first run and allows you to customize the amount of extra inventory pages, and who gets to use them.
    Are your inventories saved between logins and server restarts?
    Yes. Backpack saves the inventories in the same file notch does, in the "player".dat file.
    Updating all those files must be slow/I heard that I/O operations are slow.
    They are. Backpack is multithreaded, so if you have more than 1 core, you won't notice any lag.
    This mod doesn't have anything to do with Minecarts, why the Minecart Mania dependency?
    Minecart Mania offers a useful interface for a lot of things I needed in writing Backpack, and 70% of the code is actually in MM. If you really hate Minecart Mania, you can just install core, and disable all of the features from it's configuration file.
    Dependencies:
    Commands:
    • /open <page number>
      • Opens a dialog with your current inventory, and the inventory from that page so you can easily swap items between pages. Quick slots are numbered 1-10, with 1 on the leftmost side.
    • /backpack
      • Toggles your backpack on or off.
    Permissions:
    (Permissions is optional, but will be used if installed)​
    • backpack.toggle
      • Allows the use of the /backpack command
    • backpack.open
      • Allows the use of the /open command
    • backpack.saveactionbar
      • Saves the action bar in-between pages
    • backpack.maxpages.# (where # is a number 1-9 [e.g backpack.maxpages.6])
      • The maximum pages allowed for the players
    Changelog:
    • Version 0.10
      • Initial Release!
    • Version 0.11
      • Swapped the role of sneaking around
    • Version 0.12
      • Player death is handled correctly
      • When your current inventory page is full, nearby items on the ground will be added to empty slots in other inventory pages.
    • Version 0.13
      • Added a first time login message. Only is triggered once for each player.
    • Version 0.14
      • Added customizable amount of inventory players, through XML.
    • Version 0.15-0.20
      • Bug Fixes
    • Version 0.21
      • Added /open command
    • Version 0.23
      • Reduced I/O operations from being continuous to once per minute
      • Fixed a bug which could cause player inventory pages to be lost if the server shut down in such a way that MM unloaded before the I/O operations finished.
    • Version 1.0
      • Fixed lag caused by I/O operations
      • Player Data now saves correctly, and will not become corrupt during server shutdowns
      • Improved Error Handling
      • Improved Console Log of Information for admins
    • Version 1.0a-1.0g
      • Bug fixes
    • Version 1.1
      • More robust inventory backups
      • /backpack command
    • Version 2.0
      • Supports MC 1.4
      • Action bar no longer switches with new inventory pages
      • Backpack saves with rest of inventory in player.dat file
      • Other plugins can access and correctly see a player's larger inventory w/o being Backpack Aware
    • Version 2.0.1
      • Backpack's work correctly after death
    • Version 2.0.2
      • Small Backpacks work correctly
    • Version 2.0.3
      • Players can choose to save the action bar or have separate action bars via the config
      • Bug fixes
    • Version 2.0.4
      • Improved Error Handling
    • Version 2.0.5
      • Fixed /open command crashing clients
    • Version 2.0.6
      • Fixed item duping on death
    • Version 2.0.7
      • Bug Fixes
    • Version 2.0.8
      • Permissions Support
      • Efficiency Changes
      • Bug Fixes
    • Version 2.0.9
      • Updated to MC 1.5
    • Version 2.1.0
      • Minor fixes/Cleanup
    • Version 2.2.0
      • New saving system
      • Lots of cleanup
      • Lots of bug fixes
     
  2. Very nice and original concept. I like it! However, maybe you should switch it around so that crouching and scrolling changes inventory pages, so you still have the standard method for utilising quickbar - less disruptive.
     
    Gilden00 likes this.
  3. Offline

    Soul Reaper

    agreed, this would be much more desirable
     
  4. Offline

    Afforess

    I can certainly swap it around.

    Updated to switch sneaking's role.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  5. Offline

    Typhus

    No backpack here is server error
    2011-02-26 02:18:51 [SEVERE] Could not pass event PLAYER_ITEM_HELD to Backpack
    java.lang.NoSuchMethodError: com.afforess.backpack.BackpackPlayer.getInventory()Lorg/bukkit/inventory/Inventory;
    at com.afforess.backpack.BackpackPlayerListener.onItemHeldChange(BackpackPlayerListener.java:25)
    at org.bukkit.plugin.java.JavaPluginLoader$15.execute(JavaPluginLoader.java:195)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:584)
    at net.minecraft.server.Packet16BlockItemSwitch.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  6. Offline

    Afforess

    Oh, I know why! I forgot to update Minecart Mania Core - which has some needed changes for Backpack to work. One moment.

    MMC is updated - try again now!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  7. Offline

    Juze

    Hahaha, this is awesome. Thanks again for yet another great plugin!
     
  8. The idea and implementation is awesome. Afforess, would this actually also get rid of the terrible inventory corruption bug, which makes the clients atm crash? Yesterday, we had a terrible evening on our server - 10 players experienced that when they went to a specific slot in their inventory, their client just simply crashed on them. They all had to take a refreshing swin in lava to purge their inventories and "clean themselves". :D
     
  9. Offline

    Nigel

    hey man great idear just wondering if you thought of making it so that the inventorys could be set be purchased/earned or payed for in some way, I mean i love the idear of not having to walk back to the bank so often but then I also like working for things that make the game easyer :). on a side note if you die do you lose 30 pages of stuffs as whih could also be an option to set in server.properties (just a few thoughts)
     
  10. Offline

    Juze

    Err, umm... I got the latest MMC and this plugin. CB#447.

    Code:
    08:21:39 [SEVERE] Could not pass event PLAYER_ITEM_HELD to Backpack
    java.lang.NoSuchMethodError: com.afforess.backpack.BackpackPlayer.getInventory()Lorg/bukkit/inventory/Inventory;
            at com.afforess.backpack.BackpackPlayerListener.onItemHeldChange(BackpackPlayerListener.java:25)
            at org.bukkit.plugin.java.JavaPluginLoader$15.execute(JavaPluginLoader.java:200)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:573)
            at net.minecraft.server.Packet16BlockItemSwitch.a(SourceFile:24)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:351)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:266)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    EDIT: Nevermind, I seemed to forgot to upload the MMC, but I thought I did.
     
  11. Offline

    shane3x

    A few questions:

    • What happens to the items if we remove the plugin/an update breaks it?
    • If we die, will all items including those in backpack drop?
    • If we pick up more items then a standard inventory will allow will the other items automatically go into the next spare backpack location or will we have to swap backpacks before being able to pick them up?
     
  12. Offline

    SliMeY_G

    Great idea! Time to start the long-haul mining & hiking :)
     
  13. Offline

    ThomasJ

    Love it :)
     
  14. Offline

    Afforess

    Probably will, because it resets all the slots each time you change a page.

    If you read the OP, permissions, and configuration for each player is planned.

    1.)Your inventory will be the one you logout on then. The other pages will not be acessable(but won't be lost, since it's all saved in files). I can't imagine the plugin breaking for more than a build or two, I plan on maintaining everything for the long haul, and the source is available.

    For instance, if a server update breaks this plugin for a day, everyone would lose access to their extra pages. Once this plugin updated, they'd get their extra pages WITH everything that was in them back.

    2.) Right now only the items in your open page will drop. I'll fix that next release.

    3.) Right now - you'd have to switch pages. But I'm planning 2 different features here. When you close a page, your inventory will get compressed (ie, if you have 4 stacks of 6 cobblestone, they get compressed into 1 stack of 24 cobblestone), and then items will attempt to go to other pages if yours is full.

    Thanks for the thoughts/ideas.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  15. Offline

    RustyDagger

    WOW You could nealy say that this is the first plugin to use a key binding thats Not in minecraft (for smp) I know its only combining 2 already existing keys but still Its very cool And i would love to have it on my server yet another reason why i need to get off my fat gaming backside and install MM. Im just worried about bogging down my server with plugins already i have like 10 and theres huge amounts of lag when you first join the server settles down after like 10 min of play annoying (i blame essentials but who knows)

    I may clean out essentials and replace it with 2 more simple narrow minded plugins and install this at the same time seems like a good idea to be but they are not known for being right lol.
     
  16. Offline

    Soul Reaper

    I'm wondering how this will function with DeathChest? Would be funny to see multiple chest dropped on death xD
     
  17. Offline

    Afforess

    The way I've got drops on death - deathchest and other plugins that affect loot should work fine. They will see the additional loot, and act accordingly.
     
  18. Offline

    Daveyo

    I fear noobs saying "my inventories gone ?!?!?". Is there a way to display that there inventory has switched to a new backpack, or even a text saying "switched inventory to backpack2 use shift <mousewheel> to change back" constant status of somekind would be ideal however
     
  19. Offline

    Soul Reaper

    that would be a nice feature, though also add in a feature to limit how often they pop out as players may miss announcements and other events when rapidly switching
     
  20. Offline

    Afforess

    Or maybe just announce it for the first time they login and the mod detects that they have no saved inventory pages yet. So only new users get alerted.

    Backpack 0.12 is up, with the changelog on the op! enjoy!
     
  21. Offline

    Juze

    Yup, you need to get permissions done soon too. Need to tip DeathChest author about this plugin so he can add support for "drop 4 large chests" :D
     
  22. Offline

    Afforess

    Added a First time login message for new users.

    Added configuration file for controlling how many extra pages users can get. (Note: Values over 9 get ignored). Enjoy!

    (XML FTW!)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  23. Offline

    MMZ_TimeLord

    Afforess,

    Love Minecart Mania! and have been using it since before the last MC Alpha builds.

    Backpack is a very cool add-on. I would however like to report a bug.

    When tearing up some cart track today, the pieces of cart track were getting multiplied quite quickly. I probably picked up 20 to 30 and now have over 480 pieces. It was stacking track over the 64 limit and at one point was adding 7 pieces for every one I was picking up.

    I'll do some more testing to see if this is the only item that is doing this.

    Keep up the good work!
     
  24. Offline

    Afforess

    Okay, thanks! I'm looking into it.
    Edit: Was a result of me not being careful with multithreading!

    Backpack v0.15 is up, fixed item duplication issues!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  25. Offline

    MMZ_TimeLord

    Yep, it is incorrectly stacking multiple items. I broke two dirt blocks with one button on each. I now have FIVE buttons. The dirt was stacked OVER 64 to 76 and only when I rearranged the stacks in the inventory did it correctly break it down to 64 count and leftovers.

    Hope that helps.

    Oops... didn't see that release... I'll give it a try. Thanks for the quick response!
     
  26. Offline

    Afforess

    Do I get an award for a < 60 second turnaround on a fix? ;)
     
  27. Offline

    MMZ_TimeLord

    Only if you can tell me why I can't log into my server now... even when I remove Backpack... :(

    I can only see part of the message in the client and the server log only shows "lost connection"

    "nse code: 503 for URL: http://www.minecraft.net/game/joinserver.jsp?user=MMZ_Time" (My user name to be sure)

    Edit: I also tried to launch MC without Craftbukkit... same error.
     
  28. Offline

    NoFear13

    Hi Afforess, first good work, but the fix didn't work for me. I'm try do mining, and if i get a item my stacks go over 64 and I get more than the items I mine.
     
  29. Offline

    MMZ_TimeLord

    At this point, it looks like I somehow corrupted my world data. I did close the java window without typing 'stop' in the console. I'll restore a previous backup and keep a copy of the broken world. (Sigh)
     
  30. Offline

    Afforess

    Okay, I see the issue too. I thought I had fixed it, but I guess not. Digging deeper.
     

Share This Page