Jump to content

albatross

Members
  • Posts

    6
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

albatross's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am getting there! sorry to be so impatient with the posting but I am away till tomorrow night and wanted to finish on a metaphorical full stop and not half way through a sentence. My problem - obviously - was that I had the same ModId. Everything running fine now!
  2. The IDE appears to have a mind of its own and has seemingly made alterations all by itself. It has deleted all the cpw lines and replaced them. I now have the following: package com.wuppy.samsmod; import net.minecraft.init.Blocks; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod(modid = SamsMod.MODID, version = SamsMod.VERSION) public class SamsMod { public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { // some example code System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName()); } } This runs without errors in the code but Minecraft does not run I get "Game Crashed!" in the console and looking through the crash report I found the following: java.lang.IllegalArgumentException: Multiple entries with same key: examplemod=FMLMod:examplemod{1.0} and examplemod=FMLMod:examplemod{1.0}
  3. Hmmm this is pretty tricky isn't it? I have typed in the second example and it does not want to run at all. package com.wuppy.samsmod; import net.minecraft.init.Blocks; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; @Mod(modid = SamsMod.MODID, version = SamsMod.VERSION) public class SamsMod { public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { // some example code System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName()); } } It does not seem to like the import cpw commands, the @Mod line and the @EventHandler and the public void init line immediately after it. I get the feeling that either the book is outdated or Forge has not loaded all the resources.
  4. My bad! This was in the console output after all: [com.example.examplemod.ExampleMod:init:18]: DIRT BLOCK >> tile.dirt Took a while to find though!
  5. I am on my mobile so can't post code at the moment sorry but yes it is just a system.out print I will go through the output with a fine tooth comb tonight but I thought I was thorough yesterday. Thanks
  6. Hi everybody, I have bought wuppys Book and am following the tutorials and have so far set up eclipse and forge etc. I am currently at the stage of running the example mod that just prints dirt block to the console. Minecraft starts up ok and states that the example mod is running but 'dirt block' does not get printed to the console. I assume it should get printed to the eclipse console and not the in game Minecraft console? I don't really want to move on till I get this sorted. I have some small experience with Java but not using an IDE.
×
×
  • Create New...

Important Information

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