Difference between revisions of "Ore Generation"

From GT New Horizons
Jump to navigation Jump to search
Line 22: Line 22:
 
int cX = aChunkX - aRandom.nextInt(this.mSize);
 
int cX = aChunkX - aRandom.nextInt(this.mSize);
 
int eX = aChunkX + 16 + aRandom.nextInt(this.mSize);
 
int eX = aChunkX + 16 + aRandom.nextInt(this.mSize);
 +
// Where aChunkX is just the world (block) coordinate of where the vein is being generated along the x-axis
  
// Where aChunkX is just the world (block) coordinate of where the vein is being generated
 
 
// This code is duplicated for the Z values
 
// This code is duplicated for the Z values
// Also reminder that nextInt() generates a random number from 0 (inclusive) to the parameter (exclusive)
+
int cZ = aChunkZ - aRandom.nextInt(this.mSize);
 +
int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize);
 +
// Where aChunkZ is just the world (block) coordinate of where the vein is being generated along the z-axis
 +
 
 +
// Note that nextInt() generates a random number from 0 (inclusive) to the parameter (exclusive)
 
</source>
 
</source>
  

Revision as of 18:11, 9 August 2017

Ambox warning pn.svg
This is an extensive guide for mining in GT New Horizons.
Everything here is important unless otherwise noted, therefore do NOT skip over anything!

Introduction

GregTech disables all Vanilla ores (except Emerald Ore, and Twilight Forest Hollow Hills), and replaces them with its own ore generation system.

Ore Makeup

GregTech ore blocks do not work like other ore blocks you know from other mods or vanilla. Such mods or vanilla uses actual Blocks for placement of their ores, however in GregTech, ores are actually non-ticking MetaTileEntities, defined not by block ID or metadata but by TileEntity data. Meaning that instead of a static Block, these ores are actually TileEntities in that they are all the same "block", but have different data assigned to them that make them function differently. This also means that most, if not all, traditional x-ray mods will NOT work for finding specific ores. Even changing your textures to be invisible will not work as these ores appear as regular blocks until exposed to air (thus making stone invisible, will turn the ores invisible too.) Each ore contains the internal ID of the ore (not block ID), and a true/false value whether they were placed by the world generator or by other means. This is mainly used to determine drops for #Small Ores.

When an ore is generated, if there was a type of stone (Stone, Red/Black Granite, Basalt, Marble, Netherrack, or End Stone) in that location, the ore takes on that stone's base type (note that ores can not generate in other blocks, such as dirt). So if an Iron Ore generates on Netherrack, the ore has a stone type of Netherrack, but is still Iron. The only real differences between each stone type is the dust or dirty dust produced when mining #Small Ores or when pulverizing regular ores.

Ore Types

Ore generate in two types: Small Ores and Mix Veins (aka Vein Mixes).

Small Ores

These ores generate as semi-common single blocks throughout a dimension. They are intended as a way to get small amounts of raw materials useful for tools or any other small quantity needs; they are not intended to be used as a primary source of resources for progression or machinery. When broken, they drop either a Crushed Ore, an Impure Pile of Ore Dust, or, if applicable, a Gem, of the respective ore. Additionally, they may drop a Dust or a Dirty Dust of the stone type (#Ore Makeup) they were found in. Small Ores cannot be picked up with a Silktouch Pickaxe, however a Fortune Pickaxe will slightly increase their yields. Importantly, Small Ores can be mined at 1 mining level lower than the ore itself, allowing a player with a stone-level pickaxe to mine iron-level ores.

Mix Veins

Mix Veins come in four parts, Primary, Secondary, Inbetween, and Around. Each of these parts can be a different ore. Each mix will always be 7 blocks tall, or in other words have 7 levels (unless unnaturally cut off by dirt/air/non-stone type blocks). The Primary part is contained in the top-most 3 layers, Secondary the bottom-most 3 layers, Inbetween the 3rd and 4th layers, and Around can be found randomly anywhere in the 7 layers in much smaller amounts.

Basic diagram of each layer from top to bottom.

Mix Veins can be a varying width and length depending on randomness and a configuration value called size. Each different mix type has a size value set for it. For programmers the min and max x and z values are defined by the following code, regular users can just read the table after.

int cX = aChunkX - aRandom.nextInt(this.mSize);
int eX = aChunkX + 16 + aRandom.nextInt(this.mSize);
// Where aChunkX is just the world (block) coordinate of where the vein is being generated along the x-axis

// This code is duplicated for the Z values
int cZ = aChunkZ - aRandom.nextInt(this.mSize);
int eZ = aChunkZ + 16 + aRandom.nextInt(this.mSize);
// Where aChunkZ is just the world (block) coordinate of where the vein is being generated along the z-axis

// Note that nextInt() generates a random number from 0 (inclusive) to the parameter (exclusive)
Size minWidth maxWidth
0 16 16
16 16 48
24 16 64
32 16 80
48 16 112
64 16 144

As you may have seen a pattern, the minimum is always 16 blocks, and the max is (2 * size) + min

Let's use the Iron mix type as an example. This mix type has a size value of 24. Meaning that the width could be anywhere between 16 and 64 meters/blocks, and same with the length (width and length could be the same, but more commonly will not match due to the random factor.)

Generation Process








Throw away all your old concepts of mining in Minecraft. Gregtech completely changes how ore generation works in this modpack.
First go read the "Ores" section of this wiki http://ftb.gamepedia.com/GregTech_5/Mining_and_Processing#Ores. Ignore the "Default Ore Mixes" section!

Right off the bat know this: Exploring cave systems and traditional strip mining is completely worthless and a massive waste of time.


Your first task is to identify the ore generation grid. As described in the wiki page, all ore generation happens in 3x3 chunk sections, even if the vein itself is smaller or larger than 3x3 chunks.

Any mining that you do, whether before or after you identify the grid should be done using vertical shafts. (the only exception being if you want to make a horizontal tunnel underground to connect each shaft together, but this tunnel is not for finding veins.)

The vertical shaft should be positioned in the center of whatever chunk you are mining in, you can choose how the shaft is structured, but I recommend a 2x2 block shaft so that it can be a staircase of sorts.

This image is a topdown map of a random world where the stone/dirt/etc has been removed leaving only ore veins and small ore blocks. The thin gray lines show the vanilla chunk grid. The red lines I have drawn ontop of the original image, to help show the 3x3 ore generation grid.
JourneyMap OreGen Visual.png


To identify this grid without removing all the stone/dirt/etc, pick a bunch of chunks and start mining a shaft in each one. Use the size of any veins you find and your map to help you identify the grid. Remember that all veins generate out from the center chunk of each 3x3 chunk section. However also note that some veins can be 2x3 or other rectangular shapes, so if you dont find a 1x1 or 3x3 vein right away, you may need to find more veins nearby, or use existing veins you have found already.

If you think you have figured out the grid, test it out and correct it if needed. Once you figure out the grid, or otherwise have a guess for how it is positioned in your world, you only need to mine 1 vertical shaft in the center-most chunk of each 3x3 chunk section of the grid. If you find a vein there, great, if not move onto the next 3x3 chunk section. This way you are gurenteed to find every vein, assuming a vein generated. As seen in the above image, some sections of the grid do not have any veins in them, this is completely normal.


Good luck and have fun! Note that this process may take at minimum a few hours, be prepared to mine for quite a while. If you have any questions please contact bigbass1997 on Discord.


TODO: This guide needs to be revised with new information about how to identify the ore grid without ever mining any shafts.