Jump to content

Recommended Posts

Posted

Hey everyone!

 

I am adding custom achievements to a mod. I have created the achievements and they are unlocking. But there is a small problem...

 

First of all, the game starts up perfectly. If I unlock the achievement and restart the game, it crashes on startup.

 

2014-04-23 19:10:41 [iNFO] [sTDOUT] ---- Minecraft Crash Report ----
2014-04-23 19:10:41 [iNFO] [sTDOUT] // Hi. I'm Minecraft, and I'm a crashaholic.
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] Time: 4/23/14 7:10 PM
2014-04-23 19:10:41 [iNFO] [sTDOUT] Description: Initializing game
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] java.lang.RuntimeException: Duplicate stat id: "Unknown stat" and "achievement.exchicken.buildLauncher" at id 5244883
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.stats.StatBase.registerStat(StatBase.java:58)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.stats.Achievement.registerAchievement(Achievement.java:116)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at assets.exchicken.common.ExplosiveChickens.init(ExplosiveChickens.java:128)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:509)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.run(Minecraft.java:808)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
2014-04-23 19:10:41 [iNFO] [sTDOUT] ---------------------------------------------------------------------------------------
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] -- Head --
2014-04-23 19:10:41 [iNFO] [sTDOUT] Stacktrace:
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.stats.StatBase.registerStat(StatBase.java:58)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.stats.Achievement.registerAchievement(Achievement.java:116)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at assets.exchicken.common.ExplosiveChickens.init(ExplosiveChickens.java:128)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:509)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] -- Initialization --
2014-04-23 19:10:41 [iNFO] [sTDOUT] Details:
2014-04-23 19:10:41 [iNFO] [sTDOUT] Stacktrace:
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.run(Minecraft.java:808)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Method.java:597)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 
2014-04-23 19:10:41 [iNFO] [sTDOUT] -- System Details --
2014-04-23 19:10:41 [iNFO] [sTDOUT] Details:
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Minecraft Version: 1.6.4
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Operating System: Mac OS X (x86_64) version 10.9.2
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Java Version: 1.6.0_65, Apple Inc.
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Memory: 980354536 bytes (934 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Suspicious classes: FML and Forge are installed
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 4 mods loaded, 4 mods active
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Romejanic.ExplosiveChickens{1.6} [Explosive Chickens] (bin) Unloaded->Constructed->Pre-initialized->Errored
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Launched Version: 1.6
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	LWJGL: 2.9.0
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	OpenGL: AMD Radeon HD 6970M OpenGL Engine GL version 2.1 ATI-1.20.11, ATI Technologies Inc.
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Is Modded: Definitely; Client brand changed to 'fml,forge'
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Type: Client (map_client.txt)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Resource Pack: Default
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Current Language: English (US)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Profiler Position: N/A (disabled)
2014-04-23 19:10:41 [iNFO] [sTDOUT] 	Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
2014-04-23 19:10:41 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# /Users/jammer365/Desktop/Explosive Chickens/workspaces/1.6.4/mcp/jars/./crash-reports/crash-2014-04-23_19.10.41-client.txt

 

Here's my config file with the IDs

 

package assets.exchicken.common.core;

import java.io.File;

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;

import net.minecraftforge.common.Configuration;

public class ConfigHandler {

public int entity1ID;
public int entity2ID;
public int entity3ID;

public int trickEggID;
public int launcherID;
public int trickChickenRawID;
public int trickChickenCookedID;

public int eatChickenID;
public int throwEggID;
public int buildLauncherID;
public int directHitID;

public boolean useAdvancedSkin = true;
public boolean useLauncherModel = true;
public boolean allowChainReactions = true;

public ConfigHandler(File targetFile) {

	final String itemIDs = "Item IDs";
	final String achievementIDs = "Achievement IDs";
	final String entityIDs = "Entity IDs";
	final String set = "Mod Settings";

	Side side = FMLCommonHandler.instance().getEffectiveSide();

	Configuration config = new Configuration(targetFile);

	config.load();

	config.addCustomCategoryComment(entityIDs, "The IDs for mobs and other entities in the mod");
	config.addCustomCategoryComment(set, "Certain user-defined controls of how the mod operates");
	config.addCustomCategoryComment(itemIDs, "The IDs for items in the mod");
	config.addCustomCategoryComment(achievementIDs, "The in-code IDs for every echievement in the mod");

	entity1ID = config.get(entityIDs, "Explosive Chicken Mob", 101).getInt();
	entity2ID = config.get(entityIDs, "Launched Explosive Chicken Entity", 102).getInt();
	entity3ID = config.get(entityIDs, "Explosive Chicken Pet", 103).getInt();

	trickEggID = config.get(itemIDs, "Trick Egg (Egg)", 530).getInt();
	launcherID = config.get(itemIDs, "Chicken Launcher", 531).getInt();
	trickChickenRawID = config.get(itemIDs, "Trick Chicken Raw", 532).getInt();
	trickChickenCookedID = config.get(itemIDs, "Trick Chicken Cooked", 533).getInt();

                // here are the achievement IDs
	throwEggID = config.get(achievementIDs, "Throw Egg ID", 2001).getInt();
	eatChickenID = config.get(achievementIDs, "Eat Chicken ID", 2002).getInt();
	buildLauncherID = config.get(achievementIDs, "Build Launcher ID", 2003).getInt();
	directHitID = config.get(achievementIDs, "Direct Hit ID", 2004).getInt();

	if(side == side.CLIENT) {

		useAdvancedSkin = config.get(set, "Advanced Chicken Texture", true, "Does the chicken mob use the advanced skin rendering?").getBoolean(true);
		useLauncherModel = config.get(set, "Handheld Launcher Model", true, "Does the explosive chicken launcher have a custom handheld model?").getBoolean(true);

	}

	allowChainReactions = config.get(set, "Allow Chain Reactions", true, "When a chicken explodes, will it cause a chain reaction with other chickens?\nIf you have a slow computer, i would recommend turning this off!").getBoolean(true);

	config.save();

}

}

 

Here's my main class

package assets.exchicken.common;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;

import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.logging.ILogAgent;
import net.minecraft.logging.LogAgent;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.MinecraftForge;
import assets.exchicken.common.core.CommonProxy;
import assets.exchicken.common.core.ConfigHandler;
import assets.exchicken.common.core.CraftingHandler;
import assets.exchicken.common.core.EventListener;
import assets.exchicken.common.entity.EntityChickenFired;
import assets.exchicken.common.entity.EntityExplosiveChicken;
import assets.exchicken.common.item.ItemFoodExplosive;
import assets.exchicken.common.item.ItemLauncher;
import assets.exchicken.common.item.ItemTrickEgg;
import assets.exchicken.common.network.ConnectionHandler;
import cpw.mods.fml.common.FMLCommonHandler;
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.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;

@Mod(modid="Romejanic.ExplosiveChickens", name="Explosive Chickens", version=ExplosiveChickens.currentVersion)
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class ExplosiveChickens {

public static final String currentVersion = "1.6";

public Item trickEgg;
public Item launcher;

public Item trickChickenRaw;
public Item trickChickenCooked;

public Achievement throwEgg;
public Achievement eatChicken;
public Achievement buildLauncher;
public Achievement directHit;

public File workingDirectory = new File(new File(".", "romejanic"), "Explosive Chickens");
public ConfigHandler config;
private ILogAgent logAgent;

public final String updateURL = "https://dl.dropboxusercontent.com/s/fqnx8u5scbhxp6s/UpToDate.txt?dl=1&token_hash=AAF0_aIbX-m76ip3Hz1VFN2iVUt5zLgESRkphoGMBBO-Tw";
public boolean checkedForUpdates = false;
public boolean updateAvaliable = false;

@Instance
public static ExplosiveChickens instance;

@SidedProxy(clientSide="assets.exchicken.client.core.ClientProxy", serverSide="assets.exchicken.common.core.CommonProxy")
public static CommonProxy proxy;

@EventHandler
public void preInit(FMLPreInitializationEvent event) {

	File romejanicFolder = new File(".", "romejanic");

	if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {

		romejanicFolder = new File(Minecraft.getMinecraft().mcDataDir, "romejanic");

		workingDirectory = new File(romejanicFolder, "Explosive Chickens");

	}

	if(!workingDirectory.exists()) {

		workingDirectory.mkdirs();

	}

	File configFile = new File(workingDirectory, "config.txt");

	if(new File(romejanicFolder, "Explosive Chickens.txt").exists()) {

		try {

			FileUtils.writeStringToFile(new File(romejanicFolder, "Explosive Chickens.txt"), "KEEP READING! IT IS IMPORTANT!\n\nSince the mod's update in 1.6.4, the config file has moved to:\n\n" + configFile + "\n\nThanks and sorry for any inconveniences!");

		} catch (IOException e) {

		}

	}

	config = new ConfigHandler(configFile);

	logAgent = new LogAgent("EXCHICKENS", " - Explosive Chickens by Romejanic", new File(workingDirectory, "output.log").getAbsolutePath());

}

@EventHandler
public void init(FMLInitializationEvent event) {

	getLogger().logInfo("Setting up the mod!");

	proxy.registerLang();

	trickEgg = new ItemTrickEgg(config.trickEggID).setUnlocalizedName("romejanic.trickegg");
	launcher = new ItemLauncher(config.launcherID).setUnlocalizedName("romejanic.chicklauncher");

	trickChickenRaw = new ItemFoodExplosive(config.trickChickenRawID, (ItemFood) Item.chickenRaw).setUnlocalizedName("romejanic.chickenraw");
	trickChickenCooked = new ItemFoodExplosive(config.trickChickenCookedID, (ItemFood) Item.chickenCooked).setUnlocalizedName("romejanic.chickencooked");

                // here's where the achievements are registered
	throwEgg = new Achievement(config.throwEggID, "exchicken.throwEgg", 3, -4, Item.egg, (Achievement)null).setIndependent().registerAchievement();
	eatChicken = new Achievement(config.eatChickenID, "exchicken.eatChicken", 4, -4, Item.chickenRaw, throwEgg).registerAchievement();
	buildLauncher = new Achievement(config.buildLauncherID, "exchicken.buildLauncher", 3, -5, launcher, AchievementList.buildWorkBench).registerAchievement();
	directHit = new Achievement(config.directHitID, "exchicken.directHit", 4, -5, Item.bow, buildLauncher).setSpecial().registerAchievement();

	EntityRegistry.registerGlobalEntityID(EntityExplosiveChicken.class, "romejanic.exchick", config.entity1ID, 0xcccccc, 0xff3300);
	EntityRegistry.registerGlobalEntityID(EntityChickenFired.class, "romejanic.firedchicken", config.entity2ID);
	EntityRegistry.addSpawn(EntityExplosiveChicken.class, 10, 1, 1000, EnumCreatureType.creature, BiomeGenBase.beach, BiomeGenBase.extremeHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.forest, BiomeGenBase.plains, BiomeGenBase.taiga);

	GameRegistry.addRecipe(new ItemStack(launcher, 1), "SFS", "SIS", "SRS", 'S', Block.stone, 'F', Item.flint, 'I', Item.ingotIron, 'R', Item.redstone);
	GameRegistry.addSmelting(trickChickenRaw.itemID, new ItemStack(trickChickenCooked, 1), 100);
	GameRegistry.registerCraftingHandler(new CraftingHandler());

	NetworkRegistry.instance().registerConnectionHandler(new ConnectionHandler());
	MinecraftForge.EVENT_BUS.register(new EventListener());
	proxy.registerRenderers();

	getLogger().logInfo("Finished setting up!");

}

public ILogAgent getLogger() {

	if(logAgent == null) {

		logAgent = new LogAgent("EXCHICKENS", " - Explosive Chickens by Romejanic", new File(workingDirectory, "output.log").getAbsolutePath());

	}

	return logAgent;

}

}

 

If anyone can help me out, thank you so much! From what I understand, it think's i am registering under an ID that is already taken, although I am not.

 

Thanks!

Romejanic

Romejanic

 

Creator of Witch Hats, Explosive Chickens and Battlefield!

Posted

Hi

 

I'd suggest you put a breakpoint here

 

at net.minecraft.stats.StatBase.registerStat()

 

and keep pressing continue until you find the call which registers 5244883 "unknown stat".  Trace back out and see what it registering it.

 

My guess is that  you've somehow registered twice on the same ID, once with a blank name.

 

-TGG

 

Posted

Can I just say, I've had the same issue too, except it also happens when I only register a single achievement. Exactly the same duplicate ID issue as this. Never did find a fix :/

Posted

For some stupid reason, Minecraft auto register unnamed achievements for triggered stat, before you can register it.

In 1.6.4, get the achievement from the StatList using the id, if it is null, you can register it again, if not, pray it is the achievement you registered from a previous save and use the returned instance.

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.