Jump to content

Client Proxy crash server...


MikeDark

Recommended Posts

Good afternoon, I'm having some problems with creating server using my mod, it happens that the server attempts to load the TileEntitySpecialRenderer of the Clientproxy resulting in a crash, do not know why this is happening and would like to ask your help...

 

My Main Class

 

package mike.scoutcraft.main;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import mike.scoutcraft.achievement.SCConquistas;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.craft.CraftingHandler;
import mike.scoutcraft.craft.DropDaGrama;
import mike.scoutcraft.craft.FuelHandler;
import mike.scoutcraft.craft.ReceitasCraftTable;
import mike.scoutcraft.craft.ReceitasFornalha;
import mike.scoutcraft.handler.LivingEventHandler;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.lib.Strings;
import mike.scoutcraft.proxy.Client;
import mike.scoutcraft.proxy.CommonProxy;
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.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.SideOnly;

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

@Instance(Strings.MODID)
public static ScoutCraft Instance;

@SidedProxy(clientSide = mike.scoutcraft.lib.Strings.CLIENT, serverSide = mike.scoutcraft.lib.Strings.COMMONPROXY)	
public static CommonProxy proxy;	

public static final int GuiIdFogueira = 0;

public static Achievement QuebrandoCoisas;
public static Achievement VamosEsquentar;
public static Achievement PoFacil;
public static Achievement FazerFogueira;
public static Achievement TochasPassado;

private static Configuration configuration;
public static int lightRange;
public static int targetLightValue;
public static int handLightValue;
public static int lightInterval;
public static int serverLightInterval;

public static CreativeTabs scoutcraft = new CreativeTabs("ScoutCraft") {

	public Item getTabIconItem() {			
		return SCItems.InicializadorDeChamas;
	}
};

@EventHandler
public static void preLoad(FMLPreInitializationEvent event)
{		
	configuration = new Configuration(event.getSuggestedConfigurationFile());
    configuration.load();
    lightRange = configuration.get("config", "Range/Distancia", 20).getInt();
    targetLightValue = configuration.get("config", "Target Light/Alvo Da Luz", 15).getInt();
    handLightValue = configuration.get("config", "Hand Light/Luz Emitida", .getInt();
    lightInterval = configuration.get("config", "Light Interval/Intervalo Da Luz", 1).getInt();
    serverLightInterval = configuration.get("config", "Server Light Interval/Intervalo Da Luz Em Servidor", 5).getInt();
    configuration.save();
    lightRange = lightRange > 40 ? 40 : (lightRange < 0 ? 0 : lightRange);
        targetLightValue = targetLightValue > 15 ? 15 : (targetLightValue < 0 ? 0 : targetLightValue);
        handLightValue = handLightValue > 15 ? 15 : (handLightValue < 0 ? 0 : handLightValue);		
	        
	SCBlocos.init();
	SCItems.init();
	ReceitasCraftTable.register();
	ReceitasFornalha.register();
	DropDaGrama.Register();
	GameRegistry.registerFuelHandler(new FuelHandler());
	MinecraftForge.EVENT_BUS.register(new CraftingHandler());	
	MinecraftForge.EVENT_BUS.register(new LivingEventHandler());

}

@EventHandler
public static void load(FMLInitializationEvent event)
{
	Client.registerRender();	
	CommonProxy.registerGuiHandler();
	CommonProxy.LanguageRegistry();
	CommonProxy.registerTileEntity();
}

@EventHandler 
public static void postLoad(FMLPostInitializationEvent event)
{

	QuebrandoCoisas = new Achievement("achievement.QuebrandoCoisas", "QuebrandoCoisas", 0, 0, SCItems.MarteloDeMadeira, (Achievement)null).initIndependentStat().registerStat();
	VamosEsquentar = new Achievement("achievement.VamosEsquentar", "VamosEsquentar", 2, 1, SCItems.InicializadorDeChamas, QuebrandoCoisas).registerStat().setSpecial();
	PoFacil = new Achievement("achievement.PoFacil", "PoFacil", 3, 1, SCItems.PoDeCarvao, QuebrandoCoisas).registerStat().setSpecial();
	FazerFogueira = new Achievement("achievement.FazerFogueira", "FazerFogueira", 4, 2, SCBlocos.Fogueira, VamosEsquentar).registerStat().setSpecial();
	TochasPassado = new Achievement("achievement.TochasPassado", "TochasPassado", 5, 3, SCBlocos.Lampiao, PoFacil).registerStat().setSpecial();

	AchievementPage.registerAchievementPage(new AchievementPage("ScoutCraft", new Achievement[]{QuebrandoCoisas, VamosEsquentar, PoFacil, FazerFogueira, TochasPassado}));

}

}

 

