RegenBlock
Part of the Minds of Chimera Project (dev)
CodeBlocks | MOCPlaytimeTracker | MOCDBLib | RegenBlock | MOCGoodEats | MOC3DImporter | ImageImport | MOCKiosk | MOCRater | MOCFizziks | GravitySheep | MOCChemistry | MOCRegistry
RegenBlock allows a creation of regions within Minecraft worlds that have a certain re-spawn timer assigned to them. Once a block in the region is destroyed by a player or a new block is placed it will regenerate to the old state after the timer is up.
Example uses
Regeneration of natural resources in certain areas, resetting of region to an earlier state - in a tutorial area on my server, there is a broken bridge that has to be repaired by the player, but after the player does so the bridge would normally remain fixed for the next player that does the tutorial, with RegenBlock I am able to "regenerate" old broken bridge. Can be possibly used as anti-griefing to some degree, but it will only check events associated with played placing or destroying blocks, not tnt, lava fire etc.
Permissions
regenblock.self - all or nothing permission for the use of any commands
Commands
(all at op level)
- Selection
- /rb select (ex,ey,ez) - Starts/stops player's selection mode. ex/ey/ez will expand selection in that direction. Y is vertical.
- /rb listselection - Lists player's current selection points.
- Editor
- /rb edit - Puts you into editor mode that allows you to change blocks in a region without triggering the re-spawn.
- Info
- /rb info - Print out information about the region in front of the character
- /rb list - lists all regions
- Global Blacklist
- /rb blacklist add/remove (id id id ...) - adds/removes supplied block IDs. Blacklisted blocks will be ignored by the plugin and not regenerated.
- Reload
- /rb reload - Reloads the configuration file. Use this if you updated regions through config.yml and have to reload it.
- Region management
- /rb create (name) [re-spawn time] - Creates a region based on your selection from /rb select
- /rb remove (name) - removes region from the list
- /rb type [typeId] - sets region type, 0 for normal, 1 for mine. Mine will regenerate only upwards and with random blocks that you specify with /rb spawnblock
- /rb sync [0/1/2/3] - sets region to regenerate all at once or not, 0 - normal operation, 1 - all blocks re-spawn at once based on first block broken, 2 - same as 1, but based on last block broken, 3 - blocks re-spawn in normal order, but shifted in time based on last block broken.
- /rb modify (name) [re-spawn time] - modify existing region
- /rb modify time (name) (re-spawn time) - modify existing region's re-spawn time
- /rb alarm time/message/radius (name) (value)- changes the region's alarm settings. Alarm will go off before blocks are due for re-pop to warn players.
- /rb rblacklist (name) add/remove (id id id ...) - adds/removes supplied block IDs for region. Blacklist blocks for a specific region.
- /rb feedback (name) (type) - sets feedback type for the region. 0 - none, 1 - on place, 2 - on place/remove
- /rb feedback set (string) - sets string sent to player during region feedback. Use TIME to show re-spawn time.
- /rb spawnblock (name) - lists region's spawn blocks.
- /rb spawnblock add (name) [id chance id chance...] - adds new blocks with spawn chance. Chances do not need to add up to 100.
- /rb spawnblock remove (name) [id id id...] - removes blocks.
- /rb repop (name) - Re-spawns all blocks in a given region
API
Method available directly from RegenBlock class.
public void regenBlock(Location location, Material material, byte data, Player player, Boolean isBreakEvent) location - block's location material - what material block should be set to once restored data - data value for the restored block player - player that broke/placed the block isBreakEvent - test if this is a BlockBreak of BlockPlace event.
Nice plugin. I just used it to make a "Sand farm" for the server. No more fugly deserts and ruined beaches, yey!
I do wish it could revert falling, exploded or otherwise changed/destroyed blocks as a configurable option.
Could you add Factions and WorldEdit Support? For Factions it should regen not-claimed land after a setted time. For WorldEdit it shouldnt regen area when it is in any cuboid.
I have to say, this plugin was a huge help for my tree farm in my prison server, however it doesn't regen leaves, any fix for this? Either way, thanks for the great work!
Its working great using it since weeks now. Thx for that Plugin!
Hi there, I just got this plugin for my jail server to reset the mines and I have a question. I dont want the mine to auto reset i want to have a OP say the command and then the mine resets.
@TruDan97
sure if you want, the blacklist if you want to add it as a new feature, but leave the way current works as well, someone about a month ago asked for it that's why it's there.
@Raidendex
Thank you, would you like me to send you my edited version so you can use it? I will try and add Entity events such as sand, leaves decay etc, and the blacklisted blocks not able to be destroyed at all
Here is a link to the regen blocks section http://pastebin.com/q4cr8RuB
After reading your last post I found out wht the quarry isnt working right. There is sand in the quarry and people must be digging out from under them I can remove the sand section and that’s not a big deal. The wheat farm works ok because its set up so that farm land does not get trampled there for they still get replanted.
The mill on the other hand is still having issues however. It looks the same tonight as it did last night when I logged off that’s why I decided to past the regen blocks section.
Thanks so much for helping out with this issue.
@TruDan97
jar files have source code included
A few features that i'd like to request, or even do myself if i could have the source.
Worldedit integration (WorldEditCUI, expand, shift etc, polygonal regions) Blacklist for blocks being destroyed (so blocks that cannot be destroyed at all) i have a mine pit and it has rails in it, i would like my players to not be able to destroy the rails. i thought that was what the blacklist did, but apparently it just stops those blocks respawning alltogether
@BBFChaser
Well wheat is a weird block and I suppose could have issues coming back. For one if it tries to respawn without dirt under it being proper kind it will likely just drop as item instead of block. Also not sure if destroying (harvesting) wheat is done with just block destroy or perhaps there is something else is going on.
In simple terms this plugin just looks for either BlockBreakEvent or BlockPlaceEvent to queue block for respawn, if block goes away for any other reason like say TNT explosion without be BlockPhysicsEvent, my plugin would do nothing. So make sure nothing weird like that is happening.
Other potential cases - water flooding wheat and destroying it, sand/gravel falling. Water /lava/fire messing with blocks.
Config looks fine, though I wasn't really expecting much from it, specially without the blocks to regen section that's where you could look for potential issue. Say destroy bunch of blocks (well count them) and make sure same count is present in the config.yml Then after times is up make sure they are respawned and also are gone from the config file or if not repop see if still in config file etc.
If you type /rb debug it will spit out a lot of info to the server.log as well, could potentially track down issues with that, though it is likely to be more of a spam than anything. So i would test it with just few blocks at a time as it sends out a lot of info for each.
Here is a pastebin of the config without the blocks to regen section.
I jumped on the server prior to pasting this and it looks like the wheat farm is ok for now. The quarry is missing blocks and they were not showing up in the blocks to regen section. the mill has bocks to regen so ill check in 2 hours from now and see if the missing blocks have indees regenerated and ill let you know.
http://pastebin.com/YjrCgVaF
@BBFChaser
I would need more information to figure out what exactly is happening there. At least the config.yml file I suppose. Maybe check the server.log if there are any error messages related to the RegenBlock.
as far as time, that's a system time in milliseconds when the block should be re-spawned so it looks good assuming your server doesn't change time randomly :)
I love this plugin but I also have major issues with it.
There are times where this plugin just stops working or works partially and I need to copy the config disable the plug in and re-enable it with the good config.
Specific regions will let's say glitch out. For example on my server I have 3 separate regions.
One region is a wheat farm that free builders can use and it resets 30 minutes and is set to sync 1. At times half of the wheat farm will sync and the other will act as it has a regen time of 0.
Another is a wood mill for free builders as well it looks like a mill and they can grief it to get wood. Here lately it will not regen period I have the same issue with the third area I have set.
In the config file all of the "blockstoregen' show a regen time of 1335670898810
Is it possible that in the next update you make a snapshot of the region when you create the region and can later reset it to its original state with a command?
How would I use this to regenerate a castle wars map After the war. I do have the cannons plugin And if something was shot with a cannon could I regenerate it with this?
Can you make it so that a timer occurs of -INSERT NAME OF REGION THAT wiLL BE REPLACED- WILL REGEN SOON. then 5 4 3 2 1
@bruuff
You could select those regions by hand, but I don't plan on replying on other plugins as I need this to work on my own server and that could cause issues for me.
@skeletons10
Perhaps there are some issues with bigger regions for some weird reason, but there is no hard coded restriction coming from my side, so in theory it should work, but if you have 100 people mining all the time in those regions maybe something happens where blocks get missed etc. Not too sure how to test it tbh.
I can create large region across whole world, but would be hard to really tell if everything gets repoped right, unless I make it all into a big brick of same block type, and even then I can't see what's going on inside the brick as far as regen goes :) but I'll try to play around with it.
is it possible to combine this plugin with chunk types of towny/factions or sth like that? so that all nature or unoccupied chunks get regenerated? (maybe in combination with a world border plugin)
and is there also a way of restricting regeneration depending on the y-coords?
e.g. everything around the town and below the town (maybe y<55 or sth like that) should get regenerated
bruuff
@Raidendex
What about a time / region size limit thats screwing it up....
My mines are 38000 blocks and respawn every 6 hours is that too much?