OrePlus
Overview
OrePlus is a server plugin that modifies the amount of ore generated in the world when new chunks are created, without changing the underlying style of generation. Some typical use cases for this plugin would be:
- Creating additional deposits of diamond/gold/iron/etc. in each newly generated chunk.
- Creating deposits of ore at depths or sizes different from vanilla Minecraft.
- Creating deposits of non-ore blocks, or ore-blocks added by other plugins.
- Preventing an ore from being generated by clearing it out.
OrePlus uses the same algorithm for generating deposits as vanilla Minecraft, so your deposits will look the same as those generated by Minecraft. The plugin can be configured on a per-world basis, in addition to a default configuration. Each configuration consists of a set of rules for either generating or clearing out a single block type. See the Configuration section for more information on configuring the plugin.
There are currently no runtime commands or permissions for changing the generating rules, or for modifying chunks that have already been created.
This plugin is best used in conjunction with a new world, so that all chunks will be created with consistent rules. There is no problem with loading it into an existing world, but any existing chunks at the time the plugin is first loaded will not be affected.
Installation
Place the OrePlus.jar file into your plugins directory. The first time you start your server, a default config.yml file will be created with a few rules to add extra ore to your new chunks. See the Configuration section for more information on configuring the plugin. Configuration changes will not take effect until your server is restarted.
Companion Tool
OrePlus is based off of NBToolkit, a collection of command-line tools for offline map processing that includes ore generation. If you wish to use OrePlus in an established world and still maintain consistency across it, you can use NBToolkit to apply an equivalent set of ore generating and clearing rules to your existing chunks.
The project thread can be found here. This tool is not inspected by the BukkitDev staff, and you use it entirely at your own risk. Support for NBToolkit will only be provided via the Minecraft forums project thread or its corresponding GitHub project. I will not provide any support for it here.
its still loading 4 default generator rules even when i leave generator rules totally out, or set generator: []
... very annoying
@jaquadro
Wow, thanks for that insight. That really helped me figure out what was going on.
@phrstbrn
It feels like for spawn, our block populators are called after the vanilla populators, but for new chunks, they're being called before the vanilla populators (and thus clear-style rules have no effect because you're clearing something that hasn't yet been created).
Bukkit may be trying to run our populators on chunks that have been created, but have not had the necessary adjacent neighbors created in order to run the populators (you can see this effect by opening a world in MCEdit and noticing the chunks on the map boundary are always unpopulated). This would be consistent with the crashing behavior I encountered when first developing the mod, as I would try to write blocks into neighboring chunks assuming they exist according to Minecraft's rules for running block populators. If you check your test-modded app in MCEdit and see bedrock spires on the boundary chunks but no ores, trees, etc., then I'm sure this is what is going on.
@jaquadro
I'm convinced I've spotted a Bukkit API bug, and not an issue with your plugin. I opened a JIRA ticket with what I've found. It's definately not working as expected, but it's also probably not the fault of OrePlus. I haven't figured out a workaround.
https://bukkit.atlassian.net/browse/BUKKIT-4390
Thanks for your help.
I didn't actually test your example, but in my test plugin, I generated a pillar of bedrock in each chunk, which DID work as expected. I suspect block.getType() is returning AIR or STONE when it should be returning an ore type, which is why the check fails.
I'll test that.
I wrote my own mini block-remover plugin (it's <60 lines of code), and I'm still having the same problem. It looks to be a bukkit issue, the changes aren't being saved properly during the population phase.
http://forums.bukkit.org/threads/are-blockpopulator-busted-or-am-i-insane.156720/
@phrstbrn
For comparison, if you try some generator rules, do you encounter the same problem where ores aren't generating outside of the spawn area?
Just to follow up, I just tried every version (1.1.1, 1.1.0, 1.0.1), every single one has the same issue.
Plugin doesn't appear to be working for me. Here is my config.yml. I'm trying to remove ALL the ores from the block populator.
It seems to work fine on the initial worldgen around spawn (no ores), but everything beyond the area where you spawn looks like it's using the normal worldgen and has ores everywhere. Not what I want.
A warning: dont put "size: 2" or lower in config file, it won't generate anything. It is not a linear size, it works by some stupid formula.
@below: read about the config file, you can put worlds in there.
I have added it to my server, and am not sure how to use it. Is it used automatically at all worlds? Maybe all normal worlds? Is there a way to use it only at a world for only mining? Sorry for my confusing way of speech, I am not a native English speaker.
Hey its me again, reporting another inconsistency with the config file.
In the "clear" section you cannot enter numbers as block id's, they must be strings.
So
is accepted under both generate and clear, but
only works under generate.
Yeah, at least thats the one I was experiencing.
@Slite62
Yes, nothing has changed to affect compatibility. To be clear, is the specific fix you're looking for the one that is resolved by putting quotes in your YAML config?
Sweet!
But I see the new versionis for 1.5.2, will it still work on 1.4.7?
Thanks for looking into it
@Slite62
There is a new build pending approval but it actually fixes some other things (better error guarding, don't overwrite parts of the config on startup).
The ID/data values getting mangled turned out to not be a bug, but rather incorrect YAML syntax. YAML doesn't like colons in strings, so your block/data pairs should be surrounded in single quotes. I've updated the configuration section to reflect this.
How is the fix coming along?
@Hulkiedulkie
Verified. I'll post a fix in a day or two after I can do some testing.
@kezzawozza It should be fine. I ran it very briefly on a 1.5 server before switching to a modded 1.4 server. I believe the underlying API is stable enough that it won't need compatibility updates. I will update it if an incompatibility does arise though.
Though given the comment below I may need to issue an update for a minor bugfix that's not related to 1.5.
Will this work with 1.5.2? I'm nervous to try it; I've got so much work done on our new server already. But I guess I'll test it on a small mining only world that I'll set up new. Will you be updating?