My ClientProxy Class

 

package mike.scoutcraft.proxy;

import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.render.ItemRenderFogueira;
import mike.scoutcraft.render.ItemRenderLampiao;
import mike.scoutcraft.render.RenderFogueira;
import mike.scoutcraft.render.RenderLampiao;
import mike.scoutcraft.render.RenderLanternaDesligada;
import mike.scoutcraft.render.RenderLanternaLigada;
import mike.scoutcraft.render.RenderMarteloDeDiamante;
import mike.scoutcraft.render.RenderMarteloDeFerro;
import mike.scoutcraft.render.RenderMarteloDeMadeira;
import mike.scoutcraft.render.RenderMarteloDeOuro;
import mike.scoutcraft.render.RenderMarteloDePedra;
import mike.scoutcraft.render.RenderToco;
import mike.scoutcraft.tileentity.TileEntityFogueira;
import mike.scoutcraft.tileentity.TileEntityLampiao;


public class Client extends CommonProxy
{

public static void registerRender(){	
	TileEntitySpecialRenderer render1 = new RenderFogueira();
	TileEntitySpecialRenderer render2 = new RenderToco();
	TileEntitySpecialRenderer render3 = new RenderLampiao();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFogueira.class, render1);
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLampiao.class, render3);
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.Fogueira), new ItemRenderFogueira(render1, new TileEntityFogueira()));
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.FogueiraAcesa), new ItemRenderFogueira(render1, new TileEntityFogueira()));
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.Lampiao), new ItemRenderLampiao(render3, new TileEntityLampiao()));
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDePedra, (IItemRenderer)new RenderMarteloDePedra());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeMadeira, (IItemRenderer)new RenderMarteloDeMadeira());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeFerro, (IItemRenderer)new RenderMarteloDeFerro());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeOuro, (IItemRenderer)new RenderMarteloDeOuro());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeDiamante, (IItemRenderer)new RenderMarteloDeDiamante());
	MinecraftForgeClient.registerItemRenderer(SCItems.LanternaLigada, (IItemRenderer)new RenderLanternaLigada());
	MinecraftForgeClient.registerItemRenderer(SCItems.LanternaDesligada, (IItemRenderer)new RenderLanternaDesligada());

}
}

 

My CommonProxy Class

 

package mike.scoutcraft.proxy;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.gui.GuiHandler;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.main.ScoutCraft;
import mike.scoutcraft.render.ItemRenderFogueira;
import mike.scoutcraft.render.ItemRenderLampiao;
import mike.scoutcraft.render.RenderFogueira;
import mike.scoutcraft.render.RenderLampiao;
import mike.scoutcraft.render.RenderLanternaDesligada;
import mike.scoutcraft.render.RenderLanternaLigada;
import mike.scoutcraft.render.RenderMarteloDeDiamante;
import mike.scoutcraft.render.RenderMarteloDeFerro;
import mike.scoutcraft.render.RenderMarteloDeMadeira;
import mike.scoutcraft.render.RenderMarteloDeOuro;
import mike.scoutcraft.render.RenderMarteloDePedra;
import mike.scoutcraft.render.RenderToco;
import mike.scoutcraft.tileentity.TileEntityFogueira;
import mike.scoutcraft.tileentity.TileEntityLampiao;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

public class CommonProxy{

public static void registerTileEntity() {

	GameRegistry.registerTileEntity(TileEntityFogueira.class, "Fogueira");
	GameRegistry.registerTileEntity(TileEntityLampiao.class, "Lampiao");

}

public static void registerGuiHandler(){

	NetworkRegistry.INSTANCE.registerGuiHandler(ScoutCraft.Instance, new GuiHandler());

}

public static void LanguageRegistry(){

	LanguageRegistry.instance().addStringLocalization("container.Fogueira", "Fogueira");

}
}

 

Server Crash

 

---- Minecraft Crash Report ----
// My bad.

Time: 26/01/15 13:59
Description: Exception in server tick loop

cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:692)
at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:97)
at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:319)
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:210)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:387)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer
at mike.scoutcraft.main.ScoutCraft.load(ScoutCraft.java:93)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
... 5 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 33 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/tileentity/TileEntitySpecialRenderer for invalid side SERVER
at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:50)
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)
... 35 more


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

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 983136824 bytes (937 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
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.05 FML v7.10.85.1236 Minecraft Forge 10.13.2.1236 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{7.10.85.1236} [Forge Mod Loader] (forgeBin-1.7.10-10.13.2.1236.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{10.13.2.1236} [Minecraft Forge] (forgeBin-1.7.10-10.13.2.1236.jar) Unloaded->Constructed->Pre-initialized->Initialized
scoutcraft{beta 1.2.0} [scoutCraft] (bin) Unloaded->Constructed->Pre-initialized->Errored
Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to 'fml,forge'
Type: Dedicated Server (map_server.txt)

Link to comment
Share on other sites

No, this is not how proxies work. Never ever should you type out "CommonProxy" or "ClientProxy" when calling methods in them. Never should your methods in your proxies be static.

Then only ever interact with the proxy through the @SidedProxy field in your main mod class.

 

I put the @SidedProxy in my main class, directing the strings, that direct the client and the common, I did something wrong?

 

Main Class Part

 

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

@Instance(Strings.MODID)
public static ScoutCraft Instance;

@SidedProxy(clientSide = mike.scoutcraft.lib.Strings.CLIENT, serverSide = mike.scoutcraft.lib.Strings.COMMONPROXY)	
public static CommonProxy proxy;	

 

Strings

 

package mike.scoutcraft.lib;

public class Strings {

public static final String MODID = "scoutcraft";
public static final String VERSION = "beta 1.2.0";
public static final String MODNAME = "ScoutCraft";


public static final String COMMONPROXY = "mike.scoutcraft.proxy.CommonProxy";
public static final String CLIENT = "mike.scoutcraft.proxy.Client";
}

Link to comment
Share on other sites

I removed the image :P,the error changed to the rendererregister of the client, how to solve?

 

Main Class

 

@EventHandler
public static void load(FMLInitializationEvent event)
{
	client.registerRender();
	proxy.registerGuiHandler();
	proxy.LanguageRegistry();
	proxy.registerTileEntity();
}

 

Client

 

package mike.scoutcraft.proxy;

import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.render.ItemRenderFogueira;
import mike.scoutcraft.render.ItemRenderLampiao;
import mike.scoutcraft.render.RenderFogueira;
import mike.scoutcraft.render.RenderLampiao;
import mike.scoutcraft.render.RenderLanternaDesligada;
import mike.scoutcraft.render.RenderLanternaLigada;
import mike.scoutcraft.render.RenderMarteloDeDiamante;
import mike.scoutcraft.render.RenderMarteloDeFerro;
import mike.scoutcraft.render.RenderMarteloDeMadeira;
import mike.scoutcraft.render.RenderMarteloDeOuro;
import mike.scoutcraft.render.RenderMarteloDePedra;
import mike.scoutcraft.render.RenderToco;
import mike.scoutcraft.tileentity.TileEntityFogueira;
import mike.scoutcraft.tileentity.TileEntityLampiao;


public class Client extends CommonProxy
{

public void registerRender(){	
	TileEntitySpecialRenderer render1 = new RenderFogueira();
	TileEntitySpecialRenderer render2 = new RenderToco();
	TileEntitySpecialRenderer render3 = new RenderLampiao();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFogueira.class, render1);
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLampiao.class, render3);
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.Fogueira), new ItemRenderFogueira(render1, new TileEntityFogueira()));
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.FogueiraAcesa), new ItemRenderFogueira(render1, new TileEntityFogueira()));
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.Lampiao), new ItemRenderLampiao(render3, new TileEntityLampiao()));
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDePedra, (IItemRenderer)new RenderMarteloDePedra());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeMadeira, (IItemRenderer)new RenderMarteloDeMadeira());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeFerro, (IItemRenderer)new RenderMarteloDeFerro());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeOuro, (IItemRenderer)new RenderMarteloDeOuro());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeDiamante, (IItemRenderer)new RenderMarteloDeDiamante());
	MinecraftForgeClient.registerItemRenderer(SCItems.LanternaLigada, (IItemRenderer)new RenderLanternaLigada());
	MinecraftForgeClient.registerItemRenderer(SCItems.LanternaDesligada, (IItemRenderer)new RenderLanternaDesligada());

}
}

 

