Back to mods
MJUtils project artwork

CurseForge · Minecraft mod

MJUtils

Mod-lib for MJaroslav's mods.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which MJUtils release matches 1.7.10?

Updated 7 years ago
Best match for your filters MJUtils 1.6.1
Game version 1.7.10
Loader Not required

MJUtils 1.6.1 targets 1.7.10. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is MJUtils required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release No loader listed
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does MJUtils 1.6.1 need?

MJUtils 1.6.1 on 1.7.10. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

1 listed on this file 1 pulled in by one of those mods
Thaumcraft Optional for MJUtils 1.6.1
optional
Matching file found Matched file: Thaumcraft-1.7.10-4.2.3.5.jar
Baubles Needed by Thaumcraft
pulled in
Matching file found Matched file: Baubles-1.7.10-1.0.1.10.jar

1 extra mod was pulled in by another dependency. Indented rows show who needs each one. We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add MJUtils without breaking your instance.

Built for MJUtils 1.6.1 on 1.7.10. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use MJUtils 1.6.1. It targets 1.7.10; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside MJUtils 1.6.1. It opens that exact file at the source.

About this project

What does MJUtils add?

MJUtils

A set of tools to simplify writing mods. It contains a modular system for initialization of mods and a system of configurations by annotations.

The source code contains the documentation.

If you are using ResearchItemCopy, you must add the following dependency: "required-after:Thaumcraft;".

You can send a pull request if you find grammar errors.

Modular system examples

Add module and configuration handlers to the main mod class:

package your.path;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLConstructionEvent;
import mjaroslav.mcmods.mjutils.module.ModuleSystem;
import mjaroslav.mcmods.mjutils.module.AnnotationBasedConfiguration;

@Mod(modid = "your_modid", version = "0.0.0", name = "Module example mod")
public class ModExample {
    // Handler for annotation configurations.
    private static AnnotationBasedConfiguration config;
    // Handler for work with modules.
    private static ModuleSystem modSys;
    
    @EventHandler
    public void construct(FMLConstructionEvent event) {
        // The second argument is logger.
        config = new AnnotationBasedConfiguration("your_modid", null);
        // The third argument is a proxy.
        modSys = new ModuleSystem(MODID, config, null);
        // Find all modules and create their instances..
        modSys.initSystem(event);
    }
    
    // DON'F FORGET CALL ALL INITIALIZATION METHODS:
    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        modSys.preInit(event);
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event) {
        modSys.init(event);
    }
    
    @EventHandler
    public void postInit(FMLPostInitializationEvent event) {
        modSys.postInit(event);
    }
}

Now you can create simple module:

package your.path;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;
//import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import mjaroslav.mcmods.mjutils.module.Modular;
import mjaroslav.mcmods.mjutils.module.Module;

// All classes with Module annotation must implement the Modular
// interface.
@Module("your_modid")
public class ModuleExample implements Modular {
    @Override
    public void preInit(FMLPreInitializationEvent event) {
        System.out.println("Hi! I'm in pre init!");
    }
    
//    All interface methods that can be neglected contain the default
//    implementation: you can inherit them only when necessary.
//    
//    @Override
//    public void init(FMLInitializationEvent event) {
//        System.out.println("I'm ignored :c");
//    }
    
    @Override
    public void postInit(FMLPostInitializationEvent event) {
        System.out.println("Hi! I'm in post init!");
    }
}

An example of creating an annotation configuration:

package your.path;

import mjaroslav.mcmods.mjutils.module.ConfigurationCategory;
import mjaroslav.mcmods.mjutils.module.ConfigurationProperty;

@ConfigurationCategory(modID = "your_modid", name = ConfigurationCategory.GENERAL_NAME,
        comment = ConfigurationCategory.GENERAL_COMMENT)
public class CategoryGeneral {
    @ConfigurationCategory(name = "subcategory")
    public static class SubCategory {
        @ConfigurationProperty(defaultBoolean = true)
        public static boolean test;

        @ConfigurationProperty(name = "test2", defaultInt = 1)
        public static int test1;
    }
    
    @ConfigurationProperty(defaultDouble = Math.E)
    public static double e;
}

Use the documentation to find out more info about library usages.

Project description from CurseForge.

Pick your setup

MJUtils by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

MJUtils versions and loaders

6 of 6 releases match
Clear filters

Looking for an older file? The official CurseForge project page is in Resources.