Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Solved] Crash help


CheesyCrackers
 Share

Recommended Posts

Hi, I'm a new modder (super noob)

and I'm experiencing some crashes but I can't find anything wrong in the code, if anyone can help me please tell me what is wrong with it.

Thank you

 

Crash log:

[18:30:27] [main/INFO] [GradleStart]: Extra: []

[18:30:27] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Guido/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]

[18:30:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker

[18:30:27] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1334 for Minecraft 1.8 loading

[18:30:27] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_40, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_40

[18:30:27] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[18:30:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[18:30:27] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin

[18:30:27] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin

[18:30:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[18:30:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[18:30:28] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[18:30:32] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[18:30:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[18:30:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[18:30:32] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[18:30:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[18:30:32] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[18:30:33] [Client thread/INFO]: Setting user: Player937

[18:30:38] [Client thread/INFO]: LWJGL Version: 2.9.1

[18:30:38] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[18:30:38] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1334 Initialized

[18:30:39] [Client thread/INFO] [FML]: Replaced 204 ore recipies

[18:30:39] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[18:30:39] [Client thread/INFO] [FML]: Searching C:\Users\Guido\Desktop\Modding\forge-1.8-11.14.1.1334-src\eclipse\mods for mods

[18:30:41] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[18:30:42] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tc] at CLIENT

[18:30:42] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tc] at SERVER

[18:30:43] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:TerraCraft

[18:30:43] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[18:30:43] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations

[18:30:43] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[18:30:43] [Client thread/INFO] [FML]: Applying holder lookups

[18:30:43] [Client thread/INFO] [FML]: Holder lookups applied

[18:30:43] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue

[18:30:43] [Client thread/ERROR] [FML]:

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

FML{8.0.37.1334} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized

Forge{11.14.1.1334} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized

tc{1.0} [TerraCraft] (bin) Unloaded->Constructed->Errored

[18:30:43] [Client thread/ERROR] [FML]: The following problems were captured during this phase

[18:30:43] [Client thread/ERROR] [FML]: Caught exception from tc

java.lang.NullPointerException

at com.cheeseycrackers.terracraft.init.TerraCraftBlocks.registerRender(TerraCraftBlocks.java:39) ~[bin/:?]

at com.cheeseycrackers.terracraft.init.TerraCraftBlocks.registerRenders(TerraCraftBlocks.java:33) ~[bin/:?]

at com.cheeseycrackers.terracraft.proxy.ClientProxy.registerRenders(ClientProxy.java:9) ~[bin/:?]

at com.cheeseycrackers.terracraft.TerraCraft.init(TerraCraft.java:33) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_40]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518) ~[forgeSrc-1.8-11.14.1.1334.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_40]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.8-11.14.1.1334.jar:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.8-11.14.1.1334.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_40]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) [Loader.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:446) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:356) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_40]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

[18:30:43] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----

// There are four lights!

 

Time: 17/03/15 18:30

Description: Initializing game

 

java.lang.NullPointerException: Initializing game

at com.cheeseycrackers.terracraft.init.TerraCraftBlocks.registerRender(TerraCraftBlocks.java:39)

at com.cheeseycrackers.terracraft.init.TerraCraftBlocks.registerRenders(TerraCraftBlocks.java:33)

at com.cheeseycrackers.terracraft.proxy.ClientProxy.registerRenders(ClientProxy.java:9)

at com.cheeseycrackers.terracraft.TerraCraft.init(TerraCraft.java:33)

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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518)

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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at net.minecraftforge.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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)

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

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

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

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(Unknown Source)

at GradleStart.main(Unknown Source)

 

 

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

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

 

-- Head --

Stacktrace:

at com.cheeseycrackers.terracraft.init.TerraCraftBlocks.registerRender(TerraCraftBlocks.java:39)

at com.cheeseycrackers.terracraft.init.TerraCraftBlocks.registerRenders(TerraCraftBlocks.java:33)

at com.cheeseycrackers.terracraft.proxy.ClientProxy.registerRenders(ClientProxy.java:9)

at com.cheeseycrackers.terracraft.TerraCraft.init(TerraCraft.java:33)

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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:518)

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 net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at net.minecraftforge.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 net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)

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

 

-- Initialization --

Details:

Stacktrace:

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

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

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(Unknown Source)

at GradleStart.main(Unknown Source)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_40, Oracle Corporation

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

Memory: 824504616 bytes (786 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

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

FML: MCP v9.10 FML v8.0.37.1334 Minecraft Forge 11.14.1.1334 4 mods loaded, 4 mods active

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

FML{8.0.37.1334} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized

Forge{11.14.1.1334} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized

tc{1.0} [TerraCraft] (bin) Unloaded->Constructed->Errored

Loaded coremods (and transformers):

Launched Version: 1.8

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics 3000 GL version 3.1.0 - Build 9.17.10.3347, Intel

GL Caps: Using GL 1.3 multitexturing.

Using GL 1.3 texture combiners.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Shaders are available because OpenGL 2.1 is supported.

VBOs are available because OpenGL 1.5 is supported.

 

Using VBOs: No

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

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

[18:30:43] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Guido\Desktop\Modding\forge-1.8-11.14.1.1334-src\eclipse\.\crash-reports\crash-2015-03-17_18.30.43-client.txt

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

Link to comment
Share on other sites

here's the TerraCraftBlocks.java File, if you need any more please tell me

 

package com.cheeseycrackers.terracraft.init;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.Minecraft;

import net.minecraft.client.resources.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

 

 

 

import com.cheeseycrackers.terracraft.Reference;

import com.cheeseycrackers.terracraft.TerraCraft;

import com.cheeseycrackers.terracraft.blocks.Blocktest_block;

 

public class TerraCraftBlocks {

 

public static Block test_block;

 

public static void init()

{

test_block = new Blocktest_block(Material.cloth).setUnlocalizedName("test_block").setCreativeTab(TerraCraft.tabterracraft);

}

 

public static void register()

{

GameRegistry.registerBlock(test_block, test_block.getUnlocalizedName().substring(5));

}

 

public static void registerRenders()

{

registerRender(test_block);

}

 

public static void registerRender(Block block)

{

Item item = Item.getItemFromBlock(block);

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));

}

}