Client e Sever Crash

 

---- Minecraft Crash Report ----
// Oops.

Time: 26/01/15 14:53
Description: Initializing game

java.lang.NullPointerException: Initializing game
at mike.scoutcraft.main.ScoutCraft.load(ScoutCraft.java:94)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:541)
at net.minecraft.client.Minecraft.run(Minecraft.java:867)
at net.minecraft.client.main.Main.main(SourceFile:148)
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:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)


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

-- Head --
Stacktrace:
at mike.scoutcraft.main.ScoutCraft.load(ScoutCraft.java:94)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:541)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:867)
at net.minecraft.client.main.Main.main(SourceFile:148)
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:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 710768576 bytes (677 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
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.05 FML v7.10.85.1236 Minecraft Forge 10.13.2.1236 8 mods loaded, 8 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{7.10.85.1236} [Forge Mod Loader] (forgeBin-1.7.10-10.13.2.1236.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{10.13.2.1236} [Minecraft Forge] (forgeBin-1.7.10-10.13.2.1236.jar) Unloaded->Constructed->Pre-initialized->Initialized
CodeChickenCore{1.0.4.29} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
NotEnoughItems{1.0.3.74} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.3.74-dev.jar) Unloaded->Constructed->Pre-initialized->Initialized
scoutcraft{beta 1.2.0} [scoutCraft] (bin) Unloaded->Constructed->Pre-initialized->Errored
DamageIndicatorsMod{3.2.0} [Damage Indicators] ([1.7.10]DamageIndicatorsMod-3.2.0.jar) Unloaded->Constructed->Pre-initialized->Initialized
ShowDurability2{1.3.0} [showDurability2] (ShowDurability2-1.7.10-1.4.0.jar) Unloaded->Constructed->Pre-initialized->Initialized
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: AMD Radeon HD 7700 Series GL version 4.4.13092 Compatibility Profile Context 14.301.0.0, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: Português (Brasil)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)

Link to comment
Share on other sites

Your main class code is not complete. Also why is your load method static?

 

ohh sorry, I sent a piece: p

 

My Main Class

 

package mike.scoutcraft.main;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import mike.scoutcraft.achievement.SCConquistas;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.craft.CraftingHandler;
import mike.scoutcraft.craft.DropDaGrama;
import mike.scoutcraft.craft.FuelHandler;
import mike.scoutcraft.craft.ReceitasCraftTable;
import mike.scoutcraft.craft.ReceitasFornalha;
import mike.scoutcraft.handler.LivingEventHandler;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.lib.Strings;
import mike.scoutcraft.proxy.Client;
import mike.scoutcraft.proxy.CommonProxy;
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.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.SideOnly;

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

@Instance(Strings.MODID)
public static ScoutCraft Instance;

@SidedProxy(clientSide = mike.scoutcraft.lib.Strings.CLIENT, serverSide = mike.scoutcraft.lib.Strings.COMMONPROXY)	
public static CommonProxy proxy;
public static Client client;

