[1.6.4] The Necromancy Mod 1.5 - Necro API 1.2

  • #1
    This mod has been taken over by AtomicStryker. Link




    Exspectata amicus. respondebo tibi, quid opus sit vobis regnum regat



    Introduction

    This mod is all about necromancy. Also known as the art of reanimation. using this mod, you can reanimate slain foes and use your minions to rule the world! (of minecraftia).


    Download

    Download 1.5 for MC 1.6.4 (thnx to AtomicStryker!)
    Download 1.4b for MC 1.6.2
    AdFly Download 1.4b for MC 1.6.2
    Browse all versions


    Copyright

    you have the right to have access the source code of the mod,
    you have the right to be able to edit/use parts (or all) of the source code provided that you provide proper credit to the original authour(s),
    you have the right to distribute the source code and/or compiled versions of the source code
    you have the right to use this mod in Lets Plays/YouTube videos however you see fit (monetization, for fun, etc) as long as you provide credit to the original authour(s)(a link back to this thread for example)
    if you wind up using parts of my mod in your own, then create a really awesome mod so that i can be proud


    Source code

    Please read the copyright note before downloading the source code
    https://github.com/s...2009/Necromancy

    Necro API
    The API allows modders to implement their own mobs into the game, if this mod and their mod is installed. Keep in mind that you have to wait for the next necromancy version for this to work. That doesn't mean that you have to wait to add your mobs though.
    Download API v2.

    API Tutorial (intended for modders only)

    Download the API from the link above and extract it to your src folder (MCP/src). You should now see MCP/src/com/sirolf2009/necroapi. Inside the necroapi folder are a couple of classes. NecroEntityZombie is an example class.
    Start off by creating a new class. For the sake of organizing call it NecroEntityExample where Example is your mob name. Use your mobs name in the super constructor. If your model extends ModelBiped or ModelQuadruped, make the new class extend NecroEntityBiped or ModelQuadruped and skip the spoiler.

    If your model does not extend ModelBiped, you'll have to assign the bodyparts. Create four new methods:
    public BodyPart[] initHead(ModelMinion model) {
    return null;
    }
    public BodyPart[] initTorso(ModelMinion model) {
    return null;
    }
    public BodyPart[] initLegs(ModelMinion model) {
    return null;
    }
    public BodyPart[] initArmLeft(ModelMinion model) {
    return null;
    }
    public BodyPart[] initArmRight(ModelMinion model) {
    return null;
    }


    these all return an array of bodyparts. Let's start with legs. Let's say your mobs leg is a 1x12x1 cube. You would change initLegs to this:
    @Override
    
    public BodyPart[] initLegs(ModelMinion model) {
    
    float[] torsoPos = {-4F, -2F, -2F}; //we will get to this in a sec
    BodyPart leg = new BodyPart(mobName, torsoPos, model, 0, 16); //mobName is what you put in your super constructor, the 0 and 16 are texture offsets
    leg.addBox(0.0F, 0.0F, 0.0F, 1, 12, 1, 0.0F); //create a 1x12x1 cube at coördinate 0, 0, 0
    return new BodyPart[] {leg}; //return our leg
    }

    But sirolf2009, what's that torsoPos about? The torso pos defines the position of the torso. But why can't you simply make your torso 2F higher? Because your torso can be put on creeper legs and ender legs. If you would make your torso 2F higher, it will float above creeper legs and float inside the ender legs. For that reason, try to make your bodyparts around 0, 0, 0. On to the torso
    @Override
    public BodyPart[] initTorso(ModelMinion model) {
    float[] headPos = {4.0F, -8.0F, 2.0F};
    float[] armLeftPos = {-4F, 0.0F, 2.0F};
    float[] armRightPos = {8F, 0.0F, 2.0F};
    BodyPart torso = new BodyPart(mobName, armLeftPos, armRightPos, headPos, model, 16, 16);
    torso.addBox(0.0F, 0.0F, 0.0F, 8, 12, 4, 0.0F);
    return new BodyPart[] {torso};
    }

    as you can see we now have 3 positions. One for the head and two for the arms. Just add them to the BodyPart constructor and you'll be fine. Also, note that the torso is created at 0, 0, 0. As you have read before, that is to ensure it fits on any type of legs.
    finally, the head and arms
    @Override
    public BodyPart[] initHead(ModelMinion model) {
    BodyPart head = new BodyPart(mobName, model, 0, 0);
    head.addBox(-4, 0, -4, 8, 8, 8, 0.0F);
    return new BodyPart[] {head};
    }
    
    
    @Override
    public BodyPart[] initArmLeft(ModelMinion model) {
    BodyPart armLeft = new BodyPart(mobName, model, 40, 16);
    armLeft.addBox(0.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F);
    armLeft.mirror = true;
    return new BodyPart[] {armLeft};
    }
    
    @Override
    public BodyPart[] initArmRight(ModelMinion model) {
    BodyPart armRight = new BodyPart(mobName, model, 40, 16);
    armRight.addBox(0.0F, 0.0F, -2.0F, 4, 12, 4, 0.0F);
    return new BodyPart[] {armRight};
    }

    These don't have locations stored in them, that's because there is nothing connected to them.

    congratulations, you now have your model. On to animating.

    create a new method in your NecroEntityExample class
    @Override
    public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity, BodyPart[] bodypart, String string) {
    }

    this looks a lot like your regular setRotationAngles method, but this one has two extra parameters. The bodypart array contains the bodyparts you have initialized, the string contains the type of bodypart that needs to get animated. I'll just show you the biped animation code:
    @Override
    public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity, BodyPart[] bodypart, String string) {
    if(string.equals("head")) {
    bodypart[0].rotateAngleY = par4 / (180F / (float)Math.PI);
    bodypart[0].rotateAngleX = par5 / (180F / (float)Math.PI);
    }
    if(string.equals("armLeft")) {
    bodypart[0].rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 2.0F * par2 * 0.5F;
    bodypart[0].rotateAngleZ = 0.0F;
    }
    if(string.equals("armRight")) {
    bodypart[0].rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 2.0F * par2 * 0.5F;
    bodypart[0].rotateAngleZ = 0.0F;
    }
    if(string.equals("legs")) {
    bodypart[0].rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 1.4F * par2;
    bodypart[1].rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 1.4F * par2;
    bodypart[0].rotateAngleY = 0.0F;
    bodypart[1].rotateAngleY = 0.0F;
    }
    }

    As you can see you can use the last parameter to see what is being animated. The biped model contains 2 legs, therefore the bodypart array contains 2 bodyparts.

    You have now created and animated a model!

    You should now have a class that extends NecroEntityBase and has it's own model and animations defined or you have a class that extends NecroEntityBiped or ModelQuadruped. All we have to do now is make sure players can create your mob. Change your constructor to this
    public NecroEntityExample() {
    super("EXAMPLE");
    headItem = new ItemStack(exampleMod.exampleHeadItem); // the head item
    torsoItem = new ItemStack(exampleMod.exampleTorsoItem); // the torso item
    armItem = new ItemStack(exampleMod.exampleArmItem); // the arm item
    legItem = new ItemStack(exampleMod.exampleLegItem); // the leg item
    // you use ItemStacks to support damagevalues
    
    texture = "/mob/zombie.png";
    //texture location
    
    textureHeigth = 64;
    //the zombie texture is not 32x32 but 32x64.
    
    
    hasHead = true;
    hasTorso = true;
    hasArms = true;
    hasLegs = true;
    //you can set these to false if your mob doesn't have some bodyparts. Creepers don't have arms for instance
    }

    and we need to add recipes
    @Override
    
    public void initRecipes() {
    headRecipe = new Object[] {"SSSS", "SBFS", "SEES",
    'S', new ItemStack(organs, 1, 4), //skin
    'E', Item.spiderEye,
    'F', Item.rottenFlesh,
    'B', new ItemStack(organs, 1, 0)}; //brains
    torsoRecipe = new Object[] {" LL ", "BHUB", "LEEL", "BLLB",
    'L', new ItemStack(organs, 1, 4), //skin
    'E', Item.rottenFlesh,
    'H', new ItemStack(organs, 1, 1), //heart
    'U', new ItemStack(organs, 1, 3), //lungs
    'B', Item.bone};
    armRecipe = new Object[] {"LLLL", "BMEB", "LLLL",
    'L', new ItemStack(organs, 1, 4), //skin
    'E', Item.rottenFlesh,
    'M', new ItemStack(organs, 1, 2), //muscle
    'B', Item.bone};
    legRecipe = new Object[] {"LBBL", "LMML", "LEEL", "LBBL",
    'L', new ItemStack(organs, 1, 4), //skin
    'E', Item.rottenFlesh,
    'M', new ItemStack(organs, 1, 2), //muscle
    'B', Item.bone};
    }

    Those are the recipes for the zombieparts. As you can see the item organs is used. This item stores brains, hearts, muscles, lungs and skin. Their damage value is in that order. Do not make any reference to "organs" outside this method. If you do, it can crash the game when the necromancy mod is not installed.

    You are now ready to distribute your mod. You need to compile, obfuscate and publish the API alongside your mod. If you do not do this and someone installs your mod without mine, their minecraft will crash.

    RECIPES/GUIDE

    For additional information, check the wiki.

    First things first. you need to get some blood. In order to harvest blood you need some Bone Needles. these are crafted like so:

    Craft yourself some Glass Bottles and hit a mob with a needle. This will consume the needle and the bottle, but you will get a Jar of Blood in return. If you're on a server you can also hit the other players to get their blood.
    Next up, the Necronomicon.

    With the necronomicon you can create yourself a Summoning Altar! Place 2 cobblestone and a plank in a row (in the world, not the crafting bench) and right click the plank. You still can't summon a minion yet though. You need to get some souls first. How? With a Scythe, a Blood Scythe.

    Use this weapon to kill some mobs and make sure you have some glass bottles left in your inventory. If you use the Scythe to deliver the final blow, a bottle will be filled with a soul.

    One more thing. You need a Sewing Machine to create bodyparts. It is crafted like so

    Now this is where it gets complicated. There are a lot of recipes so i won't post them all, but i'll show you the basic recipes, or templates if you will
    You need to start with getting some skin.


    with the skin, you can create heads, torso's, legs and arms. You'll also need some organs, these can be obtained by killing mobs.








    You'll notice that these recipes won't work and that they have holes in them. Like I said before, these are the template recipes. Let's say you want to create a spider head, you take the head template recipe and put some string next to the brain. If you want a zombie head you put some rotten flesh next to the brain.

    Back to the Summoning Altar. You should have body parts now and you should see a couple of slots in the Altar. The left one is for blood, the right one is for souls. Place your body parts in the center to create a minion. If you are happy with the way your minion looks and you have supplied the altar with blood and a soul, you shift right-click the wooden part and the minion will spawn. If you aren't creative, the altar will use up your blood, soul and body parts. If you have The Harken Scythe mod installed, you can also use their souls instead of mine.

    So what can you do with your minions? As of now, not much. They will follow and protect you. You can also saddle them by using a saddle on them. Keep in mind that this only works if you minion has a spider torso. Shift right click to mount the minion and right click again do dismount. If you want, you can craft yourself a Brain on a Stick to control them.



    One last thing. If you're the exploring kind, you might prefer to go to the nether to get your blood. Nether Chalice's spawn randomly in the lava lakes.

    They hold a ton of blood, but it can be dangerous to reach them. The blood can be picked up with buckets. You can transform Blood buckets to and from Jars of Blood like so




    Happy Summoning!


    HALL OF FAME

    crew and stuffs
    sirolf2009 main coder, idea's, models, textures
    Mr_boness idea's
    TheBlackPixel textures
    HP. Lovecraft writer

    donators
    Deborah W. $5.00 first donater ever!


    FAQ AND TROUBLESHOOT


    java.lang.IllegalArgumentException: Slot SOME_SLOT is already occupied by SOME_MOD.SOME_BLOCK when adding SOME_MOD.SOME_BLOCK

    Browse to appdata/Roaming/.minecraft/config/ there should be a file called necromancy.cfg, open it and look for the conflicting ID. once you've found it, change it to some other random number. note that this might screw up existing worlds.

    My minecraft crashed!
    There should be a log inside .minecraft/ForgeModLoader-client-0.txt post it or I can't help you

    Can I include this mod in my modpack?
    Yes, as long as you put up some clear credits to me and my team.

    Will you be adding more mobs?
    yes, maybe not all of them though. Slimes and blazes don't really have bodyparts and ghasts are a bit big to name a few


    VIDEOS

    The most recent review

    Captain Sparklez review! aww yeah! i feel like a bigshot now.


    Foreign mod reviews

    Polak
    Deutsch
    Português
    Français



    SCREENSHOTS










    INSTALLATION

    Download this mod version for your Minecraft version.
    Download Minecraft Forge for your Minecraft version.
    Drag and drop Forge into the minecraft.jar
    Drag and drop this mod into the mods folder.



    BANNER
    [center][url="http://www.minecraftforum.net/topic/1571429-145-the-necromancy-mod-open-beta-3-christmas-update-and-patches/"][img]https://dl.dropbox.com/u/50553915/banner1.png[/img][/url][/center]



    CHANGELOG

    Necromancy mod

    3/8/13 1.4
    Updated to 1.6.2
    Added: Thaumcraft API support.
    Added: Attributes
    Changed: The name of the altar for compatibility with the Aether mod.
    10/3/13 1.4b
    Fixed: Missing textures
    Fixed: Soul harvesting
    Added: A WIP block

    20/6/13 1.3
    Fixed: Crash when Minion owner is offline
    Fixed: Sewing recipes
    Fixed: Special scythes are rendered only for special people
    Fixed: Changing body parts
    Fixed(?): Buggy needles and blood harvesting

    17/6/13 1.2
    Added: Bone Scythe
    Fixed: Unable to harvest souls in multiplayer
    Fixed: non-opped players can now acces the minion command
    Fixed: Weird scythe rendering
    Changed: Needles now work with right mouse button
    Removed: Minion spawn eggs

    12/6/13 1.1
    Added: Cemetery (spawns in villages)
    Added: Necromantic villagers (spawn in cemeteries)
    Added: New command:
    /minion [set] [aggressive/passive]
    set your minions to aggressive or to passive
    
    /minion [friend] [*]
    set a player as a friend
    
    /minion [enemy] [*]
    set a player as a friend

    Changed: Ghouls spawn in every biome
    Changed: Minions have more health and deal more damage
    Fixed: Crash when harvesting souls
    Fixed: Crash when using skulls


    7/6/13 1.0
    updated to 1.5.2
    Added: NecroApi support
    Added: More bodyparts
    Added: New mob: Ghoul (AKA Nightcrawler)
    Added: Special scythes for special people
    Added: New command: "/remodel". This will re-initialize every bodypart from every minion
    Changed: BodyParts have their own tab in the creative menu
    Changed: The appearance of the necronomicon
    Changed: Rewrote the rendering system to support the NecroApi
    Changed: mcmod.info appearance (the page in the mod list)
    Changed: The appearance of the altar
    Fixed: Lag spikes

    22/12/12 open beta 4
    updated to 1.4.6
    recipe for the teddy bear
    rideable minions
    craftable Brain on a Stick
    Nether Chalices now generate in the nether
    liquid blood
    blood buckets

    16/12/12 open beta 3
    better SMP support (it's still not perfect)
    better algorithm to remove lag spikes
    fully functional sewing machine
    new mob: enderman
    christmas hats (will automatically be activated on christmas, or when you set christmas hats to true in the config file)

    24/11/12 open beta 2
    Update to 1.4.5
    Added Blood Scythe
    Removed Minion eggs
    New Necronomicon recipe

    Necro API

    3/8/13 1.2
    Added: Enum BodyPartLocation. Several methods have adapted this as a parameter rather than a string that indicates the location.
    Added: Attributes

    3/3/13 1.1b
    package changes; the classes have not changed

    13/2/13 1.1
    better documentation
    2 new methods in NecroEntityBase: preRender and postRender (used for rotationg)
    new class: NecroEntityQuadruped
    new interface: ISaddleAble, contains 2 methods: getRiderHeight and getSaddleTex
    changed the example class to not give errors


    DONATION

    This mod is free to use, donating is appreciated but not required.




    FINAL NOTE

    If you're wondering what that latin at the top means: Welcome friend. Let me tell you about my work, for you shall rule the world with it.
    Last edited by sirolf2009: 2/24/2014 4:31:17 PM
    schrödingers cat is
     return (new Random().nextInt(2) == 0 ? "alive" : "dead"); 
  • #2
    Yeah first, and cool mod and please update when you can. :)
    Last edited by Mrdude1234: 11/20/2012 1:40:21 PM
  • #3
    really been looking forward to this mod, and I'm sure it will be worth the wait ^.^
  • #4
    Quote from Killjoy5252

    really been looking forward to this mod, and I'm sure it will be worth the wait ^.^
    It is already out

    Another thing, you need some more info on the sewing machine I have no idea what I can do
    Last edited by Mrdude1234: 11/20/2012 2:28:53 PM
  • #5
    Quote from Mrdude1234

    It is already out

    Another thing, you need some more info on the sewing machine I have no idea what I can do


    nothing at the moment, in the future it will be used to craft bodyparts, which are required to summon minions
    schrödingers cat is
     return (new Random().nextInt(2) == 0 ? "alive" : "dead"); 
  • #6
    Quote from Mrdude1234

    It is already out

    Another thing, you need some more info on the sewing machine I have no idea what I can do

    no it was released for an out-of-date version of minecraft so unless you have an old folder you cant play it
    so technically its not out yet
  • #7
    Why (our)mobs are didn't stay or defend like teddy bear ^_^
  • #8
    Quote from Eruraion

    no it was released for an out-of-date version of minecraft so unless you have an old folder you cant play it
    so technically its not out yet
    Or get a downgrader like I have
    Here is a good one http://pyroslab.net/downcraft/ It goes back to Alpha 1.0.7
    Last edited by Mrdude1234: 11/20/2012 3:19:26 PM
  • #9
    Great mod, pretty original :) Will you be adding more stuff to it in the future?
    And by the way, shouldn't it be "Necronomicon" instead of "Necromicon"?
  • #10
    I found a bug... If you shift click in the sewing machine it crashes the game
  • #11
    Quote from sirolf2009

    SCREENSHOTS






    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!

    KILL IT!!!!

    KILL IT WITH FIRE!!!!!
  • #12
    Quote from AznaktaX

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!

    KILL IT!!!!

    KILL IT WITH FIRE!!!!!
    lol

    sirolf how do you control the mob
    Last edited by Mrdude1234: 11/20/2012 3:29:10 PM
  • #13
    This looks lots of fun, but being released today I'd hoped it was for Minecraft 1.4.4 (or maybe 1.4.5) but I can dust off my older Minecraft version and give it a try for a while. I hope you can get it working with 1.4.4 too. :)
    SsssssssssssssssssssssssssSURPRISE! "What the FUUUU..." BOOM

    Cue song: "Don't Fear The Creeper...."
  • #14
    Quote from Mrdude1234

    I found a bug... If you shift click in the sewing machine it crashes the game

    yeah... the sewing machine isn't really intended for use at this point
    Quote from PsiQss

    Great mod, pretty original :) Will you be adding more stuff to it in the future?
    And by the way, shouldn't it be "Necronomicon" instead of "Necromicon"?

    woops XD, i'll try to update this mod to 1.4.5 tomorrow, and remove that bug with it
    Quote from Mrdude1234

    lol

    sirolf how do you control the mob

    you don't but i can probably fix something up real quick so that you can tell them to follow/stand still by shift clicking
    schrödingers cat is
     return (new Random().nextInt(2) == 0 ? "alive" : "dead"); 
  • #15
    This mod looks fantastic. There is so much potential here to become something both wonderful and horrible at the same time. Please tell me you have plans for summonings, demonic creatures, complex rituals, etc. I real like the whole Lovecraft feeling.
  • #16
    Wow this looks amazing! kinda reminds me of the genetics mod in a way, but I have always loved necromancy! FTW!
  • #17
    I really like this mod already. I have always wanter to have a pet creeper/skeleton/spider minion to have in front of my house to scare off those darn griefers. And do you have plans for allowing the other hostile mobs, such as nether skeletons, zombie pigmen, endermen (if they're not too tall) and blazes, or are you only doing the overworld ones?
  • #18
    can you please make this mod a non forge mod? I cannot at all get forge to work no matter what :(
    The Game. You just lost it
  • #19
    PLEASE update to 1.4.4 PLEASE!!!!!!
  • #20
    Could you possibly add crafting recipes to the OP?
  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes