Jump to content

Chocolate_with

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by Chocolate_with

  1. Really confused now, I don't know what I do wrong . Also I don't know why the texture isn't loading.
  2. PreInit doesn't fix the crashes . Oh by the way.., Minecraft won't texture my custom block. ==== Edit = ==== Minecraft error is getting less, but it has a problem with this line of code: Block SampleBlock = new SampleBlockClass(3000, Material.rock).setBlockName("SampleBlock"); With the error: Caused by: java.lang.NoSuchFieldError: rock at com.SurvivalOverhaul.common.SurvivalOverhaul.preInit(SurvivalOverhaul.java:30) In the code: package com.SurvivalOverhaul.common; import com.SurvivalOverhaul.common.Block.SampleBlockClass; import net.minecraft.block.Block; import net.minecraft.block.material.Material; 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.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = SurvivalOverhaul.MODID, name = SurvivalOverhaul.NAME, version = SurvivalOverhaul.VERSION) public class SurvivalOverhaul { @SidedProxy(clientSide = "com.SurvivalOverhaul.common.ClientProxy", serverSide = "com.SurvivalOverhaul.common.CommonProxy") public static CommonProxy proxy; public static final String MODID = "SurvivalOverhaul"; //Main use other than registry is for textures. public static final String VERSION = "Alpha 0.0.2"; //Version public static final String NAME = "Choco's Survival Overhaul"; //Name @Instance public static SurvivalOverhaul instance; @EventHandler public void preInit(FMLPreInitializationEvent e) { Block SampleBlock = new SampleBlockClass(3000, Material.rock).setBlockName("SampleBlock"); GameRegistry.registerBlock(SampleBlock, "SampleBlock"); } @EventHandler public void init(FMLInitializationEvent e) { } } Textures still won't load for the custom block.
  3. Rewriting code with a SampleBlock now as a test subject, hopefully it will work. Here's my new code: package com.SurvivalOverhaul.common; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = SurvivalOverhaul.MODID, name = SurvivalOverhaul.NAME, version = SurvivalOverhaul.VERSION) public class SurvivalOverhaul { @SidedProxy(clientSide = "com.SurvivalOverhaul.common.ClientProxy", serverSide = "com.SurvivalOverhaul.common.CommonProxy") public static CommonProxy proxy; public static final String MODID = "SurvivalOverhaul"; //Main use other than registry is for tex. public static final String VERSION = "Alpha 0.0.2"; //Version public static final String NAME = "Choco's Survival Overhaul"; //Name //Blocks public static Block SampleBlock = new SampleBlockClass(3000, Material.rock).setBlockName("SampleBlock"); public SurvivalOverhaul() { GameRegistry.registerBlock(SampleBlock, "SampleBlock"); } }
  4. Keeps crashing with same error. Hopefully I didn't forgot something. Oh yes.. I use 1.7.2 package com.SurvivalOverhaul.common; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import com.SurvivalOverhaul.common.lib.ProxyCommon; import com.SurvivalOverhaul.common.lib.References; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; 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.registry.GameRegistry; @Mod(modid = References.MODID, name = References.NAME, version = References.VERSION) public class SurvivalOverhaul { @SidedProxy(clientSide = References.Client, serverSide = References.Common) public static ProxyCommon proxy; @EventHandler public void PreInit(FMLPreInitializationEvent event) { GameRegistry.addShapedRecipe(new ItemStack(Blocks.web), "XXX", "XXX", "XXX", 'X', Items.string); GameRegistry.addShapelessRecipe(new ItemStack(Blocks.obsidian), Items.water_bucket, Items.lava_bucket ); GameRegistry.addShapedRecipe(new ItemStack(Items.record_11), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.coal); GameRegistry.addShapedRecipe(new ItemStack(Items.record_13), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.gold_nugget); GameRegistry.addShapedRecipe(new ItemStack(Items.record_cat), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.emerald); GameRegistry.addShapedRecipe(new ItemStack(Items.record_blocks), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.brick); GameRegistry.addShapedRecipe(new ItemStack(Items.record_chirp), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.redstone); GameRegistry.addShapedRecipe(new ItemStack(Items.record_far), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.poisonous_potato); GameRegistry.addShapedRecipe(new ItemStack(Items.record_mall), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', new ItemStack(Items.dye, 1, 13)); GameRegistry.addShapedRecipe(new ItemStack(Items.record_mellohi), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.potionitem); GameRegistry.addShapedRecipe(new ItemStack(Items.record_stal), "XXX", "XXX", "XXX", 'X', Blocks.obsidian); GameRegistry.addShapedRecipe(new ItemStack(Items.record_strad), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.bone); GameRegistry.addShapedRecipe(new ItemStack(Items.record_ward), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.ender_pearl); GameRegistry.addShapedRecipe(new ItemStack(Items.record_wait), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.diamond); GameRegistry.addShapedRecipe(new ItemStack(Items.saddle), "XXX", "XSX", " I ", 'X', Items.leather, 'S', Items.string, 'I', Items.iron_ingot); GameRegistry.addShapelessRecipe(new ItemStack(Items.clay_ball), Blocks.dirt, Items.water_bucket); } @EventHandler public void init(FMLInitializationEvent event) { } @EventHandler public void load (FMLInitializationEvent event) { proxy.registerRenderInformation(); } }
  5. Hello, First of all, I need to let you know that I am new to the forums and Minecraft modding, yes I know the most of the basics from java. But anyways, I don't know if this is the right section for this topic. So.., too the problem. Just like the title says, my Forge fails to initialize the game when I add my own mod, but Eclipse runs it without a problem/ My main jar file with the code: package com.SurvivalOverhaul.common; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import com.SurvivalOverhaul.common.lib.ProxyCommon; import com.SurvivalOverhaul.common.lib.References; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = References.MODID, name = References.NAME, version = References.VERSION) public class SurvivalOverhaul { @SidedProxy(clientSide = References.Client, serverSide = References.Common) public static ProxyCommon proxy; @EventHandler public void init(FMLInitializationEvent event) { } @EventHandler public void load (FMLInitializationEvent event) { proxy.registerRenderInformation(); } public SurvivalOverhaul() { //Item registry //GameReg GameRegistry.addShapedRecipe(new ItemStack(Blocks.web), "XXX", "XXX", "XXX", 'X', Items.string); GameRegistry.addShapelessRecipe(new ItemStack(Blocks.obsidian), Items.water_bucket, Items.lava_bucket ); GameRegistry.addShapedRecipe(new ItemStack(Items.record_11), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.coal); GameRegistry.addShapedRecipe(new ItemStack(Items.record_13), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.gold_nugget); GameRegistry.addShapedRecipe(new ItemStack(Items.record_cat), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.emerald); GameRegistry.addShapedRecipe(new ItemStack(Items.record_blocks), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.brick); GameRegistry.addShapedRecipe(new ItemStack(Items.record_chirp), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.redstone); GameRegistry.addShapedRecipe(new ItemStack(Items.record_far), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.poisonous_potato); GameRegistry.addShapedRecipe(new ItemStack(Items.record_mall), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', new ItemStack(Items.dye, 1, 13)); GameRegistry.addShapedRecipe(new ItemStack(Items.record_mellohi), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.potionitem); GameRegistry.addShapedRecipe(new ItemStack(Items.record_stal), "XXX", "XXX", "XXX", 'X', Blocks.obsidian); GameRegistry.addShapedRecipe(new ItemStack(Items.record_strad), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.bone); GameRegistry.addShapedRecipe(new ItemStack(Items.record_ward), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.ender_pearl); GameRegistry.addShapedRecipe(new ItemStack(Items.record_wait), "XXX", "XYX", "XXX", 'X', Blocks.obsidian, 'Y', Items.diamond); GameRegistry.addShapedRecipe(new ItemStack(Items.saddle), "XXX", "XSX", " I ", 'X', Items.leather, 'S', Items.string, 'I', Items.iron_ingot); GameRegistry.addShapelessRecipe(new ItemStack(Items.clay_ball), Blocks.dirt, Items.water_bucket); } } My crash log from main Minecraft: ---- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 24-5-14 16:31 Description: Initializing game java.lang.NoSuchFieldError: web at com.SurvivalOverhaul.common.SurvivalOverhaul.<init>(SurvivalOverhaul.java:38) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at cpw.mods.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:173) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:486) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:489) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:465) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:813) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.SurvivalOverhaul.common.SurvivalOverhaul.<init>(SurvivalOverhaul.java:38) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at cpw.mods.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:173) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:486) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:489) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:465) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:813) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 70810056 bytes (67 MB) / 223870976 bytes (213 MB) up to 954728448 bytes (910 MB) JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 4 mods loaded, 4 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.2.156.1060} [Forge Mod Loader] (forge-1.7.2-10.12.1.1060.jar) Unloaded->Constructed Forge{10.12.1.1060} [Minecraft Forge] (forge-1.7.2-10.12.1.1060.jar) Unloaded->Constructed SurvivalOverhaul{Alpha 0.0.2} [survival Overhaul] (Choco's Survival Overhaul.jar) Unloaded Launched Version: 1.7.2-Forge10.12.1.1060 LWJGL: 2.9.0 OpenGL: GeForce GT 520M/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [CodeCrafted Custom.zip] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: On (16)
×
×
  • Create New...

Important Information

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