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.
@Puntafaard
Depending on region sizes those snapshots would be rather large. How about you just tailor multiple regions around what you want to be respawned.
Well any newly placed blocks that is.
Does it have to be a concept of history? I'm kinda thinking like it takes a snapshot of everything in the region when you make it and then never respawns any blocks after that.
@Raidendex
Damn that blows my idea right out the window. Thanks a lot though. Sorry I wasn't thinking about that other idea before I suggested the first.
@Puntafaard
It would be regenerated, Im not keeping any history of what blocks where placed when, so no way to tell. That not something I would want to implement either, would add too much data to keep track off. Just have to use /rb edit to remove/add blocks for sure.
Or does it already have that effect? haha
@Raidendex
Awesome! Thanks so much! It would also be a problem if any players on my server went to go place wood and then decide they don't want it there, but it keeps regenerating. Is there a way to have it so newly placed blocks don't have the effect?
YOU ARE AWESOME.I WAS SEARCHING SOMETHING LIKE THIS FOR YEARS!
@Puntafaard
Uploaded 5.1
Added /rb monitor [break/place] [true/false] setting
Setting either to false will make RB ignore either placing or breaking of blocks. By default both are true and RB will function as always. Setting place to false will make RB ignore placing events, newly built blocks in the region will be regenerated from then on if they are destroyed.
RB monitors quite a few other events as well, so placing things such as painting will still be locked etc.
Basically what I'm saying is that I don't want the region to restore to it's original state when I place a block but only when I break. Yes adding this config would be awesome!
@Puntafaard
rb will restore both destroyed and placed blocks thus keeping original state of the region in tact.
Not exactly sure what you are talking about, but to modify the region you can use /rb edit command to go into editor mode. Other than that everything will be reverted to initial state.
Finally, you can set certain block types to be ignored by the plugin globally or per region, so if those blocks are destroyed or placed no action will be taken. Of course this won't work too well if all you want to restore are leaf and wood blocks.
Could probably add config feature to ignore placing or destroying, but that is not there atm.
Hi Raidenex! I trying to find out a way to preserve the trees on my server because they are all uniquely made. I want players to be able to mine them too. The problem is that when I set up a region that has wood and leaf regeneration, those same blocks will also disappear when I set them down which is a huge problem. Is there anyway to prevent this?
Played around with RB a bit more and uploaded new version 5.0
RegenBlock now uses some of the WorldEdit API for re-spawning blocks. Selecting still has to be done through /rb select, might add wand later. So you will have to have that installed. Hopefully that will make it smoother on large re-pops.
Mine type now behaves a little bit differently. If the block in the mine region (type 1) matches to one of the spawn blocks it will be randomized, otherwise it will re-spawn normally. Example - spawn blocks are set to stone and coal. If dirt is destroyed it will re-spawn as dirt, if coal or stone is destroyed it may spawn back as either stone or coal. I feel like this will make for creation of mines a bit easier as you will be able to have some random things in the mine that will always come back to the same block type, while those you select as spawn blocks will be randomized.
Uploaded 4.7
Corrected (hopefully not broken) some possible thread issues.
Added a limit to how many blocks can re-spawn at once to 1000 blocks to lessen possible lag from it.
Added some handling of frames and painting. Basically those events will be cancelled in regions. So players won't be able to place, destroy, or modify frames/paintings. In editor mode you should be able to place and edit, but not remove - couldn't find a way to get a player name for destroy event, only see cause, which is just an enum.
@Anthonyflyerr
Try it and see then :)
Dumb question, but is it out for 1,4,6 or 1.4.7? And if so can i get the link? Love to have this on my RPG server!
@Raidendex
From what I can tell it can be more about not having java 7. Believe my workspace compiles for that. Perhaps you have java 6.
@ziicutie
Runs just fine on my 64 bit ubuntu. Didn't have to install anything extra for java.
@midbifroid
oh ok that is how you make it work although I am on linux 64 bit version and you get into a really complicated setup to make your server run the 32 bit version of java but I found a simple solution to extracting the files and running the minecraft inside the java bin folder. Actually this is not a bad idea because there is less to install and configure on your linux server if you decide to move your minecraft software to a new computer. uggg all that just because the developer would not take the time to make it work on a 64 bit platform. This will be well worth my trouble though because I can limit my world size to really small and keep my players happy and not run out of resources and make my server run more like a runescape setup.
Hi ! Thx for that plugin !!
Pls, this plugin can eject players from mine before the regen for not crush them inside ?