AntiBranchMining
Branch-mining, the process of digging out organised tunnels at low levels in order to increase chances of finding valuable ores. A valid technique in most survival games, but in Ultra-Hardcore tournaments its use is often banned due to the ease and safety in which you can gain ores. This has led to a great deal of drama, accusations, lack of understanding of the rules, and time required on the part of the host to police such behaviour.
In an attempt to avoid the problem entirely, I have created this plugin. It is simple, efficient and effective in removing all ores that can only be found by branch-mining while retaining all ores that can be found while caving and exploring underground structures. The practical upshot of this is that all forms of branch-mining become profitless and therefore pointless, and effectively removes branch-mining from the game.
As all ores that could be found by caving are retained, most players will not even notice a difference to the world unless they are tunnelling rather than caving.
This is advantageous to both hosts and players, as hosts will no longer need to worry about monitoring the tunnels of players to see if they are branch-mining, while players will no longer have the confusion about rules, will no longer need to worry about digging straight tunnels for genuine reasons, such as searching for caves.
Features
- Simple
- Just download the plugin jar into your plugins folder before generating a new world, no additional setup required
- Efficient
- Causes chunk loading to take only 15-20% longer on average, typically a difference of only a few milliseconds per chunk
- If you pre-generate your arena with AntiBranchMining installed, it need do nothing during play and so causes no lag
- Fast enough to be used without significant lag in unlimited sized worlds
- Effective
- Removes all ores only available through branch-mining, while retaining all of the ores that can be found while caving
- approx 14,000 gold and 5,000 diamonds remain in a 1600x1600 map available just from caving alone
- Customisable
- Exclude certain types of ores from being removed
- Reduce the max height to check for ores to remove, if you allow branch mining at higher levels
- Record ore compositions to show how much ore is left in the world afterwards
- (0.2) Apply different settings or disable AntiBranchMining on a per-world basis from the config.yml
- (0.3) Change the ore removal factor to optionally retain some percentage of ores that would normally be removed
- (0.3) Use AntiBranchMining on worlds with radically different terrain generation by settings which block IDs count as ores and what material they should be replaced with
Multi-World Support (Available from v0.2)
In order to provide support for multiple worlds, I have added a some extra options in the config.yml file. Here is an example: config.yml
Customisable Ore Removal Factor (Available from v0.3)
By default, AntiBranchMining will remove 100% of the ores that can only be found through branch-mining. However, in some cases you may only want to encourage caving rather than prevent branch-mining entirely. You can now add a "removal-factor" key with a percentage from 1 to 100 to the default or any given worlds. If you set it to 90 for example, then 90% of the ores would be removed, and only 10% of the ore available only through branch-mining will remain. This works per vein of ore rather than per block, so either the whole vein will remain or the whole vein will be removed. This should maintain the natural vanilla feel of the world.
Custom World Generation Support (Available from v0.3)
In order to better support worlds with other than the normal world generation (e.g. nether and quartz ore?), I have added an "ore-replacement-material" option, this allows you to set what material to replace removed ores with. This default to stone on normal maps, but in the nether for instance you would more likely want it to be netherrack.
I have also added an "ores" option, a list much like "excluded" ores, that allows you to customise which materials should be considered ores for searching purposes. This is useful if you are using a different set of ores to the standard ones e.g. nether quartz instead of coal, iron, gold etc.
This should not be used as a replacement for the "excluded" option as it may have unwanted side-effects. For instance, if you didn't want coal ore to be removed, so you took it out of the list of ores, it would prevent the coal ore from being removed, however it would also mean that if you mine out the coal any other ores behind it would have been removed due to the coal not being considered an ore. The ores list should be considered a list of all known ores for the world, whether you want them removed or not.
Commands
- /OreStats - Displays the remaining ore composition of the world per chunk and the average time it has taken to remove ores from them. Set debugstats to true in the config.yml before generating the world to see all the information.
Permissions
- antibranchmining.commands.orestats (defaults to op) - Allows use the /orestats command
Troubleshooting
This plugin uses Java 7
If you get the followed error on starting up the server with this plugin installed "Unsupported major.minor version 51.0". This means you are using an out of date version of Java. If you don't know how to upgrade, please contact your server hosting provider and ask them for help in upgrading to Java 7, or contact Oracle customer support. Mac OS X users require JDK 7 instead of JRE 7.
Compatibility
This is a Bukkit API-compliant plugin. This guarantees that it is compatible with other Bukkit API-compliant plugins, and will continue to work in later versions of Craftbukkit (unless the Bukkit team specifically state that a particular update will break plugins, this has very rarely ever happened).
Donations
If you'd like to contribute towards the continued development, support and maintenance of this project, please consider joining me on Patreon, and making a one-time or recurring pledge.
Help
If you need help you can leave a comment below and I will get back to you as soon as I can. You can also join my IRC chatroom using the following link. Please note, I am not always at my keyboard! http://webchat.esper.net/?channels=XHawk87&prompt=1
-
View User Profile
-
Send Message
Posted Nov 11, 2013@XHawk87
Oh nice!
-
View User Profile
-
Send Message
Posted Oct 29, 2013@JohOply
Since there are no new ores appearing in 1.7, it is unlikely that AntiBranchMining will need to be updated.
-
View User Profile
-
Send Message
Posted Oct 29, 2013Nice! Thanks! I'm awaiting 1.7's version :)
-
View User Profile
-
Send Message
Posted Oct 28, 2013@JohOply
If you create a world with Multiverse while AntiBranchMining is installed and configured, it will remove ores from it as it is being created.
-
View User Profile
-
Send Message
Posted Oct 28, 2013Hi!
I haven't seen if you speak about it, so : does it work with the generating map of Multiverse ?
-
View User Profile
-
Send Message
Posted Jul 2, 2013AntiBranchMining is intended to be used during world generation, so it needs to be active before a world is created.
If you want to manually have it remove ores from a pre-existing world, you would have to create a queued.log file containing ALL of the chunk coordinates that need to be checked, and restart the server, however AntiBranchMining was not designed to be used like this, so it is not recommended.
Orebfuscator cannot and does not conflict with AntiBranchMining, I use both myself, and have had no issues. They also use completely different methods of action. Orebfuscator cannot obscure blocks from a plugin, only from players.
There is no map limit.
-
View User Profile
-
Send Message
Posted Jul 2, 2013@XHawk87
Yes, sorry for that paste.
I did post a commend because i did check using xray that ore still exists on that worlds (using Multiverse) after some time.
My first quest was that antyxray did hide them from AntiBranch, so i did disable (using commands) oreobfuscator and used xray, and ore was there.
I did not enable debug for now, somehow i don't want to end up with a lot of sponge on my other worlds, and i would like to remove ores from every world.
/orestats: http://dev.bukkit.org/paste/8054/
config.yml: http://dev.bukkit.org/paste/8055/
I have some cords in completed.log and queued.log so it probably work, and i did confirm that "lots of ore" was because i landed on a map next to lots of lava and mineshaft so mo wonder that there was a lot of ore :)
Does plugin have some "map limit" ? Because it only clean 3 of my maps.
Thanks for your support.
-
View User Profile
-
Send Message
Posted Jun 29, 2013@kolorafa
Hi kolorafa
Please use services like http://pastebin.com for logs and errors. It makes it so much easier to read and doesn't take up half the comment section.
The info messages you are seeing are not errors. They merely indicate that a chunk has been searched for ores, none were found, they were rechecked 5 seconds later to ensure it was not because it had not been populated yet, and then confirmed that there really were no ores to find in the chunk.
These kind of messages very occasionally come up on normal Minecraft chunks, simply because a chunk happens to have no ores in the band you were checking, but a much more likely cause is when AntiBranchMining is forced to recheck areas that it has already removed ores from. If this is the case, it is possible that none of the ore veins in a particular chunk bordered the air, in which case ALL of them were removed. When rechecking, it will find a chunk with no ores and print up the message.
Orebfuscator works by acting as a layer between Players and the Server. It intercepts the chunk packets being sent to players and scrambles all blocks they cannot see with random blocks. It does not actually alter any blocks within a world, and so it cannot conflict in any way with AntiBranchMining.
I personally use both AntiBranchMining and Orebfuscator on my server, and I have had no issues.
If you wish to confirm that AntiBranchMining is doing its job, I recommend using an X-ray tool to manually view the chunks in an area. You should see that there are wide empty spaces, and any ore veins are hugging caves, lava flows and underground structures. You will need to allow yourself immunity from orebfuscator to do this.When first generating a world you can also set the ore-replacement-material to mossy cobblestone (48) and then any removed veins will show up as mossy in the xray, which can be useful in pinpointing where veins used to be.
You can also use the /orestats command to check the remaining count of ores in all checked chunks and compare them against the average amount of ores in a minecraft world.
-
View User Profile
-
Send Message
Posted Jun 29, 2013Really like the idea, but i use Oreobfuscator on my server and when i run it i got (log below) and non of ore are removed, maybe they can run at the same time?
I don't want to run only antibranchmining because people will xray for caves and mine...
(Allow creating ticket for better view :) )
2013-06-29 09:53:58 [INFO] [AntiBranchMining] No ores were found in surowce3 3,2: Scheduling for a second check in 5 seconds 2013-06-29 09:53:58 [INFO] [AntiBranchMining] No ores were found in surowce3 3,21: Scheduling for a second check in 5 seconds 2013-06-29 09:53:59 [INFO] [AntiBranchMining] Confirmed that surowce3 22,2 still has no ores on the second pass 2013-06-29 09:53:59 [INFO] [AntiBranchMining] No ores were found in surowce3 3,5: Scheduling for a second check in 5 seconds 2013-06-29 09:53:59 [INFO] [AntiBranchMining] No ores were found in surowce3 3,6: Scheduling for a second check in 5 seconds 2013-06-29 09:53:59 [INFO] [AntiBranchMining] No ores were found in surowce3 3,7: Scheduling for a second check in 5 seconds 2013-06-29 09:53:59 [INFO] [AntiBranchMining] No ores were found in surowce3 3,8: Scheduling for a second check in 5 seconds 2013-06-29 09:53:59 [INFO] [AntiBranchMining] No ores were found in surowce3 4,12: Scheduling for a second check in 5 seconds 2013-06-29 09:53:59 [INFO] [AntiBranchMining] No ores were found in surowce3 4,2: Scheduling for a second check in 5 seconds 2013-06-29 09:54:00 [INFO] [AntiBranchMining] Confirmed that surowce3 23,2 still has no ores on the second pass 2013-06-29 09:54:00 [INFO] [AntiBranchMining] Confirmed that surowce3 23,22 still has no ores on the second pass 2013-06-29 09:54:00 [INFO] [AntiBranchMining] No ores were found in surowce3 4,5: Scheduling for a second check in 5 seconds 2013-06-29 09:54:00 [INFO] [AntiBranchMining] No ores were found in surowce3 4,6: Scheduling for a second check in 5 seconds 2013-06-29 09:54:00 [INFO] [AntiBranchMining] Confirmed that surowce3 23,3 still has no ores on the second pass 2013-06-29 09:54:00 [INFO] [AntiBranchMining] No ores were found in surowce3 4,7: Scheduling for a second check in 5 seconds 2013-06-29 09:54:01 [INFO] [AntiBranchMining] No ores were found in surowce3 5,22: Scheduling for a second check in 5 seconds 2013-06-29 09:54:01 [INFO] [AntiBranchMining] Confirmed that surowce3 24,2 still has no ores on the second pass 2013-06-29 09:54:01 [INFO] [AntiBranchMining] No ores were found in surowce3 5,25: Scheduling for a second check in 5 seconds 2013-06-29 09:54:01 [INFO] [AntiBranchMining] Confirmed that surowce3 24,22 still has no ores on the second pass 2013-06-29 09:54:01 [INFO] [AntiBranchMining] No ores were found in surowce3 5,6: Scheduling for a second check in 5 seconds 2013-06-29 09:54:01 [INFO] [AntiBranchMining] No ores were found in surowce3 5,8: Scheduling for a second check in 5 seconds
-
View User Profile
-
Send Message
Posted Jun 27, 2013@matthiasvd2
Unless there are any ore changes in 1.6, it probably will not need to be updated. All of my plugins are Bukkit API compliant meaning they will rarely need maintenance updates for new Minecraft and CraftBukkit releases.
-
View User Profile
-
Send Message
Posted Jun 27, 2013Cool plugin please update it to 1.6 when it has been released :)
-
View User Profile
-
Send Message
Posted Jun 21, 2013Doh! Of course... I forgot the debug setting! I enabled that when I thought the plugin wasn't working right.
I'll have another look at it over the weekend. Thanks.
-
View User Profile
-
Send Message
Posted Jun 15, 2013@HermitTurtle
You have debugstats set to true, this replaces all removed ores with mossy cobblestone so that it can be more easily seen for debugging purposes. The next version will only be using the ore-replacement-material and ore stats will always be available, so that particular option is being removed from the config.
As for ores not being removed at all, this can happen if your server crashes while the world is generating. Any changes that AntiBranchMining makes to chunks may not get saved. I am currently working on a way to make AntiBranchMining handle server crashes better, and give the ability to force rechecking of certain chunks. Early development tests show some promise.
-
View User Profile
-
Send Message
Posted Jun 15, 2013I've been using this plugin for the last 2 months and love it. It is THE most elegant way to discourage branchmining in UHC. Thanks!
However, I've been having some strange issues with the latest version.
When I first updated the plugin didn't seem to work at all. It didn't remove any ores. Even with the default config.yml.
Then I changed the max-height, just for the heck of it really. The plugin started working again. But now it replaces all ores with mossycobble, even though I didn't touch the ore-replacement-variable.
Is there a problem with the plugin or am I doing something wrong here?
My config.yml:
debugstats: true
enabled: true
excluded: {}
max-height: 32
worlds: {}
-
View User Profile
-
Send Message
Posted Jun 12, 2013@MineCola
max-height: 0 That means you're only checking blocks from 0 up to 0, hence not checking any blocks and not removing any ores.
-
View User Profile
-
Send Message
Posted Jun 12, 2013Hello , author
I have some trouble , when I set it like :
worlds: world_A: enabled: true max-height: 0
and reload my world_A but new world still spawn ore ... Is it setting wrong?How to set it?
-
View User Profile
-
Send Message
Posted Apr 18, 2013@jokeb4serious
It should still work, however it does not yet have support for the new quartz ore.
-
View User Profile
-
Send Message
Posted Apr 18, 2013does this work for 1.5.1
-
View User Profile
-
Send Message
Posted Apr 18, 2013does ths work for 1.5.1
-
View User Profile
-
Send Message
Posted Jul 27, 2013This is a Bukkit API compliant plugin, so will continue to work in newer version of Bukkit unless the Bukkit developers specifically state that an update will break plugins.
I do not check the curse pages often. Please only leave comments on the Project Site. Thank you!