Jump to content

Recommended Posts

Posted

Firstly, before you tell me to go and look up a tutorial, I have a working code next to me(I'm starting work on my second mod). The problem is when I'm originaly doing @Mod, It doesn't "work". By that, I mean theres no errors, but things don't "click". I don't know how to describe this very well, but if you're working in eclipse you'll understand this - the @Mod doesn't go gray. Heres the thing:

 

@Mod(modid = "TinkersTweaks", name = "Tinkers Tweaks", version = "1.1.1")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

 

Again, I have a working example next to me here, but this doesn't work for some reason, can someone help?

Posted

It goes:

 

@Mod(modid = "TinkersTweaks), name = "Tinkers Tweaks", version = "1.1.1")
public class MainClass {
@NetworkMod(clientSideRequired = true, serverSideRequired = false)

/* Everything in the class */

}

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Posted

Nope. "The annotation @NetworkMod is disallowed for this location". And the one that I have working is set out like the one I posted in my original post. Fyi, here is the working code(uses a declared string rather than a straight up string, doesn't work with either):

 

@Mod(modid = morefoodmod.modid, name = "More Food Mod", version = "1.1.1")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

 

public class morefoodmod {

public static final String modid = "morefoodmod";

}

Posted

No, like I have said, it comes up with an error as it's not allowed to be there(this is 1.6.4 btw, if you're getting confused with 1.7)

 

My NOT working code(based on what has been said):

 

@Mod(modid = "TinkersTweaks", name = "Tinkers Tweaks", version = "1.1.1")

 

public class tinkerstweaks {

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

}

 

My WORKING code(with NetworkMod not in the class):

 

@Mod(modid = morefoodmod.modid, name = "More Food Mod", version = "1.1.1")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

 

So NetworkMod should be outside my class(it works for me on my other mod)

Posted

Have you remembered to import cpw.mods.fml.common.Mod; ?

Naturalis - The easy way for nature.!

Esquire - A helping hand for your adventure.

Jimanju - The Random Disasters!

Posted

Okay guys, I fixed it! Apperantly Eclipse didn't want to accept my string, deleting the whole line and retyping it fixed the problem!

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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