Jump to content

2 Mods in 1 Workspace?


TLHPoE

Recommended Posts

I crash whenever I try loading the client. I'm currently working on 2 mods in my workspace.

 

Crashlog:

 

 

---- Minecraft Crash Report ----

// Don't be sad, have a hug! <3

 

Time: 2/1/14 8:53 PM

Description: Initializing game

 

java.lang.IllegalArgumentException: Can not set static tlhpoe.simplemachines.SimpleMachines field tlhpoe.simplemachines.SimpleMachines.instance to net.rpg.RPG

at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)

at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)

at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)

at java.lang.reflect.Field.set(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:430)

at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:361)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:516)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:487)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:561)

at net.minecraft.client.Minecraft.run(Minecraft.java:928)

at net.minecraft.client.main.Main.main(Main.java:112)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)

at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)

at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)

at java.lang.reflect.Field.set(Unknown Source)

at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:430)

at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:361)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:516)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:487)

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:194)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:561)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:928)

at net.minecraft.client.main.Main.main(Main.java:112)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_17, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 192730472 bytes (183 MB) / 375390208 bytes (358 MB) up to 1890254848 bytes (1802 MB)

JVM Flags: 0 total;

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.01-pre FML v7.2.109.1021 Minecraft Forge 10.12.0.1021 5 mods loaded, 5 mods active

mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML{7.2.109.1021} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.1021.jar) Unloaded->Constructed

Forge{10.12.0.1021} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.1021.jar) Unloaded->Constructed

rpg{1.0} [RPG] (bin) Unloaded->Errored

simplemachines{1.7.2-1.0} [simple Machines] (bin) Unloaded->Constructed

Launched Version: 1.6

LWJGL: 2.9.0

OpenGL: GeForce GT 520/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: ~~ERROR~~ NullPointerException: null

Profiler Position: N/A (disabled)

Vec3 Pool Size: ~~ERROR~~ NullPointerException: null

Anisotropic Filtering: Off (1)

 

 

Kain

Link to comment
Share on other sites

[me=Draco18s]sees no code.  Shrugs and leaves.[/me]

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Here's one mod's code:

package net.rpg;

import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.entity.player.EntityPlayer;
import net.rpg.handler.PacketHandler;
import net.rpg.helper.DataHelper;
import net.rpg.network.PacketOpenGui;
import net.rpg.network.PacketRace;
import net.rpg.network.PacketRequestStats;
import net.rpg.network.PacketStatsToClient;
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.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION)
public class RPG {
@Instance(Reference.MOD_ID)
public static RPG instance;
@SidedProxy(clientSide = Reference.CLIENT_PROXY, serverSide = Reference.SERVER_PROXY)
public static ServerProxy proxy;
public static final PacketHandler packetHandler = new PacketHandler();

@EventHandler
public void preInit(FMLPreInitializationEvent e) {
	proxy.doServer();
	proxy.doClient();
}

@EventHandler
public void init(FMLInitializationEvent e) {
	packetHandler.init();
}

@EventHandler
public void postInit(FMLPostInitializationEvent e) {
	packetHandler.registerPacket(PacketStatsToClient.class);
	packetHandler.registerPacket(PacketRequestStats.class);
	packetHandler.registerPacket(PacketRace.class);
	packetHandler.registerPacket(PacketOpenGui.class);
	packetHandler.postInit();
}

@SideOnly(Side.CLIENT)
public static int race = -1, maxHp, de, maxDe, credits, attack, defense;

public static void applyStats(EntityPlayer player) {
	final AttributeModifier health = new AttributeModifier(player.getPersistentID(), "rpg_health", (((double) DataHelper.getMaxHp(player)) / 10) - 1, 1);
	IAttributeInstance iai = player.getEntityAttribute(SharedMonsterAttributes.maxHealth);
	if(iai.getModifier(health.getID()) == null) {
		iai.applyModifier(health);
	} else {
		iai.removeModifier(health);
		iai.applyModifier(health);
	}
}
}

 

And here's another one:

package tlhpoe.simplemachines;

import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import tlhpoe.simplemachines.block.BlockGrinder;
import tlhpoe.simplemachines.gui.GuiHandler;
import tlhpoe.simplemachines.tileentity.TileEntityGrinder;
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.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = "simplemachines", name = "Simple Machines", version = "1.7.2-1.0")
public class SimpleMachines {
@Instance
public static SimpleMachines instance;

@EventHandler
public static void preInit(FMLPreInitializationEvent event) {
	NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
	GameRegistry.registerTileEntity(TileEntityGrinder.class, "grinder");
	////////////////////////////////////////////////////////////////////////////////////////
	registerItem(ironDust, "ironDust");
	registerItem(goldDust, "goldDust");
	////////////////////////////////////////////////////////////////////////////////////////
	registerBlock(grinder, "grinder");
	////////////////////////////////////////////////////////////////////////////////////////
	GameRegistry.addShapedRecipe(new ItemStack(grinder), "BBB", "B B", "BBB", 'B', Blocks.stone);
	////////////////////////////////////////////////////////////////////////////////////////
	GameRegistry.addSmelting(ironDust, new ItemStack(Items.iron_ingot), 0);
	GameRegistry.addSmelting(goldDust, new ItemStack(Items.gold_ingot), 0);
}

private static void registerItem(Item i, String n) {
	i.setCreativeTab(tabItem);
	i.setUnlocalizedName(n);
	i.setTextureName("simplemachines:" + n);
	GameRegistry.registerItem(i, n);
}

private static void registerBlock(Block b, String n) {
	b.func_149647_a(tabBlock);
	b.func_149663_c(n);
	GameRegistry.registerBlock(b, n);
}

public static Item ironDust = new Item();
public static Item goldDust = new Item();
////////////////////////////////////////////////////////////////////////////////////////
public static BlockGrinder grinder = new BlockGrinder();
////////////////////////////////////////////////////////////////////////////////////////
public static final CreativeTabs tabItem = new CreativeTabs("simplemachinesItems") {
	@Override
	public Item getTabIconItem() {
		return ironDust;
	}
};
public static final CreativeTabs tabBlock = new CreativeTabs("simplemachinesBlocks") {
	@Override
	public Item getTabIconItem() {
		return Item.func_150898_a(grinder);
	}
};
}

 

Here's the code for the Reference class:

package net.rpg;

import java.util.Random;

public class Reference {
public static final String MOD_ID = "rpg";
public static final String MOD_NAME = "RPG";
public static final String MOD_VERSION = "1.0";
public static final String CLIENT_PROXY = "net.rpg.ClientProxy";
public static final String SERVER_PROXY = "net.rpg.ServerProxy";
public static final String RESOURCE_PREFIX = "RPG:";
public static final String[] RACES = { "Steve", "Villager", "Zombie Pigman", "Cyclops", "Plankling", "Catmen", "Galroid", "Boheimite", "Cori", "Glacon", "Frost Archer" };
public static final Random RANDOM = new Random();

public static String translateRace(int race) {
	return RACES[race];
}

public static int translateRace(String race) {
	for(int i = 0; i < RACES.length; i++) {
		if(RACES[i].equals(race)) {
			return i;
		}
	}
	return -1;
}
}

Kain

Link to comment
Share on other sites

I don't know.  It's trying to set the instance of the one mod to the other mod's instance.

 

You should probably set both mods up the same (one's using a bunch of strings in its own class, the other is using references from a third class).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

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.