Tutorials Navigation
[ Minecraft ] How To Make A Ore Generate! [ Any I Think ]
Tutorial Name: [ Minecraft ] How To Make A Ore Generate! [ Any I Think ]
Category: PC Tutorials
Submitted By: Console
Date Added:
Comments: 6
Views: 9,519
Related Forum: PC Building Forum
Share:
Hey Guys Console Here Again With A Tutorial On How To Make Your Own Ore Generate!
Minecraft Version
Any I Am Pretty Sure.
What we are going to do is generate our titanium ore. This is the function we have to add to do this:
Ok, so let's break this down. First I should make sure you know what a chunk is. A chunk is just any 16x16x128. The 128 is the height.
That's it! You're ore now generates and you can put as many for statements as you want into GenerateSurcface(). Your final mod_CamelOre:
Final Code
The Credit For This Tutorial Goes To -
Methuselah96
Thanks Guys! Next Tutorial Will Be Great Stay Tuned!
Minecraft Version
Any I Am Pretty Sure.
package net.minecraft.src;
public class mod_CamelOre extends BaseMod
{
public static final Block oreTitanium = new CamelOreBlockOre(123, ModLoader.addOverride("/terrain.png", "/CamelMod/CamelOre/terrain/titaniumore.png")).setHardness(3F).setResistanc
e(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreTitanium"
);
public static final Item ingotTitanium = (new CamelOreItem(127)).setIconIndex(ModLoader.addOverride("/gui/items.png",
"/CamelMod/CamelOre/gui/items/titaniumingot.png").setItemName("ingotTitanium&q
uot;);
public mod_CamelOre()
{
}
public void load()
{
ModLoader.RegisterBlock(oreTitanium);
ModLoader.AddName(oreTitanium, "Titanium Ore");
ModLoader.AddName(ingotTitanium, "Titanium Ingot");
}
public String getVersion()
{
return "1.5";
}
}
What we are going to do is generate our titanium ore. This is the function we have to add to do this:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int l = 0; l < 5; l++)
{
int i1 = chunkX + rand.nextInt(16);
int j1 = rand.nextInt(20);
int k1 = chunkZ + rand.nextInt(16);
(new WorldGenMinable(oreTitanium.blockID, 3)).generate(world, rand, i1, j1, k1);
}
}
Ok, so let's break this down. First I should make sure you know what a chunk is. A chunk is just any 16x16x128. The 128 is the height.
- 5 , do you see that 5 in the for statement? That is how many times it tries to make a vein of this ore in one chunk (veins are groups of the same ore i.e. a vein of three blocks would have 3 diamond ores right next to each other). So the higher the number 5 is, the more it's going to show up.
- 20 , We're skipping to 20 because the 16s don't matter at all. The 20 is what level the ore can be on. If it's 20 then it would show up from levels 0 , 19. If you didn't want it to start at 0 you would say level to start with + rand.nextInt(how many levels to show up on) (i.e. 20 + rand.nextInt(20); would make the ore show up on levels 20 , 39.
- oreTitanium.blockID is the block that you want to generate. It's that simple.
- 3 is how big you want veins to be. WARNING: Veins can't be lower than 3. If you put in 1 or 2 for the vein number, it will not generate.
That's it! You're ore now generates and you can put as many for statements as you want into GenerateSurcface(). Your final mod_CamelOre:
package net.minecraft.src;
public class mod_CamelOre extends BaseMod
{
public static final Block oreTitanium = new CamelOreBlockOre(123, ModLoader.addOverride("/terrain.png", "/CamelMod/CamelOre/terrain/titaniumore.png")).setHardness(3F).setResistanc
e(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreTitanium"
);
public static final Item ingotTitanium = (new CamelOreItem(127)).setIconIndex(ModLoader.addOverride("/gui/items.png",
"/CamelMod/CamelOre/gui/items/titaniumingot.png").setItemName("ingotTitanium&q
uot;);
public mod_CamelOre()
{
}
public void load()
{
ModLoader.RegisterBlock(oreTitanium);
ModLoader.AddName(oreTitanium, "Titanium Ore");
ModLoader.AddName(ingotTitanium, "Titanium Ingot");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int l = 0; l < 5; l++)
{
int i1 = chunkX + rand.nextInt(16);
int j1 = rand.nextInt(20);
int k1 = chunkZ + rand.nextInt(16);
(new WorldGenMinable(oreTitanium.blockID, 3)).generate(world, rand, i1, j1, k1);
}
}
public String getVersion()
{
return "1.0.0";
}
}
Final Code
package net.minecraft.src;
public class mod_CamelOre extends BaseMod
{
public static final Block oreTitanium = new CamelOreBlockOre(123, ModLoader.addOverride("/terrain.png", "/CamelMod/CamelOre/terrain/titaniumore.png")).setHardness(3F).setResistanc
e(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreTitanium"
);
public static final Item ingotTitanium = (new CamelOreItem(127)).setIconIndex(ModLoader.addOverride("/gui/items.png",
"/CamelMod/CamelOre/gui/items/titaniumingot.png").setItemName("ingotTitanium&q
uot;);
public mod_CamelOre()
{
}
public void load()
{
ModLoader.RegisterBlock(oreTitanium);
ModLoader.AddName(oreTitanium, "Titanium Ore");
ModLoader.AddName(ingotTitanium, "Titanium Ingot");
}
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int l = 0; l < 5; l++)
{
int i1 = chunkX + rand.nextInt(16);
int j1 = rand.nextInt(20);
int k1 = chunkZ + rand.nextInt(16);
(new WorldGenMinable(oreTitanium.blockID, 3)).generate(world, rand, i1, j1, k1);
}
}
public String getVersion()
{
return "1.0.0";
}
}
The Credit For This Tutorial Goes To -
Methuselah96
Thanks Guys! Next Tutorial Will Be Great Stay Tuned!
Ratings
Comments
AnthemicsPosted:
Wheeler-Dealers Is This For Xbox?
:3
Nope xbox version does not support mod's and tbh i am not sure it ever will, so this is only for pc.
ConsolePosted:
EvenConsoleEven or you guys can look at my thread on this...
http://www.thetechgame.com/Forums/t=2606565/modloader-modding-tutorials-block-food-ore-generation.html
it has way more information on minecraft modding
Hey the thing is i am not trying to compete with you i post these so people get help thats cool if you want to help.
Oh ok, had someone steal my tutorials before and post them here so I kinda skeptical when I see a minecraft modding tutorial in the tutorials section.
I would never steal a tutorial from someone if i was to post someones tutorial here i would have asked for permission and if i got permission i would at least gave credit. :)
OdinPosted:
ConsoleEven or you guys can look at my thread on this...
http://www.thetechgame.com/Forums/t=2606565/modloader-modding-tutorials-block-food-ore-generation.html
it has way more information on minecraft modding
Hey the thing is i am not trying to compete with you i post these so people get help thats cool if you want to help.
Oh ok, had someone steal my tutorials before and post them here so I kinda skeptical when I see a minecraft modding tutorial in the tutorials section.
ConsolePosted:
Even or you guys can look at my thread on this...
http://www.thetechgame.com/Forums/t=2606565/modloader-modding-tutorials-block-food-ore-generation.html
it has way more information on minecraft modding
Hey the thing is i am not trying to compete with you i post these so people get help thats cool if you want to help.
OdinPosted:
or you guys can look at my thread on this...
http://www.thetechgame.com/Forums/t=2606565/modloader-modding-tutorials-block-food-ore-generation.html
it has way more information on minecraft modding
http://www.thetechgame.com/Forums/t=2606565/modloader-modding-tutorials-block-food-ore-generation.html
it has way more information on minecraft modding
Related Tutorials
- 01. Emulating Xbox 360 on PC for Running COD4 With Mods(3,492)
- 02. How to: Matrix Numbers | Batch File(1,903)
- 03. How to Password Protect Files on Windows(857)
- 04. How to play Socom 2/3/ and Combined Assault on PC(6,715)
- 05. Modern Warfare 2 Vac Ban Bypass Tutorial(6,133)
- 06. How to embed an image on TheTechGame(3,098)
- 07. [PC] NIOH 2 OTHER USER SAVE RESIGN(12,981)
- 08. Host bot lobbies! Full Tutorial!(11,241)
- 09. Unban yourself [Plutonium BO2](14,240)
- 10. Fall Guys - How to Change Your Name Color on Fall Guys(8,385)
- 11. Best Crosshair Settings for Valorant(6,525)
- 12. Othercide The Surgeon Boss Guide(2,539)
- 13. Othercide Remembrances Unlock Guide(4,460)
- 14. Othercide Beginners Tips and Tricks(2,708)
- 15. How to Fix Grounded Crashes, Loading Time, Low FPS and Other(4,845)
"[ Minecraft ] How To Make A Ore Generate! [ Any I Think ]" :: Login/Create an Account :: 6 comments