Link to comment
Share on other sites

I may be wrong, but it seems like TerraCraftBlocks.init() is not being called. Also, your main class and your client proxy would be helpful aswell if that doesn't fix the problem.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

Here are all the files

 

Blocktest:

package com.cheeseycrackers.terracraft.blocks;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

 

public class Blocktest extends Block{

 

public Blocktest(Material materialIn) {

super(materialIn);

}

 

}

 

TerraCraftBlocks:

package com.cheeseycrackers.terracraft.init;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.Minecraft;

import net.minecraft.client.resources.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

import com.cheeseycrackers.terracraft.Reference;

import com.cheeseycrackers.terracraft.TerraCraft;

import com.cheeseycrackers.terracraft.blocks.Blocktest;

 

public class TerraCraftBlocks {

 

public static Block test_block;

 

public static void init()

{

test_block = new Blocktest(Material.cloth).setUnlocalizedName("test_block").setCreativeTab(TerraCraft.tabterracraft);

}

 

public static void register()

{

GameRegistry.registerBlock(test_block, test_block.getUnlocalizedName().substring(5));

}

 

public static void registerRenders()

{

registerRender(test_block);

}

 

public static void registerRender(Block block)

{

Item item = Item.getItemFromBlock(block);

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));

}

}

 

TerraCraftItems:

package com.cheeseycrackers.terracraft.init;

 

import net.minecraft.client.Minecraft;

import net.minecraft.client.resources.model.ModelResourceLocation;

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

import com.cheeseycrackers.terracraft.Reference;

import com.cheeseycrackers.terracraft.TerraCraft;

 

public class TerraCraftItems {

 

public static Item test_item;

 

public static void init() {

test_item = new Item().setUnlocalizedName("test_item").setCreativeTab(TerraCraft.tabterracraft);

}

 

public static void register()

{

GameRegistry.registerItem(test_item, test_item.getUnlocalizedName().substring(5));

}

 

public static void registerRenders()

{

registerRender(test_item);

}

 

public static void registerRender(Item item)

{

Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5)));

}

}

 

ClientProxy:

package com.cheeseycrackers.terracraft.proxy;

 

import com.cheeseycrackers.terracraft.init.TerraCraftBlocks;

import com.cheeseycrackers.terracraft.init.TerraCraftItems;

 

public class ClientProxy extends CommonProxy{

@Override

public void registerRenders() {

TerraCraftBlocks.registerRenders();

TerraCraftItems.registerRenders();

}

}

 

CommonProxy:

package com.cheeseycrackers.terracraft.proxy;

 

public class CommonProxy {

public void registerRenders() {

 

}

}

 

 

Reference:

package com.cheeseycrackers.terracraft;

 

public class Reference {

public static final String MOD_ID = "tc";

 

public static final String MOD_NAME = "TerraCraft";

 

public static final String VERSION = "1.0";

 

public static final String CLIENT__PROXY_CLASS = "com.cheeseycrackers.terracraft.proxy.ClientProxy";

 

public static final String SERVER_PROXY_CLASS = "com.cheeseycrackers.terracraft.proxy.CommonProxy";

}

 

 

TerraCraft:

package com.cheeseycrackers.terracraft;

 

import net.minecraftforge.fml.common.Mod;

import net.minecraftforge.fml.common.Mod.EventHandler;

import net.minecraftforge.fml.common.SidedProxy;

import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

 

import com.cheeseycrackers.terracraft.init.TerraCraftBlocks;

import com.cheeseycrackers.terracraft.init.TerraCraftItems;

import com.cheeseycrackers.terracraft.proxy.CommonProxy;

 

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION)

public class TerraCraft {

 

@SidedProxy(clientSide = Reference.CLIENT__PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)

public static CommonProxy proxy;

 

public static final TerraCraftTab tabterracraft = new TerraCraftTab("tabterracraft");

 

@EventHandler

public void preInit(FMLPreInitializationEvent event)

{

TerraCraftBlocks.init();

TerraCraftBlocks.register();

TerraCraftItems.init();

TerraCraftItems.register();

}

 

@EventHandler

public void init(FMLPreInitializationEvent event)

{

proxy.registerRenders();

}

 

@EventHandler

public void posInit(FMLPostInitializationEvent event)

{

 

}

}

 

 

TerraCraftTab:

package com.cheeseycrackers.terracraft;

 

import com.cheeseycrackers.terracraft.init.TerraCraftItems;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

 

public class TerraCraftTab extends CreativeTabs{

 

public TerraCraftTab(String label)

{

super (label);

  this.setBackgroundImageName("terracrafttab.png");

}

 

@Override

public Item getTabIconItem()

{

return TerraCraftItems.test_item;

}

}

 

 

 

 

 

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.