Jump to content

Recommended Posts

Posted

Can not set static com.fire.testmod.MainRegistry field com.fire.testmod.MainRegistry.instance to com.fire.cms.cms

 

What does this mean? I have two mods, com.fire.testmod and com.fire.cms, why would it do this though?

 

Here is my com.fire.testmod.MainRegistry

package com.fire.testmod;

import com.fire.testmod.Block.TestOre;
import com.fire.testmod.Item.TestItem;
import com.fire.testmod.Proxy.CommonProxy;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
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.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

@Mod(modid = Strings.MODID, name = Strings.NAME, version = Strings.VERSION)
public class MainRegistry {

// Proxy
@SidedProxy(clientSide="com.fire.testmod.Proxy.ClientProxy", serverSide="com.fire.testmod.Proxy.CommonProxy")
public static CommonProxy proxy;

// Instance
@Instance
public static MainRegistry instance = new MainRegistry();

//////////////////// -- Names -- ////////////////////
// Items
public static Item TestItem;

// Tools

// Armour

// Blocks
public static Block TestOre;

// Other

@EventHandler
public void PreLoad(FMLPreInitializationEvent event){
	//////////////////// -- Creation -- ////////////////////
	// Items
	TestItem = new TestItem().setUnlocalizedName("TestItem").setTextureName("TestItem").setCreativeTab(CreativeTabs.tabMisc);

	// Tools

	// Armour

	// Blocks
	TestOre = new TestOre(Material.rock).setBlockName("TestOre").setBlockTextureName("TestOre").setCreativeTab(CreativeTabs.tabBlock);

	// Other

	//////////////////// -- Registering -- ////////////////////
	// Items
	GameRegistry.registerItem(TestItem, TestItem.getUnlocalizedName());

	// Tools

	// Armour

	// Blocks
	GameRegistry.registerBlock(TestOre, TestOre.getUnlocalizedName());

	// Other

}

@EventHandler
public void Load(FMLInitializationEvent event){

}

@EventHandler
public void PostLoad(FMLPostInitializationEvent event){

}
}

I am on my journey of making a remake of matmos, as explained here.

Posted

Can not set static com.fire.testmod.MainRegistry field com.fire.testmod.MainRegistry.instance to com.fire.cms.cms

 

What does this mean? I have two mods, com.fire.testmod and com.fire.cms, why would it do this though?

 

Here is my com.fire.testmod.MainRegistry

package com.fire.testmod;

import com.fire.testmod.Block.TestOre;
import com.fire.testmod.Item.TestItem;
import com.fire.testmod.Proxy.CommonProxy;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
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.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

@Mod(modid = Strings.MODID, name = Strings.NAME, version = Strings.VERSION)
public class MainRegistry {

// Proxy
@SidedProxy(clientSide="com.fire.testmod.Proxy.ClientProxy", serverSide="com.fire.testmod.Proxy.CommonProxy")
public static CommonProxy proxy;

// Instance
@Instance
public static MainRegistry instance = new MainRegistry();

//////////////////// -- Names -- ////////////////////
// Items
public static Item TestItem;

// Tools

// Armour

// Blocks
public static Block TestOre;

// Other

@EventHandler
public void PreLoad(FMLPreInitializationEvent event){
	//////////////////// -- Creation -- ////////////////////
	// Items
	TestItem = new TestItem().setUnlocalizedName("TestItem").setTextureName("TestItem").setCreativeTab(CreativeTabs.tabMisc);

	// Tools

	// Armour

	// Blocks
	TestOre = new TestOre(Material.rock).setBlockName("TestOre").setBlockTextureName("TestOre").setCreativeTab(CreativeTabs.tabBlock);

	// Other

	//////////////////// -- Registering -- ////////////////////
	// Items
	GameRegistry.registerItem(TestItem, TestItem.getUnlocalizedName());

	// Tools

	// Armour

	// Blocks
	GameRegistry.registerBlock(TestOre, TestOre.getUnlocalizedName());

	// Other

}

@EventHandler
public void Load(FMLInitializationEvent event){

}

@EventHandler
public void PostLoad(FMLPostInitializationEvent event){

}
}

I am on my journey of making a remake of matmos, as explained here.

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.