I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out http://minecraftnoobtest.com/test.php
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out http://minecraftnoobtest.com/test.php
mine spawns ores fine and its easy to use but you have to input a command every time you want a chunk to have ores. Also it takes 2 mins to actually load the ores. It sucks because of the 2 mins part.
var tick=0;
var curX=0;
var curY=0;
var curZ=0;
var cX=0;
var cY=0;
var cZ=0;
var count=0;
var changeBack=false;
/*
You can change:
The Ore Block (line 22) (You can add more, too)
The high where it start generating the ore (line 186 and line 188)
The function setTile2 (line 164), but this is not important, but, if you want, you can change what for blocks it replace with ore and what for blocks not
Copy - Paste the part where it generates ore (line 180 - ...) for more veines of one ore in one chunk and for other ores
Change the probability to generate one ore-vein (line 181)
*/
try{
Block.defineBlock(220, "Copper Ore", [["copper_ore", 0]], 1, false, 0); //define a block, in this example it should be copper ore
}catch(error){
print("Import the texture pack first!");
}
function modTick(){
tick++;
if(tick%100==0){//every 5 seconds the function doTick() is called
doTick();
}
}
function setTile2(p1, p2, p3, p4, p5){ //This function gives more possibilities to place ore, in this case it only places ore when it destroys Stone for that
if(Level.getTile(p1, p2, p3)==1){ //if there, where the ore should be placed, is stone...
Level.setTile(p1, p2, p3, p4, p5);
}
}
function spawnOres(){ //this function spawns your block in one chunk
if(Level.getTile(curX, 1, curZ)!=57){
Level.setTile(curX, 1, curZ, 57, 0);
Level.setTile(curX, 0, curZ, 7, 0);
Level.setTile(curX, 2, curZ, 7, 0);
Level.setTile(curX+1, 1, curZ, 7, 0);
Level.setTile(curX-1, 1, curZ, 7, 0);
Level.setTile(curX, 1, curZ+1, 7, 0);
Level.setTile(curX, 1, curZ-1, 7, 0);
//start generating
//start to generate copper - copy-paste this part (from start to generate copper until end of generating copper (line229)) for more ores or generating one ore twice
if(Math.floor(Math.random()*20)>7){ //probability that the following lines will generate ore
cX=curX;
cZ=curZ;
cX=cX+Math.floor(Math.random()*10)+2; //random X
cZ=cZ+Math.floor(Math.random()*10)+2; //random Z
cY=255; //highest posible height
while(Level.getTile(cX, cY, cZ)==0){ //lower the y-coordinate until a block is at cX, cY, cZ
cY--;
}
cY++; //these line is necessary to spawn a block above the first non-air-block
if(Level.getTile(cX, cY, cZ)!=8 && Level.getTile(cX, cY, cZ)!=9 && Level.getTile(cX, cY, cZ)!=10 && Level.getTile(cX, cY, cZ)!=11){//don`t spawn above water or lava
setTile2(cX, cY, cZ, 220, 0); //220 is the Id of the block
}
}
//end of generating a block
//end of generating ores
}
//
}
I didn`t tested this, put it should give you at least an idea.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
NO MORE ERRORS, But Ores Dont Generate, I Tried everything but only vanilla ores
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAre you sure? In flat world ores shouldn´t generate, maybe you didn´t searched enough.
this is why i use my own method of spawning ore
This google+ is what ill comment on vids on
My Google+
My YouTube Is ‹ HungryBoy02 › My Blog Is The Obsidian Sword
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out
http://minecraftnoobtest.com/test.php
I have my own too but it spawns Only 1 Ore In A Vein/ Do Ur Ores Spawn In Veins, can I Use It?
mine is for an extremely rare ore... but i could modify it i guess... i will think about releasing it.
This google+ is what ill comment on vids on
My Google+
My YouTube Is ‹ HungryBoy02 › My Blog Is The Obsidian Sword
I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
To take the test, check out
http://minecraftnoobtest.com/test.php
My Ores Have Tiers And Im Releasing Tons Of Them, Thats Why I Need Great Ore Gen That Spawns Veins.... Hope Ull Modify It
The template isnt working for me no errors just no ores
Yeah Same With Me
Im just using a very old method that sucks in my mod and im also making a new way of getting ores.
i have oregen but it spawns only 1 ore vein and thats horrible
mine spawns ores fine and its easy to use but you have to input a command every time you want a chunk to have ores. Also it takes 2 mins to actually load the ores. It sucks because of the 2 mins part.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI fixed the problem of getting an error because of setTile2().
I tested it again and it generates ores. They are just rare.
Can we make them common if we wanted to?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes, you can change in line 181 the if-statement
if(Math.floor(Math.random()*20)>7){
to something like
if(4>3){
or replace it with a loop.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumWhen ore is generated this code places a diamond-block (protected with bedrock) to prevent generating ore twice.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYes.
Is there any way to make it spawn on a floor, instead of in a wall like a Lucky Block would?
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumvar tick=0;
var curX=0;
var curY=0;
var curZ=0;
var cX=0;
var cY=0;
var cZ=0;
var count=0;
var changeBack=false;
/*
You can change:
The Ore Block (line 22) (You can add more, too)
The high where it start generating the ore (line 186 and line 188)
The function setTile2 (line 164), but this is not important, but, if you want, you can change what for blocks it replace with ore and what for blocks not
Copy - Paste the part where it generates ore (line 180 - ...) for more veines of one ore in one chunk and for other ores
Change the probability to generate one ore-vein (line 181)
*/
try{
Block.defineBlock(220, "Copper Ore", [["copper_ore", 0]], 1, false, 0); //define a block, in this example it should be copper ore
}catch(error){
print("Import the texture pack first!");
}
function modTick(){
tick++;
if(tick%100==0){//every 5 seconds the function doTick() is called
doTick();
}
}
function doTick(){
if(Player.getDimension()==DimensionId.NORMAL){ //only generate in the normal dimension, not in the Nether
curX=Math.floor(Player.getX());
curZ=Math.floor(Player.getZ());
for(var i=0; i<16; i++){
if(curX<0){
changeBack=true;
curX=curX*(-1);
}
if(curX%16!=0){
curX--;
}
if(changeBack){
curX=curX*(-1);
}
changeBack=false;
if(curZ<0){
changeBack=true;
curZ=curZ*(-1);
}
if(curZ%16!=0){
curZ--;
}
if(changeBack){
curZ=curZ*(-1);
}
changeBack=false;
}
curX++;
curZ++;
spawnOres();
curX=curX+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curZ=curZ+16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curX=curX-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curZ=curZ-16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
curX=curX+16;
spawnOres();
}
}
function setTile2(p1, p2, p3, p4, p5){ //This function gives more possibilities to place ore, in this case it only places ore when it destroys Stone for that
if(Level.getTile(p1, p2, p3)==1){ //if there, where the ore should be placed, is stone...
Level.setTile(p1, p2, p3, p4, p5);
}
}
function spawnOres(){ //this function spawns your block in one chunk
if(Level.getTile(curX, 1, curZ)!=57){
Level.setTile(curX, 1, curZ, 57, 0);
Level.setTile(curX, 0, curZ, 7, 0);
Level.setTile(curX, 2, curZ, 7, 0);
Level.setTile(curX+1, 1, curZ, 7, 0);
Level.setTile(curX-1, 1, curZ, 7, 0);
Level.setTile(curX, 1, curZ+1, 7, 0);
Level.setTile(curX, 1, curZ-1, 7, 0);
//start generating
//start to generate copper - copy-paste this part (from start to generate copper until end of generating copper (line229)) for more ores or generating one ore twice
if(Math.floor(Math.random()*20)>7){ //probability that the following lines will generate ore
cX=curX;
cZ=curZ;
cX=cX+Math.floor(Math.random()*10)+2; //random X
cZ=cZ+Math.floor(Math.random()*10)+2; //random Z
cY=255; //highest posible height
while(Level.getTile(cX, cY, cZ)==0){ //lower the y-coordinate until a block is at cX, cY, cZ
cY--;
}
cY++; //these line is necessary to spawn a block above the first non-air-block
if(Level.getTile(cX, cY, cZ)!=8 && Level.getTile(cX, cY, cZ)!=9 && Level.getTile(cX, cY, cZ)!=10 && Level.getTile(cX, cY, cZ)!=11){//don`t spawn above water or lava
setTile2(cX, cY, cZ, 220, 0); //220 is the Id of the block
}
}
//end of generating a block
//end of generating ores
}
//
}
I didn`t tested this, put it should give you at least an idea.