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. Sweet fix, is it possible to add more items, and also choose how big the stacks should be (1-64) ?
     
  3. Offline

    DjDCH

    Yes. This will be possible with the configuration file.
     
  4. Offline

    Badzilla

    Is it possible to add the ability to stack mine carts?
     
  5. Offline

    DjDCH

    Yes. With the configuration file, you will able to decide which item you want to stack and how many item per stack they should have.
     
  6. Offline

    Badzilla

    Do you have an idea when the version with config file will be released?
     
  7. Offline

    Huene

    I'm definitely looking forward to this but the items you chose are exactly the opposite of the ones I'd use it for heh, I'm after stacking food but the rest to behave normally. As such I'm anxiously awaiting this one ^^
     
  8. Offline

    GGreenBass

    Definitely taking a liking to this one :3
     
  9. Offline

    flaaghara

    He said that a config file is coming out so you'll be able to choose any normally non-stckable items to be stacked.
     
  10. Offline

    Badzilla

    I also look forward to this. The ability to stack anything that is not currently stackable would be great as it would save inventory space.

    I posted a message asking when it might get done but did not see a reply. I was just curious if it would be a day or so or a week.

    I guess we will just have to wait and see.

    So much is changing and so fast. Notch released another update today which will most likely break some more stuff.
     
  11. Offline

    DjDCH

    I hope I will able to finish and release this tonight. :D
     
  12. Offline

    Badzilla

    Thank you for you effort to help the MineCraft project. I do much appreciate you help. I do program but not java or I would try to help out.

    I look forward to your new release and if it does not make it tonight, that is fine. You answered the basic question. It will be soon.

    Thank you.
     
  13. Offline

    DjDCH

    Version 0.2 released

    This new version work pretty well, with the brand new configuration file, but I'm not satisfied with the config file. It look overcharge for no reason, and it doesn't permit to choose the stack size. Also, the source is all mixed and not organize.

    So, there are big chance that the configuration file change, completely change, for something more flexible and more complete. Also, the code will be sorted, but this, you wont see it.

    Since I don't do this only for myself, what do you think about it ? [​IMG]
     
  14. Offline

    Zydox

    Well... I'd like better control of things, so a better config file for me would be something like:

    Code:
    Bread=64
    Sign=16
    Basically, I'd like to control every specific material... for myself I'm mostly interested in making bread stackable...

    I'd also love it if the config was read from a MySQL table instead of a flatfile, but I'd assume that just me :)
     
  15. Offline

    DjDCH

    The next version of the configuration file of Stackable, whatever the design that I will choose, will permit to control each item. And, I was also thinking to permit to make stackable item none-stackable. So, yes, you will able to do whatever you want to.

    If people asking for MySQL (or other SQL solution), MySQL it will be. :p
     
  16. Offline

    Aeron

    Maybe the part of the configuration file were you can define item stack sizes should look something like this:
    Code:
    1=64
    2=64
    3=64
    4=64
    ...
    
    ...
    354=64
    2256=64
    2257=64
    where if the item ID is not defined in this configuration file, it uses the default Minecraft values for stack sizes, for example, if 323 is not included in the configuration file, it doesn't stack, so this would be a very nifty and useful tool for server administrators to decide what stack sizes are items and so on.

    Question: Is there a possibility to increase the stack size (server side) above 64 limit, maybe up to 100 or 127 ?
     
  17. Offline

    feverdream

    I need to work less and bukkit more.. I was unaware that inventory hooks had progressed to this stage...
     
  18. Offline

    DjDCH

    As I say in my first post, the inventory hooks are not implemented yet. Until that events are implemented, you will need to use the /stackable (or /s if you enabled it) command.

    I tested it, and no, it's not possible.

    Version 0.3 released

    New version of Stackable, with the biggest improvement from the two other ones. The new configuration file has completely change, and is now compatible with the two examples below give by the users Zydox and Aeron. This new version is certainly more flexible and more stable.

    If any plugin developers or bukkit developers passed around here, I really need to know How to cancel the loading of a plugin?

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

    Seth.D

    Doesn't seem to work very well. Whenever I load up the plugin it always tells me this:



    Code:
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-egg undefined, skipp
    ing.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-foods undefined, ski
    pping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-lighter undefined, s
    kipping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-tools undefined, ski
    pping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-weapons undefined, s
    kipping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-amors undefined, ski
    pping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-buckets_full undefin
    ed, skipping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-sign undefined, skip
    ping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-buckets_empty undefi
    ned, skipping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-doors undefined, ski
    pping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-vehicles undefined,
    skipping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-snowball undefined,
    skipping.
    2011-01-19 23:08:41 [WARNING] Stackable: Material stackable-unreachables undefin
    ed, skipping.

    I've set everything in the configuration file to true (except for "Enable debug print in game").
     
  20. Offline

    DjDCH

    Thanks to have reporting the bug.


    Version 0.3.1 released

    Like mention in the first post, you need to update if you have downloaded the version 3.0. I have forgot to update the default configuration file which is deliver with the jar. Also, don't forget to delete the configuration file before the first run.
     
  21. Offline

    ThomasJ

    Thanks for this :)

    Will be testing it out shortly.
     
  22. Offline

    DjDCH

    After tested it, come here to give me some comments about it.

    I was thinking to re-implement item group, but in an other way. This should simplified configuration, if, by example, you want all tools to be stackable until 16 per stack.
     
  23. Offline

    Gimmic

    With build 107, can not seem to get food items stacking.
    Item grouping would be great.
     
  24. Offline

    smartaleq

    any progress on releasing source c0de? I could use some examples for inventory management plugin code. I'll watch the thread in case you do upload...
    Thanks,
     
  25. Offline

    x3no

    Any idea with which build best to use?
     
  26. Offline

    DjDCH

    Should work. I will check that.

    I hope that I will have time tonight to finish setting up my redmine.

    The last one should work, but I didn't test it.
     
  27. Offline

    earthiverse

    Is there an easy way to set all items to a number of my choosing? Or do I have to set them all separately?

    edit: Also, is there any possibility of getting different values for inventories/chests?

    I kind of want to make everything in inventory stackable in groups of 25 and everything in storage stackable in 250 (Can I even go over 64?)
     
    AS1LV3RN1NJA likes this.
  28. Offline

    DjDCH

    Version 0.4 released

    Items group are back, but in a nicer way. You may want to check the default config file to learn what have changed so far and how to use the items group if you already have a old version of Stackable.

    Also, the sources are now released with a complete Javadoc. [​IMG]

    So want are you thinking about this plugin now ?

    Take a look to the items groups ! For other items, you will need to set those separately.

    Not for the moment. This is a nice idea and I will check first if this is possible. And no, you can't go over 64.
     
  29. Offline

    x66dme66x

    sorry. ive never installed a plugin like this. its usually just a .jar. this one has like. a PLUGIN.yml a META-INF and com folder. how do i install it. newb question ;p
     
  30. Offline

    DjDCH

Share This Page