• 0

    posted a message on mod help
    Quote from Xxbiohazardxx »
    i have just one last question, which line can you edit your mobs health and setting of the brightness where it can spawn

    Under:
    public Entitygman(World world)
       {
          super(world);
          //This is the texture for your mob
          texture = "/mob/gman.png";
        }
    anywhere in that little group, add
    health = 100;
    change 100 to whatever you want I guess, 100 is pretty high.
    Also I need to edit what I said earlier, to make you mobs carry items add this code to mod_
    public void AddRenderer(Map map)
        {
    map.put(Entitygman.class, new RenderBiped(new ModelBiped(), 0.5F));
    }

    as for the brightness, add this to your code somewhere in Entitygman
    public boolean getCanSpawnHere()
        {
                 
            int i = MathHelper.floor_double(posX);
            int j = MathHelper.floor_double(boundingBox.minY);
            int k = MathHelper.floor_double(posZ);
            int l = worldObj.getBlockId(i, j - 1, k);
            return worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && worldObj.getBlockLightValue(i, j, k) > 8 && !worldObj.getIsAnyLiquid(boundingBox) 
        }

    change the 8 to whatever, i've never played with that value so idk how to help you there.
    Posted in: Mods Discussion
  • 0

    posted a message on [REQ] Notch, Herobrine, Israphel Mobs
    If you can post the skins I'll do it for you.
    Posted in: Mods Discussion
  • 0

    posted a message on mod help
    *edit:glad I could help man.
    Posted in: Mods Discussion
  • 0

    posted a message on mod help
    Hey this might not be it but at the very top of your mod_ file do you have this bit of code
    package net.minecraft.src;
    
    import java.lang.reflect.Method;
    import java.util.Map;

    It's easy to miss that's why I ask.
    Posted in: Mods Discussion
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    Quote from ZombieMannequin »
    http://i.imgur.com/oiGiK.png

    YES

    YES

    YOU ARE THE BEST. It fixed all of the problems I was having trying to get this to work. Thank you a ton!

    :smile.gif: Glad I could help.
    Posted in: Tutorials
  • 0

    posted a message on mod help
    Have you changed ur codes? Post your source codes for both files again please.
    Posted in: Mods Discussion
  • 0

    posted a message on mod help
    Did you decompile with all of the modloader files or just Modloader and BaseMod?
    Posted in: Mods Discussion
  • 0

    posted a message on mod help
    Take the "s" off of creatures in your Entitygman. Might actually fix everything. and yes I did just forget the vaultboy thing lol.
    Posted in: Mods Discussion
  • 0

    posted a message on mod help
    your problem is in the mod_ file. replace this
    public class mod_gman extends BaseMod
    {
       public mod_gman()
       {
       }
       
       public String Version()
       {
          return "1.2_02";
       }
       
       public void AddEntityID()
       {
          //This defines your entity. Class name, entity name, and then the entity ID.
          EntityList.addMapping(Entitygman.class, "gman", ModLoader.getUniqueEntityId());
          //This adds your mob to the spawn list.
          spawnlist.addCreaturesToSpawnList("Surface biomes", Entitygman.class);
       }
    }
    with this
     public class mod_vaultboy extends BaseMod
    {
    	
      public String Version()
        {
            return "mod_gman version 0.1";
        }
    	 public mod_gman()
        {
            ModLoader.RegisterEntityID(Entitygman.class, "gman", ModLoader.getUniqueEntityId());
            spawnlist.add("Surface biomes", 1, new Object[] {
                Entitygman.class
            });
    }
    }
    Posted in: Mods Discussion
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    Sorry I have been gone for so long, truth be told I don't mod much anymore. I happened to check up on modloader's changes tho, and here is an update to the tutorial so people can start modding again, at least for a little while.

    Note: It looks as though spawnlist was merged with Modloader, so there is no longer a need to use it. For people updating mods, please remove it from the src folder before recompiling. The only change you should need to make is to remove the bit about spawnlist in the mod_file and replace it with
     ModLoader.AddSpawn(EntityPigman.class, 8, EnumCreatureType.creature);//not sure what the 8 does, play around with it if you want


    I am creating this guide as more of an update to this guide: viewtopic.php?f=25&t=102487 by Club559. I have his permission to recreate this guide.
    As his guide says, you need Modloader and Spawnlist. You will also need Minecraft Coder Pack.
    Modloader: viewtopic.php?f=25&t=80246&hilit
    MCP: http://mcp.ocean-labs.de/index.php/MCP_Releases
    You will also be using his tutorial files(I really see no reason to reupload the same files), and a clean minecraft.jar.
    Once you have these five things, here is what you do:
    1. Add all of the contents of Modloader to your minecraft.jar
    2.SKIP THIS STEP Add spawnlist.class to your minecraft.jar.
    3. Add your entire bin folder to the jars folder in MCP.
    4. Run decompile.bat.
    5. Open the sources folder in MCP. Open all subfolders, and eventually src.
    6. Copy the files from the sources for mcp folder of your tutorial folder(excluding Basemod, spawnlist, and Modloader)into the src folder in MCP.
    7. Open EntityPigman.java(from the src folder of MCP) with any java editing program.(I use Netbeans).
    8. Replace Pigman with the name of your mob(you can call it whatever you want, as long as it is the same everywhere, and code is ALWAYS case sensitive.)Also replace mymob.png with the name of your mob.(Make sure this is the same as the filename of your mob skin. for example: If your mod is called mod_Vaultboy, you would probably want to call your picture Vaultboy.png(it has to be a .png file btw) and so you would write Vaultboy.png where mymob.png is written.) If you would like your mob to drop something other than pork, check Item.java for a list of item ID's. If you want it to drop a block replace
    return Item.porkCooked.shiftedIndex;
    with this
    return Block.nameofblock.blockID;

    9. Save it.(If using Netbeans, DO NOT Save As to rename it, as this will not save as a .java file. Idk if all java editors are like this. Instead, Save, and close. Rename it externally.)
    10. Open mod_Pigman.java(from the src folder of MCP).
    11. This time you need to change a bit more code. In fact, you will be replacing all of it. Copy this code
    package net.minecraft.src;
    
    import java.lang.reflect.Method;
    import java.util.Map;
    
    public class mod_Pigman extends BaseMod
    {
    	
      public String Version()
        {
    //not sure exactly what this does, but I know that you can write pretty much anything you want in there.
            return "mod_Pigman version 0.3";
        }
    	 public mod_Pigman()
        {
            ModLoader.RegisterEntityID(EntityPigman.class, "Pigman", ModLoader.getUniqueEntityId());
            ModLoader.AddSpawn(EntityPigman.class, 8, EnumCreatureType.creature);//not sure what the 8 does, play around with it if you want
    }
    //this part gives your mob a human model. This part is necessary if you want your mob to be able to carry stuff.
              public void AddRenderer(Map map)
        {
            map.put(EntityPigman.class, new RenderBiped(new ModelBiped(), 0.5F));
        }
    }

    Now, of course, replace Pigman with the name of your mob. If you would like to change where you mob spawns, open up spawnlist.java(from src in MCP) for a list of different biomes, and replace Surface biomes(In this file, not spawnlist.java) with what you want.
    12.Save this file. Rename it externally.
    13.Run recompile.bat.(Found in the MCP folder).
    14.If recompile.bat did not return any errors, skip step 14.b.
    14.b)If recompile.bat did return an error, make sure to go through both of your mod's files and check for spelling and capitalization errors, and make sure you followed these steps exactly.
    15.Open the conf folder, and open clientobfuscation.txt.
    16.Erase what is written there, and write the names of your mod files, one per line. Ex: If your file is called mod_Pigman.java, you would write mod_Pigman
    17.Save.
    18.Run reobf.bat.(If there is an error here chances are you have a spelling error in clientobfuscation.txt.)
    19.This is important. Running test.bat will not work because you do not have all of the modloader files, so you have to take the files from your final_out/minecraft folder, and put them directly into your minecraft.jar(the one in your .minecraft/bin folder). If you are uncomfortable with testing this mod on your world, create a new one to test it out(having single player commands really helps test this). I am 99% sure this can not wreck a save, but play it safe if you are worried.
    20.Put your mob skin into the mob folder of your minecraft.jar.
    21.Enjoy your mod.

    *NOTE: You do not need to compile Entitylist, modloader, basemod or spawnlist. You only need to compile mod_Yourmob and EntityYourmob. You will still need the latest spawnlist and modloader to run your mod(all modloader files will be needed).

    Please feel free to post any errors you find, questions and concerns. I will check back from time to time. I hope this helps a lot.

    For those of you looking to create custom sounds for your mobs, while I can't explain the process, I can tell you how to add them to your mob.

    put this in EntityYourmob
    protected String getLivingSound()
        {
            return "mob.skeleton";
        }
    
        protected String getHurtSound()
        {
            return "mob.skeletonhurt";
        }
    
        protected String getDeathSound()
        {
            return "mob.skeletonhurt";
        }

    replace "mob" with the name of the folder your sounds are in, and after the period comes the name of the sound. if you have a couple different sounds for each thing, just name them the same with 2, 3, 4, etc. the folder path should be .minecraft/resources/mod/sound/yourfolder.this code makes your mod dependent on audiomod.


    Alright, so you've created your mob, but now your world is flooded with these things. Well, here's what you do.
    Somewhere in your EntityYourmob file, add this little chunk of code
    public boolean getCanSpawnHere()
        {
                 if(worldObj.countEntities(this.getClass()) >= 15){
                return false;
            }
            int i = MathHelper.floor_double(posX);
            int j = MathHelper.floor_double(boundingBox.minY);
            int k = MathHelper.floor_double(posZ);
            int l = worldObj.getBlockId(i, j - 1, k);
            return worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && worldObj.getBlockLightValue(i, j, k) > 8 && !worldObj.getIsAnyLiquid(boundingBox);
        }
    Change the 15 in the first line to whatever you would like, and that will effectively regulate how many of your mobs can exist in your world at once. 15's a pretty good number to me though. Also if you are having a problem with your mobs not being spread out enough, try implementing this code
    public int getMaxSpawnedInChunk()
    {
    return 1;
    }

    Again obviously change that number to whatever you want(as long as it's less than the max amount of entities that can exist...). I'm pretty sure you can figure out what that code does and it can go pretty much anywhere, just make sure you don't put it inside another code... Lol.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Simple person mob (MCP) [30/1/11]
    To anyone having problems recompiling, make sure to take Basemod and modLoader files from the most recent version of Modloader. Do not take the other files. Also make sure to use the most recent spawnlist. This should fix all decompile/recompile errors relevant to those two. NOTE: If you do this, you will not be able to run test.bat. You will have to reobfuscate the files, and test them on your own.

    Also the way spawnlist and modloader are called in this guide are wrong.

    ModLoader.RegisterEntityID(Entityvaultboy.class, "vaultboy", ModLoader.getUniqueEntityId());
    spawnlist.add("Surface biomes", 1, new Object[] {
    Entityvaultboy.class
    });

    that is the proper syntax. Obviously replace vaultboy with the name of your mob. that should fix pretty much all of your problems. Good luck.
    Posted in: Tutorials
  • 0

    posted a message on [MAP] Criswelvania v1.3.0 - UPDATED!
    Holy **** man, good job.
    Posted in: Mods Discussion
  • 0

    posted a message on [MOD] Biohazard's mods Warriors v2 comming soon!
    Quote from Xxbiohazardxx »
    Quote from Rogue_Creeper »
    looks good but cows drop pork? i thought they were beef oh well... good job though


    oh yeah, oh and im working on a stand alone mod :biggrin.gif: (and ive been working on it for a week now and im quite stupid cuz i cant quite get it to compile but ill get it fixed soon i hope)

    Are you using MCP? If so, post your error log and i'm 80% sure I know what you are doing wrong.
    Posted in: Mods Discussion
  • 0

    posted a message on [REQ] Abandoned villages.
    I certainly can't promise anything but I might be able to modify Kodaichizero's code to spawn villages instead of battletowers(if he says it's alright of course).
    Posted in: Mods Discussion
  • 0

    posted a message on Mo' Creatures - v12.0.0 for Minecraft 1.12.1!! Now Opensource!!
    Is there a way to get female lions to stop spawning, the only one listed in the properties file is the male.
    Posted in: Minecraft Mods
  • To post a comment, please .