1

MinerCore Modding API: Making modding a lot easier!

EnderMiner77's Avatar EnderMiner7711/4/14 10:21 pm
1 emeralds 472 4
11/4/2014 10:32 pm
EnderMiner77's Avatar EnderMiner77
What is MinerCore?
Click to reveal
Have you ever tried to mod, but ended up failing because you didn't know much about java? Did you start a mod from a tutorial, but got a headache from the sheer number of "classes" you had to make and put code in? If that's you, then this mod is perfect for you. The API makes things like adding items and blocks a breeze! No need to have confusion on whether to get the "source" or the "universal" version, since the mod works as both a code library and a minecraft mod without any need to decompile and stuff like that.

You need this mod to make MinerCore mods, and you also need it play them, just like your typical mod. Not a beginner at java? Not a problem! If you need to add hundreds of items, yet don't like managing hundereds of classes, then you can use this API and only need one class to hold everything! Plus, you can override some base classes and add your own functionality!

And remember, to use a MinerCore mod, all you need to do is put the MinerCore API jar file in your mods folder, and you're good to go!


Download from here: http://www.planetminecraft.com/mod/mcore-api/

Anyways, the point of this forum thread is to see if anyone out there has any ideas for what I should add. Or maybe, I just missed a bug that is bothering you. I'll try to answer any questions/comments as soon as possible.

Update log:

The Explosive Update (v1.1)
Click to reveal
Yes, as the name suggests, in version 1.1, there is now added support for easy customization of explosives! I will add a ton of overloaded constructors for various mechanics, like changing initial velocity, and such. I will also replace the Explosives++ mod (inside programmer joke there), since the Explosives+ mod isn't being worked on anymore. But for now, if you want to add an explosive to your mod, then just use the following template:

import minerguy31.mcore.block.BlockExplosive;

BlockExplosive testExplosiveblock=new BlockExplosive("internalname,explosionpower,fuse,texturename);
GameRegistry.registerBlock(texturename, internalname);

IMPORTANT: Your textures must be named as your texturename, with "_top", "_side", and "_bottom" at the end, or else it will NOT WORK.
Posted by EnderMiner77's Avatar
EnderMiner77
Level 68 : High Grandmaster Programmer
92

Create an account or sign in to comment.

4

1
11/04/2014 10:25 pm
Level 47 : Master Cowboy
Chron
Chron's Avatar
Nice work! However, I'd recommend making mention of the fact that because the mods created from this are program-generated, they're not allowed to be posted as a submission on PMC.

Keep up the good work, though. I'd recommend adding the ability to create mobs and the like, if you haven't already.
1
11/04/2014 10:29 pm
Level 68 : High Grandmaster Programmer
EnderMiner77
EnderMiner77's Avatar
It's not program generated, you still have to write code, it's just that there's an API, so you don't have to repeatedly write nearly identical classes.
1
11/04/2014 10:31 pm
Level 47 : Master Cowboy
Chron
Chron's Avatar
Ah, in that case... That'd be up to the Moderators to decide, as it's not as clear-cut as ModMaker.
1
11/04/2014 10:32 pm
Level 68 : High Grandmaster Programmer
EnderMiner77
EnderMiner77's Avatar
Yeah, modmaker is boom boom boom, no Java knowledge, just picking stuff and it's done. Here's the code I used to make an explosive using this mod:

package minerguy31.apitest2;

import minerguy31.mcore.MCore;
import minerguy31.mcore.block.MBlock;
import minerguy31.mcore.entity.EntityExplosivePrimed;
import minerguy31.mcore.block.BlockExplosive;
import minerguy31.mcore.CommonProxy;
import minerguy31.mcore.item.MItem;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = ApiTest.MODID, version = ApiTest.VERSION, name=ApiTest.NAME)
public class ApiTest {
public static final String MODID = "mcore_apitest";
public static final String VERSION = "1.0";
public static final String NAME = "MCore API Test";
@SidedProxy(clientSide="minerguy31.mcore.client.ClientProxy", serverSide="minerguy31.mcore.CommonProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
BlockExplosive testExplosiveblock=new BlockExplosive("nukeBlockM",10.0f,120,MODID+":nuke");
GameRegistry.registerBlock(testExplosiveblock, "explosiveBlocktest");
}
}


EDIT: Note that only one class was needed, and even that was short
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome