Discussion in 'Plugin Development' started by WarmakerT, Aug 14, 2012.
How can I make it take longer to break a block?
you could use a delayed task... or theres a much more natural looking way, but it requires a lot more code... use worldObj.spawnParticle(String particleName, double posX, double posY, double posZ, double, double, double); which can make the breaking particle effect, then break the block...
Not really sure how to do this though...
I know with Spout, you could change the base block to make it something harder, but afaik you can't do that in Bukkit.
It wouldn't give the smooth animation like you want, but you could run a scheduler and cancel the event a certain number of times. Make them mine it multiple times for it to actually break. Not sure if that's an acceptable compromise.
you could mod NMS...
I would assume since he's posting on the Bukkit Plugin Development forum, he wants to make a bukkit plugin, lol
Maybe set the person to adventure mode, run a scheduler and spawn the particles?
That works for bukkit...
One of my plugins edits the default NMS renderer, and the only referenced .jars are craftbukkit and bukkit.
Edits the renderer or uses the renderer in a different way? because that's totally different. I've used nms a handful of times, but editing it, would be a mod, not a plugin.
Uses the renderer in a different way, thats what I mean XD.
Would it be possible to change it for a specific block instead of block type?
I would think so. do something like
Block b = world.getBlockAt(x,y,z);
Then theres probably a way to set breaking time...
The adventure mode would work except it would be telling them that their switching modes, which is probably no good.
I think cancelling the event is your best bet. Keep a counter until they've tried to break the same block twice in a row, then don't cancel.
Separate names with a comma.