public static final int GuiIdFogueira = 0;

public static Achievement QuebrandoCoisas;
public static Achievement VamosEsquentar;
public static Achievement PoFacil;
public static Achievement FazerFogueira;
public static Achievement TochasPassado;

private static Configuration configuration;
public static int lightRange;
public static int targetLightValue;
public static int handLightValue;
public static int lightInterval;
public static int serverLightInterval;

public static CreativeTabs scoutcraft = new CreativeTabs("ScoutCraft") {

	public Item getTabIconItem() {			
		return SCItems.InicializadorDeChamas;
	}
};

@EventHandler
public static void preLoad(FMLPreInitializationEvent event)
{		
	configuration = new Configuration(event.getSuggestedConfigurationFile());
    configuration.load();
    lightRange = configuration.get("config", "Range/Distancia", 20).getInt();
    targetLightValue = configuration.get("config", "Target Light/Alvo Da Luz", 15).getInt();
    handLightValue = configuration.get("config", "Hand Light/Luz Emitida", .getInt();
    lightInterval = configuration.get("config", "Light Interval/Intervalo Da Luz", 1).getInt();
    serverLightInterval = configuration.get("config", "Server Light Interval/Intervalo Da Luz Em Servidor", 5).getInt();
    configuration.save();
    lightRange = lightRange > 40 ? 40 : (lightRange < 0 ? 0 : lightRange);
        targetLightValue = targetLightValue > 15 ? 15 : (targetLightValue < 0 ? 0 : targetLightValue);
        handLightValue = handLightValue > 15 ? 15 : (handLightValue < 0 ? 0 : handLightValue);		
	        
	SCBlocos.init();
	SCItems.init();
	ReceitasCraftTable.register();
	ReceitasFornalha.register();
	DropDaGrama.Register();
	GameRegistry.registerFuelHandler(new FuelHandler());
	MinecraftForge.EVENT_BUS.register(new CraftingHandler());	
	MinecraftForge.EVENT_BUS.register(new LivingEventHandler());

}

@EventHandler
public static void load(FMLInitializationEvent event)
{
	client.registerRender();
	proxy.registerGuiHandler();
	proxy.LanguageRegistry();
	proxy.registerTileEntity();
}

@EventHandler 
public static void postLoad(FMLPostInitializationEvent event)
{

	QuebrandoCoisas = new Achievement("achievement.QuebrandoCoisas", "QuebrandoCoisas", 0, 0, SCItems.MarteloDeMadeira, (Achievement)null).initIndependentStat().registerStat();
	VamosEsquentar = new Achievement("achievement.VamosEsquentar", "VamosEsquentar", 2, 1, SCItems.InicializadorDeChamas, QuebrandoCoisas).registerStat().setSpecial();
	PoFacil = new Achievement("achievement.PoFacil", "PoFacil", 3, 1, SCItems.PoDeCarvao, QuebrandoCoisas).registerStat().setSpecial();
	FazerFogueira = new Achievement("achievement.FazerFogueira", "FazerFogueira", 4, 2, SCBlocos.Fogueira, VamosEsquentar).registerStat().setSpecial();
	TochasPassado = new Achievement("achievement.TochasPassado", "TochasPassado", 5, 3, SCBlocos.Lampiao, PoFacil).registerStat().setSpecial();

	AchievementPage.registerAchievementPage(new AchievementPage("ScoutCraft", new Achievement[]{QuebrandoCoisas, VamosEsquentar, PoFacil, FazerFogueira, TochasPassado}));

}

}

 

My Client Class

 

package mike.scoutcraft.proxy;

import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.relauncher.Side;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.render.ItemRenderFogueira;
import mike.scoutcraft.render.ItemRenderLampiao;
import mike.scoutcraft.render.RenderFogueira;
import mike.scoutcraft.render.RenderLampiao;
import mike.scoutcraft.render.RenderLanternaDesligada;
import mike.scoutcraft.render.RenderLanternaLigada;
import mike.scoutcraft.render.RenderMarteloDeDiamante;
import mike.scoutcraft.render.RenderMarteloDeFerro;
import mike.scoutcraft.render.RenderMarteloDeMadeira;
import mike.scoutcraft.render.RenderMarteloDeOuro;
import mike.scoutcraft.render.RenderMarteloDePedra;
import mike.scoutcraft.render.RenderToco;
import mike.scoutcraft.tileentity.TileEntityFogueira;
import mike.scoutcraft.tileentity.TileEntityLampiao;


