So I am just learning to mod I am using eclipse and i get two errors in my code when I try to fix them more errors appear can anyone tell me what i am doing wrong?
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod {
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void preInit(FMLInitializationEvent event){
GameRegistry.addRecipe(new ItemStack(blocks.diamond_block), new Object[]{
"y y"
" "
"ywy"
'y', Blocks.obsidian, 'w', Blocks.sponge
});
}
@EventHandler
public void init(FMLInitializationEvent event) {
Just some advice next time. It was good that you included your code, most of the time you need to provide code so we can help, however we can't do much based on just code. This time it was easy, because the error jumped out and was obvious to someone who knew what they were looking at, but one example could be some code which has multiple errors, and you haven't specified which one you're wanting help with, nor a crash log.
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
package com.example.examplemod;
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;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod {
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void preInit(FMLInitializationEvent event){
GameRegistry.addRecipe(new ItemStack(blocks.diamond_block), new Object[]{
"y y"
" "
"ywy"
'y', Blocks.obsidian, 'w', Blocks.sponge
});
}
@EventHandler
public void init(FMLInitializationEvent event) {
}}
Director of Mods @ Dual GFX Co.
http://www.dualgfx.pw/
Or:
Thank you that worked
Just some advice next time. It was good that you included your code, most of the time you need to provide code so we can help, however we can't do much based on just code. This time it was easy, because the error jumped out and was obvious to someone who knew what they were looking at, but one example could be some code which has multiple errors, and you haven't specified which one you're wanting help with, nor a crash log.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!