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. Offline

    YoShiiro

    oh oki i've not see everthing thanks a lot for the answer dj thanks for stackable ;) ;) and continue like this.
     
  3. Offline

    kovarex

    Hello I'm using the latest stackable version 0.4.5 and latest craftbukkit version(452), and this is what I get at the startup.
    Code:
    2011-02-26 14:43:27 [INFO] Preparing start region
    2011-02-26 14:43:28 [SEVERE] Could not load plugins\Stackable.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:80)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.djdch.bukkit.stackable.Stackable.<init>()
        at java.lang.Class.getConstructor0(Unknown Source)
        at java.lang.Class.getConstructor(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:75)
        ... 8 more
    
     
  4. Offline

    DjDCH

    Version 0.4.6 released

    This release fix some problems that appear with all the recent modification that was made to the bukkit code. Now, Stackable work with the build 455, but also with the latest recommended build.
     
  5. Offline

    Viktor

    i have
    golden_apple=64
    but it doesn't stack why is this? Got the same problem with weapons and armor
     
  6. Offline

    DjDCH

    I don't have this problem. Can you tell me what version of Stackable and Craftbukkit do you run ? Also, can you give me the complete config file that you ware using.
     
  7. Offline

    Viktor

    will do as soon as I get home ;)
    --- merged: Feb 28, 2011 3:44 PM ---
    This is the config file. I am also using latest version of both this mod and bukkit.
    Code:
    # Enable debug print in game
    enable-debug-print=true
    
    64, 58, 32, 25, 26, 47, 54, 55, 61, 62, 63, 65, 66, 68, 69, 79, 71, 72, 77, 93, 94, 256, 257, 258, 259, 260 , 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 2256, 2257=64
    
     
  8. Offline

    Rainforce15

    I tried to install it, bukkit #440 and latest version of this plugin, but only already created stacks (>1) stack to >64 when drag/dropped, and part in stacks of 64.
    default config, just changed the food line to 64.
     
  9. Offline

    DjDCH

    When I have said that you can use a coma separated list ? It's sure that isn't working. It's one item per line, per equal whatever you want. Just to be sure, it will look like this:
    Code:
    # Enable debug print in game
    enable-debug-print=true
    
    64=64
    58=64
    32=64
    25=64
    ...
    

    Are you using the /stackable or /s command ? Also, read this:
     
  10. Offline

    ssechaud

    Having problems stacking food items with build 478 and version 0.4.6 of this.
     
  11. Offline

    amplifier

    Very useful Plugin, thx for that :3

    Suggestion:
    make the short command customizable, it "stacks" with the /tphere, /s command from Essentials
     
  12. Offline

    Rainforce15

    yeah, it works now. dont know what stopped it before. GOOD WORK! , well...even more so if you get the inventory hooks right XDDD
     
  13. Offline

    DjDCH

    I don't see any problem with this craftbukkit build. Can you give me more detail please ?

    Thanks. For your suggestion, I can't currently add dynamically aliases, but it would be nice to have more aliases. I will add /stack in the next version. ;)
     
  14. Offline

    ssechaud

    I have a chest with apples and I can't stack them with the mouse although I have this plugin and set the stack for food to 64.

    PS. I also use InventorySort and it used to stack up stuff, so it might be that causing the problem.
     
  15. Offline

    DjDCH

    Also, are you trying to stack something directly with your chest ?
     
  16. Offline

    ssechaud

    Using build 447 with Stackable and InventorySory, looking at a chest and using the /sortchest command would sort items and stack them. Using the latest build this no longer works. I will post in the InventorySort thread too. Using the /stackable command works on my inventory.

    Tested build 447, Stackable v0.4.5 and InventorySort v1.4 and stacking works on food items in chest using /sortchest. Using Stackable v0.4.6 and InventorySort v1.5 breaks this.
     
  17. Offline

    amplifier

    Is there already anything known about the Events you need to make this work without a command?
    An ETA when they will be implemented or something like that?
     
  18. Offline

    DjDCH

    I know that currently the onPlayerPickupItem is done, but all the inventory event are not done. And they are planned to be post-release features. Also, I don't know about chest event hooks.
     
  19. Offline

    Celtic Minstrel

    You missed an R here; it should be "Armor". And it doesn't really pluralize like that.

    Perhaps /stk would suffice.



    Now, I have a question... the opening post doesn't make it clear, but if you (for example) set the max stack size of apples to 64, can you place one apple on top of another and get a stack? Or can you only get stacks by using the command?
     
  20. Offline

    DjDCH

    Thanks to tell me. You are the first one to notice this mistake. I will correct it ... one day.

    Interesting. I will add this one.

    This question has been asked a lot of time, and answered, but I didn't update the first post. So, for the moment, you can only use the command to stack item. When the event hooks will be implemented, the command will be removed.
     
  21. Offline

    Zarius

    Howdy - great plugin, look forward to when you can hook into the events. Doesn't do what I wanted as yet (probably because of the lack of event hooks) which is to cook a stack of pork at once (and come back later to pick up a stack of cooked pork) rather than having to cook each individual pork chop.
     
  22. Offline

    NEO

    Just wondering if you had any plans on including permissions support?
     
  23. Offline

    NotoriousPyro

    Seems like this has a lot of bugs, like the following:
    * Moving a damaged item over a stack or vice-versa cause the stack to inherit the damage causing the affected items to behave strangely, such as respawning with the same damage before they were destroyed.
    * Boats do not always appear when placed and shortly afterwards they re-appear in the inventory, only to have you try and place it again to have it disappear again.

    Also, no hooks to events is pretty annoying - I hate having to type /s all the time, would be nice to just be able to stack.
     
  24. Offline

    Joeyy

    Typing /s will output an error message ingame, however /stackable works o,o.
    Idk what is causing this?
     
  25. Offline

    Celtic Minstrel

    What's the error message? It might be that some other plugin is also using /s.
     
  26. Offline

    DjDCH

    Nice idea. I will look into this to see if it's easily possible. I will surely add this one.

    I have not think about this. But yes, if you want, I will. As soon bukkit release the permission hooks, I will try to make stackable in group/user-based settings.

    For the boats, I will look if I can find why it doing this. About the hooks, read this:

    As Celtic Minstrel said, please copy and paste the error. And yes, that might come from an other plugin.
     
  27. Offline

    Joeyy

    Yea i think so,
    Its some kind of teleport command now..
    Pretty weird o,o.
     
  28. Offline

    RUtaq

    I have a couple questions about this MOD.

    Could I overide the stackability of ALL items and limit them to just 1 item and not stacks ?

    Do the Stackability changes restrict the stacking of items when producing them using a workbench or smelter ?


    Thanks for the info.
     
  29. Offline

    Celtic Minstrel

    Both Essentials and General define /s as a shortcut for /summon, so... that's probably your conflict.
     
  30. Offline

    DjDCH

    For your first question, yes and no. Yes it's possible, but no, because it's actually glitch-able. When the plugin will be entirely finish, yes it will. For your second question, for the moment, the plugin is limited to the inventory. But in the future, I will try to extended it to chest, workbench and furnace.
     
  31. Offline

    NotoriousPyro

    Thanks for the update. Seems like this mod is very unstable without hooks, but I can't wait to see the future versions with less bugs :)
     

Share This Page