Inactive [MECH] Stackable 0.5.1 - Control the stackability of any item [766]

Discussion in 'Inactive/Unsupported Plugins' started by DjDCH, Jan 18, 2011.

  1. Offline

    DjDCH

    Hello everybody,

    Since I started this topic to request a plugin who make sign stackable, I decide to make this plugin it myself. So, this is it!

    Stackable - Version 0.5.1

    This plugin provide you the ability to choose the stack size of any item in the game. You have the possibility to increase a stack size, reduce it or even disable it. Also, set a stack size to zero removed completely any stack of this item from the inventory.

    How to install:
    The only thing you need to do is download the zip containing the jar and unzip it in the plugins directory.

    How to configure:
    If you want to configure this plugin, edit the stackable.properties inside the directory Stackable, which is inside the plugins directory. You may want to remove or add item. Just use the enum name (from the class Material of Bukkit) or the item ID for the property name and the stack size for the property value. Any undefined item in the configuration file will use its default stack size value. For the items group, they are all listed in the default config file. You may want to remove it or edit the stack size value of any items group. Notice that define a item stack size who is contains in a items group will overwrite the value of the items group.

    How to use:
    While the proper events that I need are not implemented yet, you will need to use the command /stackable (or the aliases /s or /stack) to rebuild your item stacks (automatically rebuild inside your inventory) or the rebuild the chest content that you are aiming at. If your inventory or the chest become filled at any moment during the process, all supplementary item will be dropped in front of you/chest.

    Stack Protection feature:
    DeNarr make me notice that stacked item can be lost when using it. This is applying to item that is normally unstackable. In fact, these items weren't design to be used when stacked. So, I have come with this idea, to make something to protect stacks from being lost. This feature will split any stack of tools, weapons, buckets and soup when they are used. Notice that buckets will always be drop since a minecraft bug prevent me from adding the splited stack to the inventory. Notice also that the Stack Protection will not always working for tools and weapons when damaging a entity.

    Pickup event rebuilded:
    With this new update, the pickup event is now properly handled. When you will pickup an item, it will be added to any existent stack while respecting the stack size values from the config file.

    Todo:
    * Todo, etc. on my redmine
    * Add a configuration file
    * Re-organize configuration file
    * Re-organize source code
    * Implement all event hooks
    * Improve server log
    * Add sources and Javadoc
    * Add items group
    * Add Stack Protection feature

    Default configuration file:
    Code:
    # Enable debug print in game
    enable-debug-print=false
    
    # Tools items group. (Shovels, Pickaxes, Axes, Hoes and Fishing Rod)
    @tools=1
    
    # Weapons items group. (Swords and Bow)
    @weapons=1
    
    # Armors items group. (Helmets, Chestplates, Leggings and Boots)
    @armors=64
    
    # Foods items group. (Apple, Mushroom Soup, Bread, Raw Porkchop, Cooked Porkchop, Golden Apple, Raw Fish, Cooked Fish and Cake)
    @foods=32
    
    # Vehicles items group. (Boat and Minecarts)
    @vehicles=32
    
    # Sign
    sign=64
    
    # Wooden Door and Iron Door
    wood_door=64
    iron_door=64
    
    # Wool
    wool=32
    
    # Empty bucket
    bucket=16
    
    # Storage Minecart and Powered Minecart
    storage_minecart=16
    powered_minecart=16
    

    Changelog:
    See changelog (open)
    Code:
    Stackable - Version 0.5.1
    ----------------------------
        * Build with Bukkit #681
        * Tested with CraftBukkit #766
        
        Minor features changes
        -----------------------
        * Armors is now the stacks group for armor-like items and will replace amors stacks group
        * Amors stacks group now is deprecated and will be remove permantly in the next version
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Double chest are not supported
        * When using a bucket on a triggerable block, both event are execute
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.5
    ----------------------------
        * Build with Bukkit #652
        * Tested with CraftBukkit #670
        
        Major features changes
        -----------------------
        * Pickup event rebuilded
        * Chest inventory can be rebuilded by aiming it when using the /stackable command
        
        Minor features changes
        -----------------------
        * Add aliases /s and /stack for /stackable
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Double chest are not supported
        * When using a bucket on a triggerable block, both event are execute
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.4.6
    ----------------------------
        * Build with Bukkit #417
        * Tested with CraftBukkit #455
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.4.5
    ----------------------------
        * Build with Bukkit #412
        * Tested with CraftBukkit #432
        
        Bug fixes/development issues
        -----------------------------
        * A lot of fix code for the new Bukkit version
        
        Know bug
        ---------
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
    
    Stackable - Version 0.4.4
    ----------------------------
        * Build with Bukkit #144
        * Tested with CraftBukkit #323
        
        Major features changes
        -----------------------
        * Added Stack Protection feature
        
        Minor features changes
        -----------------------
        * Switch to new onCommand method
        * Property enable-short-command is now unused
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
        
        Know bug
        ---------
        * Mushroom Soup: http://getsatisfaction.com/mojang/topics/no_bowl_from_mushroom_soup
        * Stack protection is sometime buggin
    
    Stackable - Version 0.4.3
    ----------------------------
        * Build with Bukkit #102
        * Tested with CraftBukkit #210
        
        Bug fixes/development issues
        -----------------------------
        * Fix code for the new Bukkit version
    
    Stackable - Version 0.4.2
    ----------------------------
        * Build with Bukkit #82
        * Tested with CraftBukkit #161
        
        Minor features changes
        -----------------------
        * Code design improved
        
        Bug fixes/development issues
        -----------------------------
        * Forgot to add bow to the weapon items group
    
    Stackable - Version 0.4.1
    ----------------------------
        * Build with Bukkit #71
        * Tested with CraftBukkit #135
        
        Bug fixes/development issues
        -----------------------------
        * Properly disable the plugin when initialization error occurred
        * Forgot to add fish to the food items group
    
    Stackable - Version 0.4
    ----------------------------
        * Build with Bukkit #68
        * Tested with CraftBukkit #128
        
        Major features changes
        -----------------------
        * Add five general items group
        * Sources now available.
        
        Minor features changes
        -----------------------
        * Default configuration file update
        * Javadoc added to all source files
        
        Bug fixes/development issues
        -----------------------------
        * Made damaged tools unestackable to avoid auto repared tools
        * MaterialData is now keep for Wools and Dyes
    
    Stackable - Version 0.3.1
    ----------------------------
        * Build with Bukkit #57
        * Tested with CraftBukkit #89
        
        Bug fixes/development issues
        -----------------------------
        * Forgot to update the default configuration file
    
    Stackable - Version 0.3
    ----------------------------
        * Build with Bukkit #57
        * Tested with CraftBukkit #89
        
        Major features changes
        -----------------------
        * Configuration file completely redesigned
        * Possibility to choose the stack size
        * Possibility to limit the stackability of already stackable item
        * Item groups removed
        
        Minor features changes
        -----------------------
        * Server log improved
        * Code design improved
        
        Bug fixes/development issues
        -----------------------------
        * Stability improved
    
    Stackable - Version 0.2
    ----------------------------
        * Build with Bukkit #56
        * Tested with CraftBukkit #86
        
        Major features changes
        -----------------------
        * Added configuration file 
        * Added groups of item stack
        
        Minor features changes
        -----------------------
        * Server log improved
    
    Stackable - Version 0.1
    ----------------------------
        * First release
        * Build with Bukkit #56
        * Tested with CraftBukkit #80
        
        Major features changes
        -----------------------
        * Added /stackable command
        * Sign, Wooden door and Iron door are now stackable

    Download Stackable Version 0.5.1 (zip)
    Download Stackable sources version 0.5.1
    Thanks to you for supporting my plugin ! ;P
     
    wassilij, Jef Elrod, harakiwi and 2 others like this.
  2. Hi i've got two questions or problems:

    #1 /stack is working how? because it stacked my inventory and some inside of my chest .. that's a performance problem if often used

    #2 i found an exploit, if you move a maximum stack of .. for example .. 3 over another stack of 3 you got a stack of 1 and 5, again with another 3 stack you got 1 and 7 and so on ..
     
  3. Offline

    ShadowDrakken

    with a double chest, it only stacks half the chest at a time... I know other plugins are able to handle double chests as one big chest, not sure exactly what method they use, but would be a nice update for this plugin when you have time... definitely a non-critical issue though :)
     
  4. Offline

    NateBody

    thats bad!!
     
  5. Offline

    jorisk322

    please update this plugin
     
  6. Offline

    Bjourk

    Can we expect an update?
    If not, will someone fork this or link to something similar?
    Thanks!
     
  7. Offline

    DjDCH

    Yes there will be an update soon.
     
    Kartus likes this.
  8. Offline

    jorisk322

    Thanks for that!
     
  9. Offline

    Celtic Minstrel

    The Backpack plugin changes the player's inventory to be much larger than 36. Perhaps the people getting this error are running that plugin?

    Or install my SoupBowl plugin, which fixes that.

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

    Lead2Life

    Ok, I got my problem very silly btw^^ my problem was the failure that stackable needs an inventory size of 36, which is expanded through another plugin "Backpack". So my inventory size isn't 36 anymore and I cannot auto-stack any items. Maybe you take a look on this?
     
  11. Offline

    Celtic Minstrel

    Actually, I'm pretty sure it's a Bukkit problem, so I don't think there's much he can do.

    EDIT: On second thoughts, I think the problem is with Backpack.
     
  12. Offline

    Nuinbot

    Looking forward to this plugin being updated! It is an asset to inventories everywhere. Keep up the good work!
     
  13. Offline

    Oysi93

    As awesome as this plugin sounds, it does not appear to work. It says the plugin is enabled when I start the server, and that everything's fine. However when I try to stack something (that won't normally stack), it just won't stack. For example the bread. I set the food thing to 16, however the bread won't stack at all. I tried numerous other things as well, none would stack. Is there something wrong with the most recent update, or am I doing something wrong?
     
  14. Offline

    ShadowDrakken

    it stacks things automatically as you pick them up

    you can force a restack by using /s or /stack while pointing at non-containers. You can force stack a container by typing the same command while the cursor is on them.
     
  15. Offline

    DjDCH

    Ok, that explain why this error is triggered. Anyway, I have already re-write this part the the plugin, so this error is not supposed to happen anymore.

    I will look into this to ensure that the Stack Protection feature does not badly interact with it.

    I was working on the update last week-end, but I was not finished. I want to re-write completely the rebuildStacks function, but if I have no time to do it, I will at least ensure to release a bug fix for the current version of Bukkit.
     
  16. Offline

    Celtic Minstrel

    I only handle the right-click event; the most it could do is increase a stack of bowls past whatever has been set as the maximum.
     
  17. Offline

    Icemelt

    Hi, love your addon. Actually, I would love your addon, we've not gotten to use it yet sadly. You see, not that you care really, but we have this little "apple" issue (lol) on our adventure server. We understand that you're working on it and all, but I just wanted to let you know we patiently anxiously await your promised update. If, however, you start making a repeated promise of [cake] .. we may be forced to subvert your propaganda via the use of one amber and one blue portal accordingly.


    .... you have been warned.
     
  18. Offline

    ShadowDrakken

    what apple issue? I use this with ChocolateFever and have yet to have any issues...
     
  19. Offline

    Plague

    CB 670 - inactive
     
  20. Offline

    DjDCH

    Version 0.5.1 released

    Quick bug fix to make Stackable work with the current version of bukkit. Amors stacks group now is deprecated, use Armors instead. No new feature.

    EDIT: Now compatible with CraftBukkitUpToDate.
     
  21. Offline

    Icemelt

    Not having this mod was causing apples to be a bit of an annoyance. Just goes to show people on forums are too darn serious.


    I am, however, getting a [WARNING] Stackable: Material foods undefined, skipping. .. if anyone knows what I've changed to cause this. I think I just messed up the config file, not sure.
     
  22. Offline

    DjDCH

    You have removed the "@" before "foods" in your config file. So, it should be like "@foods=88".
     
    Icemelt likes this.
  23. Offline

    iloveportalz0r

    Not any more :D
     
  24. Offline

    Leemur

    the bug with buckets sometimes appears.
     
  25. Offline

    Nazerb

    Can you stack above 64?
     
  26. Offline

    ShadowDrakken

    no, Minecraft itself doesn't support it
     
  27. Offline

    RobotGymnast

  28. Offline

    DjDCH

  29. Offline

    kaasinees

    works with 798/803?
     
  30. Offline

    Shaduy

    works with 803!
     
  31. Offline

    kaasinees

    I tried it, and i cant stack my cooked pork chop. i set @food=16
     

Share This Page