Jump to content

Recommended Posts

Posted

:'( Ive looked around all though the fucking Internet and I need Help. Im trying to make a mod and when I type in for world generation switch(world.provider.dimensionId) { It dosent work I get an error so any one with that knowledge of why its doing that please help me

Posted

I'm pretty sure dude you're doing it wrong.

 

Being serious:

1. Code chunk where it happens, preferably with enclosing class and its ancestors.

2. Precise error text.

 

Telepaths brigade is on vacation, ya know.

Posted

package com.muzzafuzza667.Expansion.worldgen;

 

import java.util.Random;

 

import net.minecraft.world.World;

import net.minecraft.world.chunk.IChunkProvider;

import cpw.mods.fml.common.IWorldGenerator;

 

public class ExpansionWorldGen implements IWorldGenerator {

 

 

 

@Override

public void generate(Random arg0, int arg1, int arg2, World arg3,

IChunkProvider arg4, IChunkProvider arg5)

{

 

}

}

 

 

 

 

 

 

Am I doing it wrong?

Posted

2. Precise error text. If you wanna mod, you gonna learn programming. If you wanna learn programming, you gonna describe any issue in details to anyone, especially if you wanna some help. When you see a fire, and you call 911, you're asked where it happens. And the right answer is the precise address, not "Aww! It fires! Near some corner shop! Help!".

 

Check some existing dim-gen mod, like dimension doors. You're gonna read several times more code than you write.

Posted

You are making two mistakes.

a) You are trying to use a variable that is not in scope or has never been defined. In your case, you never define such a variable and no other 'world' is in scope.

b) You need to understand how arguments work, in the declaration you have a list of these: methodName(Type1 formal1, Type1 formal2, ... )

  these formals are local to your method as variable names, the Typen are just specifiers for the type(Class) of each argument,.

 

Also, if you want a world variable, then you need to either define it with: World world or rename the parameter of World type from arg3 to world. Simple as that.

 

That said, go learn how to read & write java.

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

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

Announcements



×
×
  • Create New...

Important Information

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