Jump to content

[1.5] random generation of custom structures


Recommended Posts



I'm getting lots of problems on adding structure to a world. There are only a few tutorials, so its really hard to learn this.

I tried all tutorials I found... sometimes I got errors I couldnt fix but the most times there was just no result.


Here are my classes:



package blocklaunch.islands;

import java.util.Random;

import net.minecraft.world.World;
import net.minecraft.world.gen.structure.MapGenPillar;

public class mod_BlockLaunchPillar {

public void generateSurface(World world, Random rand, int y, int z) 

	for(int a=0; a<90; a++) 

		int RandPosX = y + rand.nextInt(16);
		int RandPosY = rand.nextInt(200);
		int RandPosZ = z + rand.nextInt(16);

		new MapGenPillar().generate(world, rand, RandPosX, RandPosY, RandPosZ);








package net.minecraft.world.gen.structure;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;

public class MapGenPillar extends WorldGenerator

public MapGenPillar() //Don't really know why this is required


public boolean generate(World world, Random rand, int x, int y, int z) 
	/*if(world.getBlockId(x, y, z) != Block.dirt.blockID || world.getBlockId(x, y, z) != 0)  
		return false;

	//Pillar generation
	int block = Block.blockDiamond.blockID;

	world.func_94575_c(x, y, z, block);
	world.func_94575_c(x, y+1, z, block);
	world.func_94575_c(x, y+2, z, block);
	world.func_94575_c(x, y+3, z, block);
	world.func_94575_c(x, y+4, z, block);
	world.func_94575_c(x, y+5, z, block);
	world.func_94575_c(x, y+6, z, block);
	world.func_94575_c(x, y+7, z, block);
	world.func_94575_c(x, y+8, z, block);
	world.func_94575_c(x, y+9, z, block);
	world.func_94575_c(x, y+10, z, block);

	return true;




If this is completely wrong an example would be nice.

Link to comment
Share on other sites

Ah I see, well since Forge is not ModLoader, you don't need to name the main mod file mod_* anymore :)

Now I'd recommend you first create a regular block, and do some simpler things before you jump right into world gen :)

Actually before anything you need to learn to setup your forge mod's essential files, without these the mod will not even get recognized by forge and thereby nothing will execute which means nothing will happen.


Heres a great place to start for you: http://www.minecraftforge.net/wiki/Basic_Modding

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.