Coder Social home page Coder Social logo

customoregen's Introduction

CustomOreGen

This is a Minecraft mod that allows for granular, user-configurable overwriting of vanilla ore generation, and that allows for adding entirely new veins of ore into the game. It can be used for changing the frequency of an existing type of ore, adding a new vein into the game (with multiple different types of ore, if you so desire), and even disabling all ore generation.

Configuration

This mod uses user-configurable json files to allow for adding new veins of ore into the game. An example of one of these files is as follows:

{
  "blocks": [
    {
	  "block": "minecraft:coal_ore",
      "minAmount": 15,
      "maxAmount": 30
    },
	{
	  "block": "minecraft:diamond_ore",
      "minAmount": 3,
      "maxAmount": 6
    }
  ],
  "biomeTypes": [
    "OVERWORLD"
  ],
  "yLevelMax": 16,
  "yLevelMin": 0,
  "size": 5,
  "radius": 3,
  "numPerChunk": 0.4,
  "targetStone": true
}

While most of these fields are self explanatory, certain fields deserve an explanation:

  • This mod uses a custom ore generation algorithm through its CustomVeinFeature class. As such, the size of a vein is how many source blocks are randomly selected in a line. The radius is how far out from these source blocks ore can spawn, with a continually decreasing chance.
  • numPerChunk works with whole numbers, but by adding a decimal, you can reduce spawn rates below 1 per chunk. In the above example, the numPerChunk is set to 0.4, meaning that each chunk has a 40% chance of containing a vein. This can also be used for numbers greater than 1: setting numPerChunk to 1.5, for example, would mean that a chunk would have at least one vein, with a 50% chance of having a second.
  • 'targetStone' is whether or not a vein should spawn within stone (or variant) blocks, like vanilla ore. These variants are: stone, diorite, andesite, and granite.
  • biomeTypes allows not only for configuring veins to spawn in a specific dimension, but also specific types of biome. For example, you could configure a vein to only spawn in COLD biomes. More information on biome types can be found here.

This mod was created for personal use, but I have no problem with anyone else using it. You don't have to ask for permission to use it in a modpack or anything, should you desire. However, please don't monetize this mod in any way, or deliver it in something locked behind a paywall. Credit me, too.

customoregen's People

Contributors

perrymacmurray avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.