I started to learn java, because I want to create a mod for a minecraft server. The minecraft version must be 1.8.9 because of the settings of the server. But after installing all programms the following problems showed up:
Following error accured:
The "Problems" window showed 2 errors:
My jdk version is jdk1.8.0_202 and my jre version jre1.8.0_202
My mod code:
package com.example.examplemod;
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 = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
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());
}
}