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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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