public class Client extends CommonProxy
{

public void registerRender(){	
	TileEntitySpecialRenderer render1 = new RenderFogueira();
	TileEntitySpecialRenderer render2 = new RenderToco();
	TileEntitySpecialRenderer render3 = new RenderLampiao();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFogueira.class, render1);
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLampiao.class, render3);
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.Fogueira), new ItemRenderFogueira(render1, new TileEntityFogueira()));
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.FogueiraAcesa), new ItemRenderFogueira(render1, new TileEntityFogueira()));
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SCBlocos.Lampiao), new ItemRenderLampiao(render3, new TileEntityLampiao()));
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDePedra, (IItemRenderer)new RenderMarteloDePedra());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeMadeira, (IItemRenderer)new RenderMarteloDeMadeira());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeFerro, (IItemRenderer)new RenderMarteloDeFerro());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeOuro, (IItemRenderer)new RenderMarteloDeOuro());
	MinecraftForgeClient.registerItemRenderer(SCItems.MarteloDeDiamante, (IItemRenderer)new RenderMarteloDeDiamante());
	MinecraftForgeClient.registerItemRenderer(SCItems.LanternaLigada, (IItemRenderer)new RenderLanternaLigada());
	MinecraftForgeClient.registerItemRenderer(SCItems.LanternaDesligada, (IItemRenderer)new RenderLanternaDesligada());

}
}

 

My Common Class

 

package mike.scoutcraft.proxy;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.client.MinecraftForgeClient;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.gui.GuiHandler;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.main.ScoutCraft;
import mike.scoutcraft.render.ItemRenderFogueira;
import mike.scoutcraft.render.ItemRenderLampiao;
import mike.scoutcraft.render.RenderFogueira;
import mike.scoutcraft.render.RenderLampiao;
import mike.scoutcraft.render.RenderLanternaDesligada;
import mike.scoutcraft.render.RenderLanternaLigada;
import mike.scoutcraft.render.RenderMarteloDeDiamante;
import mike.scoutcraft.render.RenderMarteloDeFerro;
import mike.scoutcraft.render.RenderMarteloDeMadeira;
import mike.scoutcraft.render.RenderMarteloDeOuro;
import mike.scoutcraft.render.RenderMarteloDePedra;
import mike.scoutcraft.render.RenderToco;
import mike.scoutcraft.tileentity.TileEntityFogueira;
import mike.scoutcraft.tileentity.TileEntityLampiao;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

public class CommonProxy{

public void registerTileEntity() {

	GameRegistry.registerTileEntity(TileEntityFogueira.class, "Fogueira");
	GameRegistry.registerTileEntity(TileEntityLampiao.class, "Lampiao");

}

public void registerGuiHandler(){

	NetworkRegistry.INSTANCE.registerGuiHandler(ScoutCraft.Instance, new GuiHandler());

}

public void LanguageRegistry(){

	LanguageRegistry.instance().addStringLocalization("container.Fogueira", "Fogueira");

}
}

Link to comment
Share on other sites

Show your new main class.

 

The client.registerRender(); is there, but nothing to direct the Client class ...

 

Main Class

 

package mike.scoutcraft.main;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import mike.scoutcraft.achievement.SCConquistas;
import mike.scoutcraft.blocks.SCBlocos;
import mike.scoutcraft.craft.CraftingHandler;
import mike.scoutcraft.craft.DropDaGrama;
import mike.scoutcraft.craft.FuelHandler;
import mike.scoutcraft.craft.ReceitasCraftTable;
import mike.scoutcraft.craft.ReceitasFornalha;
import mike.scoutcraft.handler.LivingEventHandler;
import mike.scoutcraft.items.SCItems;
import mike.scoutcraft.lib.Strings;
import mike.scoutcraft.proxy.Client;
import mike.scoutcraft.proxy.CommonProxy;
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.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.SideOnly;

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

@Instance(Strings.MODID)
public static ScoutCraft Instance;

@SidedProxy(clientSide = mike.scoutcraft.lib.Strings.CLIENT, serverSide = mike.scoutcraft.lib.Strings.COMMONPROXY)	
public static CommonProxy proxy;

public static final int GuiIdFogueira = 0;

public static Achievement QuebrandoCoisas;
public static Achievement VamosEsquentar;
public static Achievement PoFacil;
public static Achievement FazerFogueira;
public static Achievement TochasPassado;

private static Configuration configuration;
public static int lightRange;
public static int targetLightValue;
public static int handLightValue;
public static int lightInterval;
public static int serverLightInterval;

public static CreativeTabs scoutcraft = new CreativeTabs("ScoutCraft") {

	public Item getTabIconItem() {			
		return SCItems.InicializadorDeChamas;
	}
};

@EventHandler
public static void preLoad(FMLPreInitializationEvent event)
{		
	configuration = new Configuration(event.getSuggestedConfigurationFile());
    configuration.load();
    lightRange = configuration.get("config", "Range/Distancia", 20).getInt();
    targetLightValue = configuration.get("config", "Target Light/Alvo Da Luz", 15).getInt();
    handLightValue = configuration.get("config", "Hand Light/Luz Emitida", .getInt();
    lightInterval = configuration.get("config", "Light Interval/Intervalo Da Luz", 1).getInt();
    serverLightInterval = configuration.get("config", "Server Light Interval/Intervalo Da Luz Em Servidor", 5).getInt();
    configuration.save();
    lightRange = lightRange > 40 ? 40 : (lightRange < 0 ? 0 : lightRange);
        targetLightValue = targetLightValue > 15 ? 15 : (targetLightValue < 0 ? 0 : targetLightValue);
        handLightValue = handLightValue > 15 ? 15 : (handLightValue < 0 ? 0 : handLightValue);		
	        
	SCBlocos.init();
	SCItems.init();
	ReceitasCraftTable.register();
	ReceitasFornalha.register();
	DropDaGrama.Register();
	GameRegistry.registerFuelHandler(new FuelHandler());
	MinecraftForge.EVENT_BUS.register(new CraftingHandler());	
	MinecraftForge.EVENT_BUS.register(new LivingEventHandler());

}

@EventHandler
public static void load(FMLInitializationEvent event)
{
	client.registerRender();
	proxy.registerGuiHandler();
	proxy.LanguageRegistry();
	proxy.registerTileEntity();
}

@EventHandler 
public static void postLoad(FMLPostInitializationEvent event)
{

	QuebrandoCoisas = new Achievement("achievement.QuebrandoCoisas", "QuebrandoCoisas", 0, 0, SCItems.MarteloDeMadeira, (Achievement)null).initIndependentStat().registerStat();
	VamosEsquentar = new Achievement("achievement.VamosEsquentar", "VamosEsquentar", 2, 1, SCItems.InicializadorDeChamas, QuebrandoCoisas).registerStat().setSpecial();
	PoFacil = new Achievement("achievement.PoFacil", "PoFacil", 3, 1, SCItems.PoDeCarvao, QuebrandoCoisas).registerStat().setSpecial();
	FazerFogueira = new Achievement("achievement.FazerFogueira", "FazerFogueira", 4, 2, SCBlocos.Fogueira, VamosEsquentar).registerStat().setSpecial();
	TochasPassado = new Achievement("achievement.TochasPassado", "TochasPassado", 5, 3, SCBlocos.Lampiao, PoFacil).registerStat().setSpecial();

	AchievementPage.registerAchievementPage(new AchievementPage("ScoutCraft", new Achievement[]{QuebrandoCoisas, VamosEsquentar, PoFacil, FazerFogueira, TochasPassado}));

}

}

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.