Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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?

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
  • Author

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";

}

Yes, Xcox123. This is how you place @NetworkMod.

 

You need to place it before initializing or creating the class.

  • Author

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)

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!

  • Author

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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.