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.
-
View User Profile
-
Send Message
Posted Aug 8, 2012@OriginalMadman
Ok. I will be redoing it in next few days. So hopefully it will fix these things.
Also does the server actually lag from it? Or do you just see that it uses those events a lot?
Way I re-spawn blocks is by hanging off of some other event and checking the queue when that event happens. PlayerMove is one of the possible events I can use for this. Now I don't actually check the queue on each event, I also have a little timer variable that I check against to see if at least a second has passed. So once a second it will be somewhat heavy check... can be longer I suppose but since 1 sec is shortest re-spawn time possible, I kind of have to check it that often at least.
All the other times is just compares a long variable to System current time in milliseconds.
Also if you could put those numbers for me in some perspective as I'm not sure if those are really big or what compared to everything else.
In general I just need to redo some things and perhaps drop some features that kind of get in the way performance wise, but will see. Obviously the way it is right now is not quite the best solution.
Again, hopefully will have something in the next few days.
-
View User Profile
-
Send Message
Posted Aug 8, 2012Well I have a minute config (a sandfarm only), so it shouldn't cost much of performance?
I found another issue testing this. It stops obeying the RespawnTime I set, and puts the block back almost immediately now. Observed over 2 reloads. You are welcome to visit and see it in action. No errors in console.
My minute conf:
-
View User Profile
-
Send Message
Posted Aug 8, 2012@OriginalMadman
Not sure about leaks, but if more and more blocks are added to the queue atm it will add more and more load since it goes through the whole queue each time. I need to add second queue to break up re-spawn time and alarm time into two separate queues, so that way I could stop checking blocks after I reach a times that are in the future.
-
View User Profile
-
Send Message
Posted Aug 8, 2012FYI, PlayerMoveEvent[NORMAL] and RegenBlockQueueEvent[NORMAL] are the two things hogging a lot of CPU (here it is the most out of any on the server, and seems to get more than this with time, leak?):
-
View User Profile
-
Send Message
Posted Aug 6, 2012Works in 1.3.1. However it does go into CPU eating mode after a few hours it seems. Would be great if its fixed and updated. Love the plugin.
Checking with nolagg examine, and regenblock is the one plugin that starts eating ms from time to time.
-
View User Profile
-
Send Message
Posted Jul 26, 2012Any ideas?
-
View User Profile
-
Send Message
Posted Jul 23, 2012Sorry maybe I should of elaborated. They will regen of coarse but when you hit them they will automatically come back. As is the timer was set to 1 second.
-
View User Profile
-
Send Message
Posted Jul 23, 2012@BBFChaser
That is what it's supposed to do.
-
View User Profile
-
Send Message
Posted Jul 22, 2012I just tested and it seems that at times when you do repop the blocks will instantly regen.
-
View User Profile
-
Send Message
Posted Jul 22, 2012@kahlilnc
maybe yay, maybe boo, because I changed how some things work in the plugin so might have introduced bugs lol.
-
View User Profile
-
Send Message
Posted Jul 22, 2012Yay for update :D
-
View User Profile
-
Send Message
Posted Jul 22, 20123.8 uploaded.
Added: /rb repop (name) - repops all blocks in queue for the given region
Also check out new plugin http://dev.bukkit.org/server-mods/moc3dimporter/
-
View User Profile
-
Send Message
Posted Jul 17, 2012Deleted a world and i am getting could not pass event regenblockqueuevent to regenblock org.bukkit.event.EventException and did /rb remove after i deleted the world
-
View User Profile
-
Send Message
Posted Jul 8, 2012Is there a way to add a Spawn Time for every block? Example:
56:60 (Diamond ore would take 60 seconds to respawn)
1:10 (Where as Stone would take 1 seconds to respawn)
+ Would you be able to go more in-depth with the explanation, Its hard to understand what every command is preforming.
-
View User Profile
-
Send Message
Posted Jul 7, 2012you should add a sign you could klick to regen if you dont want to have a timer on it
-
View User Profile
-
Send Message
Posted Jul 6, 2012@Mayhem777
@Mayhem777
Type /rb select and left/right click two corners (area) with your hands (works everytime). You can do it with items, though it won't work with worldedit (wooden axe by default) so stick with just your hands to prevent plugins from getting in the way.
After that create the region by typing /rb create [name] It'll auto regenerate now based on the default timer.
-
View User Profile
-
Send Message
Posted Jul 6, 2012VERY good plugin. Works a lot better then the description leads me to believe. I do have two suggestions:
1: Edit the description to tell people it'll automatically regenerate any block placed or destroyed in the predefined area by default.
2: Let us use worldedit region for region select when we type /rb select
OF course these are minor suggestions, though just a couple things to think about.
-
View User Profile
-
Send Message
Posted Jul 3, 2012Great plugin however this is similar but not what i'm currently looking for:
http://forums.bukkit.org/threads/respawn-blocks-respawn-any-destroyed-block-update.84334/#post-1194332
-
View User Profile
-
Send Message
Posted Jun 29, 2012I'm very happy with this plugin, thanks!
-
View User Profile
-
Send Message
Posted Jun 23, 2012Hello, I have a question, can you add a command that regenerates a certain region immediately when you execute the command ? That way I could have falsebook execute the command when all players leave the region or something similar.
EDIT: Also, could you add creeper damage?