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

So im trying to use the forge configuration, and to me everything looks right, and the client starts up fine, but when i enter a saved game or even a new game the client just goes to the building terrain page but with no writing, and uses 4gb+ ram, and i have to end the process. It doesent give an error code or anything.

 

 

this is my industriouspower.java file:

 

package rulerxx.industriouspower;

 

import net.minecraft.src.Block;

import net.minecraft.src.CreativeTabs;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.Instance;

import net.minecraft.src.Item;

import cpw.mods.fml.common.Mod.PostInit;

import cpw.mods.fml.common.Mod.PreInit;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraftforge.common.Configuration;

 

@Mod(modid="industriouspower", name="IndustriousPower", version="alpha-1.0.0")

@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class industriouspower {

@Instance

public static industriouspower instance;

 

@SidedProxy(clientSide="rulerxx.industriouspower.client.ClientProxy", serverSide="rulerxx.industriouspower.CommonProxy")

public static CommonProxy proxy;

 

public static int oreCopperBlockID;

 

 

//items

private final static Item itemSwordSteel = new itemSwordSteel(5000);

private final static Item itemIngotCopper = new itemIngotCopper(5001);

 

//blocks

public static final Block oreCopper = new oreCopper(oreCopperBlockID, 0);

 

 

        @PreInit

        public void preInit(FMLPreInitializationEvent event) {

                Configuration config = new Configuration(event.getSuggestedConfigurationFile());

 

                config.load();

 

                oreCopperBlockID = config.getOrCreateBlockIdProperty("Block Id for Copper", 200).getInt();

 

                config.save();

        }

 

@Init

public void load(FMLInitializationEvent event) {

LanguageRegistry.addName(itemIngotCopper, "Copper Ingot");

LanguageRegistry.addName(itemSwordSteel, "Steel Sword");

LanguageRegistry.addName(oreCopper, "Copper Ore");

GameRegistry.registerBlock(oreCopper);

}

 

@PostInit

public void postInit(FMLPostInitializationEvent event) {

// Stub Method

}

 

 

 

 

}

This:

public static final Block oreCopper = new oreCopper(oreCopperBlockID, 0);

Is called before this:

oreCopperBlockID = config.getOrCreateBlockIdProperty("Block Id for Copper", 200).getInt();

So your oreCopperBlockID just has garbage data in it, which will indeed probably mess up minecraft in one way or another.

 

With a config file you have to initiate your blocks and items after you load the config file, so for instance in your init/preinit method, e.g.:

public static Block oreCopper;

@Init
public void load(FMLInitializationEvent event) {
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        config.load();
        oreCopper = new oreCopper(config.getOrCreateBlockIdProperty("Block Id for Copper", 200).getInt(), 0);
        config.save();
}

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.