Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » "Cannot be resolved to a type" error(I am having an error while coding in java.)
"Cannot be resolved to a type" error [message #1778610] Mon, 18 December 2017 17:27 Go to next message
blinxboy iakm is currently offline blinxboy iakmFriend
Messages: 1
Registered: December 2017
Junior Member
Hi, I am coding a minecraft mod using some tutorials i found on youtube. They are by a youtuber named MrCrayfish. I was on tutorial number three of 1.8 Modding Tutorials.

Anyway, i have relatively little code, but here it is:

package iAkM.UHC;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION)
public class TutorialMod {

public void preInit(FMLPreInializationEvent event)

public void init(FMLInializationEvent event)

public void postInit(FMLPostInitializationEvent event)


I also have a Reference class for MOD_ID. VERSION, AND MOD_NAME. I keep getting these errors:

EventHandler cannot be resolved to a type
EventHandler cannot be resolved to a type
EventHandler cannot be resolved to a type
FMLInializationEvent cannot be resolved to a type
FMLPreInializationEvent cannot be resolved to a type

I have been looking for the answer for quite some time now, can anyone help me with this? Thanks!
Re: "Cannot be resolved to a type" error [message #1778863 is a reply to message #1778610] Fri, 22 December 2017 14:38 Go to previous message
Ed Merks is currently online Ed MerksFriend
Messages: 29592
Registered: July 2009
Senior Member
You'll need to make sure the library jars are on the classpath.
Previous Topic:Eclipse installation errors
Goto Forum:

Current Time: Thu Oct 18 00:59:47 GMT 2018

Powered by FUDForum. Page generated in 0.03526 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top