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

:'( 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

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.

  • Author

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?

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.

Can you post a screenshot if the switch statement with the error?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

That is VERY basic java, almost the first thing you learn. It's called renaming parameters.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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

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.