ItemStacker
ItemStacker
Stacks items when they drop.
For example, if you are mining, the items will bunch into a single stack rather than spreading out all over the place.
This makes it easier to pick items up. This could have performance benefits as well because there won't be as many items all over the place.
Beta
This plugin is currently in a beta state meaning there could be bugs and more development may be done before it's deemed polished and complete.
I run this on my server and there has been no reported bugs yet but that doesn't mean there aren't any. If you find a bug or have any requests please let me know by commenting below or creating a ticket.
config.yml
The config.yml file should be automatically generated for you the first time you start your server with the plugin in your plugins folder.
radius: 4
The block radius to check for items to stack.
There are no commands or permissions to configure.
@th3controller
Thanks, I will make it do that if I ever get around to updating this again.
You should use a double for radius.
@coolo1
True, but does vanilla allow you to adjust the radius? That's one reason I haven't updated. However I also haven't updated this because I have been using Spigot which has it built in. But some day I plan to update it because I feel this can still be useful.
Not needed in recent versions of Minecraft, already included in Vanilla.
@playironshovel
I haven't tested this plugin even in 1.4.5. It may not work properly. Especially with items with names from the anvil or dyed leather and things like that.
My server really appreciates your code. Lag is a monster for everyone and thanks to you we've made a few steps toward the perfect lag-free configuration. :)
@TheChinski
Well, I gave it a shot. Been trying to make it work properly for awhile but unfortunately it's a little glitchy and I am not entirely sure why. I will come back to it at a later time.
@TheChinski
I'm not so sure that would be a good idea for performance reasons but it would be possible. I guess I could make a config option for it and do some testing. Maybe if it tracked an item for a bit after it spawned to see if it's location was changing.
This would also be useful if you are breaking items from a height and they are dropping down on the ground. I'm not sure which would be better on performance so I might have to do some tests.
I can probably also do some minor performance tweaks and make xp orbs stack as well.
I've noticed the items don't merge when in water. I've had a quick look at your code (just because i'm trying to learn Java :P) and you're doing the whole item stacking thing on the ItemSpawnEvent. As the cactus farms spawn cacti all over the place, they are nowhere near each other until they all gather at the end of the water trail :/
I'm new so I dont really no much, but is there a way to check when a drop stops moving? Or maybe do a check every 5 seconds or something for nearby drops and merge them then? :)
@TheChinski
Hmm, you're right some things don't stack properly. I will look into it.
Heya,
Love your plugin! One request though. It only seems to stack items when thrown on the floor by a player. Being as my players have so many cactus farms, the items don't seem to stack when they pop of a cactus etc. Could we make it so the items stack even when not thrown manually on the floor? Otherwise, great plugin! :-)
Thanks,
@Luzitano
Thank you, glad you like it :)
This plugins was and will ever be the number 1 on my server :) Great job ;)
@DAKherrTD
Ok, I recompiled and tested on java 1.6 this time. Worked for me. Needs approval from staff still but here is the link: http://dev.bukkit.org/server-mods/itemstacker/files/3-item-stacker-v1-03/
http://pastebin.com/DU0cViYH
Here's the SEVERE error it gives me, found out why it's not generating a config. It's crashing. >.>'
I'm using CB 1.3.2-R0.1. Java is 1.6.0_24. I know I have read/write permissions because every other plugin generated their own folders/files in the plugins folder, and I can use Vi to edit configs and permissions just fine. I took itemstacker off the server since it wasn't loading it. The server.log file is 24 MB, and if needed I will try to load itemstacker again.
@DAKherrTD
Sorry, I can't reproduce this problem. What version of CraftBukkit and Java are you using? The config.yml file should be at plugins/ItemStacker/config.yml upon server startup. Make sure the user you are running CraftBukkit with has read and write access to the plugins folder. If you're still having problems please link a pastebin of your server.log startup.
It's not generating a config file in a folder for it. It's almost like the plugin isn't loading at all.
@ryvix
sounds fantastic would be great if it works :D
also i will update my craftbukkit, may this will help
@dela09
I may have accidentally uploaded the Java 7 version since that is what I use. I will recompile with the latest Bukkit RB anyway and upload a 1.6 version.