CartDispense
CartDispense - Dispense Carts On Rails Automatically
Version: v0.10
Description
Dont you just hate it when you find a train track that you want to ride and you dont have any minecarts to ride it. You could build one from iron or you could spawn one if you are an admin. Not anymore! With this plugin there is no need for making or spawning minecarts, simply press the button and a minecart will be spawned on the track automatically!
Updated to work with powered-rails and detector-rails!
Video
Features
- Click the stone button beside the dispenser and a minecart is automatically placed on the track.
- Works with standard rails, powered rails, and detector rails.
- Works in any orientation but there must be a track infront of the dispenser and a minecart inside the dispenser.
- Works with rails bellow the dispenser.
- Placing another dispenser on the other end of the track will automatically remove the minecart and place the user out of the cart.
Download
Changelog
v0.10 - 26/07/2011
- Updated for 1337, plugin now works with any world.
v0.8 - 26/07/2011
- Added @N4th4 changes for the CB 1000 update. Plugin should be working fine now.
v0.7 - 19/06/2011
- Added support for using powered minecarts and storage minecarts in dispensers.
v0.6 - 03/06/2011
- Fixed bug where minecart would throw errors if the world was not named world. Fixed now, you (should) be able to use any world name now.
v0.5 - 01/06/2011
- Added support for the removal of minecart on collision with another dispenser.
v0.4 - 31/05/2011
- Added support for spawning minecarts on a tracks below the dispenser(can add it for above too if you want)
v0.3 - 31/05/2011
- Fixed error with minecarts spawning even if there was no cart around
v0.2 - 30/05/2011
- Updated to work with detector-rails and powered-rails
- Removed pointless debug message
v0.1 - 29/05/2011
- Initial Release
Hallo,
at craftbukkit 1.4.6 the CartDispens still not working any more.
Hope you have time to update.
the script make the Dispenser with powerrail to CartDispens, but by activate the Dispenser let only smoke and inside the dispenser the script duplicate the cart.
greets Deep
wish they added the removal at end of track part
Added to minecraft in 1.3.1
This would only lag if you used the infinite setting.
1.3 will still require a plugin to enable the sucking in of carts, as well as the optional infinite feature. CoderJ also had a decent idea about recalling carts to the origin dispenser so carts don't get constantly redistributed to the edges of the world.
As this plugin might not be needed in the future I suggest to make a new plugin that slightly bases on this. As mayhem777 said, this could cause major grief so how about making a plugin setting a delay on the dispensers (when it comes in 1.3)?
Maybe make it possible to adjust how long the delay should be for certain ranks? So you can for example set the config to let dispensers send out carts every 2 sec and stop grief spam of carts?
Also I suspect the 1.3 dispensers to not have infinite carts, unlike this plugin. So I don't think this plugin is dead just yet ;) (I hope)
Grieffers + this plugin = server crash
Thanks for all the hard work guys, this plugin will no longer be required as it will be a native function like RealityIntern has said. So cool!
Wish I would have gotten some credit
BTW, it sounds like part of this plugin will be in vanilla Minecraft 1.3. Minecarts will be spawned from dispensers.
Since no one is posting the link to a jar, I figured I could post the fork CoderJ sent to me. I looked through the code and it seems to the exact same version that's in github, except it's named wrongly. (cartdispenser instead of cartdispense; wrong author) It's been working perfectly on my server for weeks now.
Link Removed: http://www.mediafire.com/?kt8b1tyn71ct715
I'm not sure what the policy is on this, so I hope I'm not stepping on any toes.
@stargateanubis14
I wouldn't say that, I can see that vcazan merged in the pull request from coderjcronin 3 days ago.
To the best of my knowledge, this should still work on the 1.2.x RB's (its worth trying it out on a test server) now that its been tidied up a bit, I just can't see any .jar made available for what it now the current master version in the github repo.
So i take it this is dead :/ I was reaaaaaly hoping this hadn't died off :(
@RealityIntern
Yeah, sorry about that. I didn't do a proper fork for the test version (it was me.coderj.cartdispenser; didn't even have it on github).
After the fork I maintained vcazan's package and class naming. Sorry about that.
[EDIT] Nevermind. It's not in the pull request, just the test version.
I just noticed something with your version, coderj, it's named CartDispenser, not CartDispense. It works great, though.Submitted the pull request with the directional bug fixed, along with the code cleanup I detailed earlier.
I'm going to work on tracking spawned entities next; return carts that have been spawned from the dispenser after x amount of time (user configurable). Should help alleviate carts being abandoned all over the place (from what I understand, they continue to throw VehicleMoveEvent even when appearing to be idle on a track... will play with it and find out).
@coderjcronin
So make any new features configurable/toggleable by config, and have the plugin default to its original action and send a pull request :) Thats effectively what I did, so out of the box the plugin still does what the original release did, meaning that people didn't have to make any effort to get the originally described function.
Okay, updated the code based on the suggestions from RealityIntern; plugin now properly checks dispenser facing and checks 1 block in that direction for a track as well as one block below that for a track. I also cleaned up some legacy stuff in the CartBlockListener class (it was using CraftMinecart instead of Minecart, etc) and fixed up the CartDispense class some. I also went to town commenting CartBlockListener and will probably continue to do so with CartCartListener (to promote others working on the code).
Not sure if I should put in a pull request for these changes (plugin works as intended, or at least assuming it's intended by the original author's description).
-EDIT- If it's okay, I'll probably work on this some more; add iConomy/Vault support (either for 'renting' the cart in which case the cost would be returned (to promote returning carts instead of leaving them on the track) or as a ticket price).
It seems to be working well and consistently. Though, if I could make one more suggestion, it should check the direction of the dispenser and check in front of it first (and probably only). Currently, if there are multiple rails around the cart, it'll choose old north first, even if the dispenser is pointed in another direction.
@fyrenth
Fantastic! I'll get to trying this out and let you know how it goes. Thanks to both you and vcazan.
@RealityIntern
Actually, conditionally execute the remove rather than remove the remove :) Sorry it took a day or two to get it done, but I was distracted by design for a diff project.
Anyway, done it. With infinitecarts to false, if colliding dispenser is full it will not remove the cart and the cart will bounce off it as if its a normal block.
Pull request submitted, and I've uploaded a jar based on my fork code
Ya, just remove: cart.remove();