promotional bannermobile promotional banner

CraftCoreLIB

Cross-Platform library providing registgries and utils for mod developers.
Create a Server
Create a server, get 25% off your first monthaffiliate logo
Create Server
affiliate banner image

CraftCoreLIB

CraftCoreLib is a cross-plaftorm library built for developers for simplify registries on multiloader and many more features!

 

Registries

This lib provides core code for simple registries like blocks, items, creativetabs to recipetypes, recipe serializers menu and more coming!!

Usage Example

public class ModBlocks {

  // Simple Block registration
  public static final ObjectRegistries<Block> MY_BLOCK = ObjectRegistries.registerBlock(
  ResourceLocation.fromNamespaceAndPath("yourmoid", "my_block"),
    ()-> new Block(BlockBehaviour.Properties.of()));

    // It must stay empty, call it on related Init class(for fabric the one implementing ModInitializer for neoforge the class with the @Mod annotation)
    public static void init() {}

}


And initialize all our registris on our setup:
- Fabric -> ModInitializer class
- NeoForge -> @Mod annotation class

 

// Placeholder
public void init() {
  ModBlocks.init();

}

then if Neoforge do this:

private void onRegister(RegisterEvent event) {
  ObjectRegistries.createAll("yourmoid", event.getRegistry());
}

if Fabric inside ModInitializer, after all your init add this:

 ObjectRegistries.createAll("yourmoid");

Configs

CraftCoreLIB also provides a dedicated config system with a custom config screen compatible with other mods!!

Usage Example:

public class ModConfig {

    //You can choose 3 different config types: CLIENT, SERVER,COMMON
    public static final ConfigCategory MY_COOL_CATEGORY = ConfigCategory.create("my_cool_category", ConfigType.CLIENT)
            .title("my_cool_category");


    public static final ConfigValue<Boolean> MY_CONDITION = MY_COOL_CATEGORY
            .define("my_condition", false)
            //Translatable Name -> define the name inside your localisation default en_su.json
            .name("config.mymodid.mycondition")
            //Translatable Description -> define the description inside your localisation default en_su.json
            .comment("config.mymodid.mycondition.dec");

    // Accept countless categories
    public static void init() {
        ConfigManager.register("mymodid", MY_COOL_CATEGORY);
    }
}

Config Screen

  It features a dedicated Config Screen easy to access.
  It also fetch for all the available mod with config, IT'S NOT A MODLIST MENU, IT ONLY SHOWS  MOD WITH CONFIGS!!
  

Network Builder

It features:
- Custom Packet creation and handling
- Network Creation
- Network Registration

Check more on GitHub Info 

Report issues on Discord GitHub

My Other Projects

 

The CraftCoreLIB Team

profile avatar
  • 5
    Followers
  • 9
    Projects
  • 46.4K
    Downloads

I create mods for minecraft. Actually I'm over 40k downloads!!

More from Tier1234View all