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
Hi @XHawk87 !
There is an error in 1.13.2 b2146
https://pastebin.com/v9fZriLV
This is the default config
Is there anything wrong from my side or is it a plugin issue?
In reply to Forge_User_80075269:
It looks like there might be a problem with a script on your server. Perhaps a restart script?
AntiBranchMining then errored because it was still trying to do stuff after the server started shutting down. Which it shouldn't really be doing, but since the server is shutting down at that point anyway it is not really going to affect anything.
In reply to XHawk87:
Nop it is a minor error, I never had any restart script
The problem is there isn't any crash when the AntiBranchMining isn't installed on the server
Btw I will try again
In reply to XHawk87:
Hi there
I tried again only with your plugin installed :)
There is still the same error
https://pastebin.com/mKJ1m1bZ
Are you able to fix it? :)
In reply to Forge_User_80075269:
Have you tried the advice it gives here?
Hey XHawk87:
It seems i am the once to use this plugin today :P
It still launched in 1.12, but how can I be sure it always works fine?
Thank you guy!
In reply to Forge_User_80075269:
@XHawk87
Okay, thanks :)
@JohOply
That all looks good to me.
If you don't specify, the default is to remove 100% of ores that can only be found by branch-mining, while leaving behind all those veins that border the air/water/lava (even by diagonals) and any veins attached to those (including diagonals).
@XHawk87
Thanks !
Is it okay : http://pastebin.com/72k8uGkQ ?
Also, if i didn't set anything into config for "world", the plugin remove 100% of ores?
@JohOply
Hi. Unfortunately the formatting was stripped from your config.yml so I cannot tell if that is right. You might want to try: http://pastebin.com/
As for the nether, you'll need to set up the "ore-replacement-material", and "ores" to match those that occur in that world type. You may also want to increase the max-height to the roof of the nether, since quartz ore can be generated anywhere up to there. E.g.
P.S. You can find a full list of materials for CraftBukkit servers here or for Spigot servers here which can be used in any config requiring a material or list of materials.
Hi !
How can I use it in Nether, i don't understand how can i config it...
And Is it work ? :
enabled: true
excluded: {}
max-height: 70
worlds:
Mine:
enabled: true
removal-factor: 35
Oh ok thanks! Awesome plugin!
@Trevor450
So your config.yml would be something like this:
http://pastebin.com/2HjcTFey
You're using the removal-factor right. It is an integer value between (0 - 100) which is internally regarded as a percentage of ores.
By default, 100% of ore veins that are not adjacent to air are removed. Setting removal-factor to 60 will mean that only 60% of these ore veins are removed, and 40% of them are left intact, as well as all of those veins that border the air.
How does the removal-factor look in the config? I tried to do something like -
enabled: true excluded: {} removal-factor: 60 max-height: 64 worlds: {}
And I know that is probably really wrong, could you explain it a little more, like how to put it in the configs?
@XHawk87
You're a peach! thanks Hawk!
@kemmeo
I built it to be as resilient as I could to updates, although a lot did change in 1.8. It is certainly worth a shot.
If you need to support any of the new types of blocks in 1.8, you may need to manually add them to the configuration file. The block names for the most recent builds of Bukkit are listed here: http://jd.bukkit.org/dev/apidocs/org/bukkit/Material.html
long shot, but will this plugin work for 1.8?
@Liger_XT5
It is LAPIS_ORE (http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html#LAPIS_ORE)
Quick question, about the config's examples.
When listing Lapis Lazuli ore, is it:
- LAPISLAZULIT_ORE
ore
- LAPIS_LAZULI_ORE?