Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Greetings!

 

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:

mod_BlockLaunchPillar

 

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);

	}



}


}

 

 

MapGenPillar

 

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.

is "mod_BlockLaunchPillar" your main mod file or?

 

Because if so it's lacking a lot of the required stuff for Forge to load it as a mod.

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

  • Author

mod_BlockLaunchPillar is my main.

 

I'm not experienced using forge, sorry  :-\

What do I have to do to get it work?  :-*

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...

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.