• 0

    posted a message on iPixeli's Gender Mod
    For some reason I'm having issues with getting this mod to work with Smart Moving/API, I placed all the zips; Mod Loader, Audio Mod, this mod, API Universal, API Render, Smart Moving, Scrollable Controls into the mod folder, loaded up Minecraft with those mods in the order listed, the player displays correctly for this mod, but always faces a single direction, and never displays the Smart Moving animations.
    Posted in: Minecraft Mods
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    Well the spawn limiting code is working pretty well, except for the fact that I lured my mob from one chunk to another chunk and ran into a second of the mob. D:
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    Just wondering, where do the "void func_##_o" things come from? I've seen them a few times but could never find what they originate to in files.

    Also is possible to make it so if I hurt the mob or kill it, since there's only one supposed to spawn at a time, that if I see the same one again or a new one spawns and I see it within a length of time after hurting/killing it it'll attack me, otherwise it'll go back to passive aggressive?

    Is there also a way I can make it fire a projectile like an arrow or fireball when out of melee range, but not be able to do so if it's in water, but also still be able to hurt the player by bumping into them if they get in melee range?
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    Here's the coding so far, this is the one that still gives me groups of 2 of the mob here and there, which should only be spawning 1.
    package net.minecraft.src;
    
    public class EntitySenku extends EntityMobs
    {
    
    	public EntitySenku(World world)
    	{
    		super(world);
    		//This is the texture for your mob
    		texture = "/mob/senku.png";
    		moveSpeed = 1.0F;
    		attackStrength = 6;
    		health = 20;
    		isImmuneToFire = true;
    	}
    
    	protected Entity findPlayerToAttack()
    	{
    		float f = getEntityBrightness(15.0F);
    		if(f < 0.5F)
    		{
    			double d = 16D;
    			return worldObj.getClosestPlayerToEntity(this, d);
    		} else
    		{
    			return null;
    		}
    	}
    
    	protected int getDropItemId()
    	{
    		// Replace with custom sword when it's created
    		return Item.swordGold.shiftedIndex;
    	}
    
    	public boolean getCanSpawnHere()
    	{
    		if(worldObj.countEntities(this.getClass()) > 1)
    		{
    			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);
    	}
    
    	public ItemStack getHeldItem()
    	{
            	return defaultHeldItem;
    	}
    
    	private static final ItemStack defaultHeldItem;
    
    	static // Replace with custom sword when it's created
    	{
    		defaultHeldItem = new ItemStack(Item.swordGold, 1);
    	}
    }


    I don't fully trust the spider attack code since it goes by lighting, but at least it currently attacks me in sunlight if I smack it, though sometimes it stops attacking me too as well as when I buried it in dirt it attacked me when I unburied it. Still need it to ALWAYS drop 1 of the getDropItem.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    I'm still getting groups of 2 with the > 1 code.

    Also is there a way to make the mob drops specific numbers of items, being either 1 specific item every death or more than 1 type of item every death or even randomly drop either a certain item or another certain item.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Human Mobs (MCP) [4/17/11]
    Yay, got everything of mine working, only problem is I'm not sure what Entity attributes work or not. EntityZombie has attackStrength but the compiler says there's no such string when I put it in my mob. I also don't know how to make the mob passive aggressive rather than passive OR aggressive.

    This also isn't working right.
        public boolean getCanSpawnHere()
            {
                     if(worldObj.countEntities(this.getClass()) >= 1){
                    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);
            }


    I have it set to 1, I've run into a group of 4-5.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Simple person mob (MCP) [30/1/11]
    Ok this is annoying the hell out of me, I've been trying to get a single mob to appear for a full week or two now. Today I noticed the spawnlist adding thing is different since I had no other way to know that till I was told. Still not working. I even used the tutorial files and modified them with a small test of extra code.

    EntityPigman.java
    package net.minecraft.src;
    
    public class EntityPigman extends EntityCreature
    {
    
    	public EntityPigman(World world)
    	{
    		super(world);
    		//This is the texture for your mob
    		texture = "/mob/mymob.png";
    	}
    
    	protected int getDropItemId()
    	{
    		//This is the item your mob will drop
    		return Item.porkCooked.shiftedIndex;
    	}
    }


    mod_Pigman.java
    package net.minecraft.src;
    
    import java.lang.reflect.Method;
    
    public class mod_Pigman extends BaseMod
    {
    	public mod_Pigman()
    	{
    	}
    
    	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(EntityPigman.class, "Pigman", ModLoader.getUniqueEntityId());
    		//This adds your mob to the spawn list.
    		ModLoader.RegisterEntityID(EntityPigman.class, "Pigman", ModLoader.getUniqueEntityId());
    		spawnlist.add("Surface biomes", 1, new Object[] {
    		EntityPigman.class
    		});
    	}
    }


    I purposely left both the old and new coding for the UniqueID thing cause I wasn't sure if anything was even working. No matter what I've tried I NEVER EVER see a new mob ANYWHERE.

    I've taken the newest BaseMod.class and ModLoader.class, put em both in a clean Minecraft jar, decompiled the jar, put in the mod_ file and entity file along with the entitylist file. Recompiled, obf'd, added the texture file to the jar since just placing it in temp>mob doesn't seem to work. Booted, and you can guess. :SSSS:

    Any ideas?
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Unfortunately I've got no answer for you Cosmic, but did you get anything from my error code? :<
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Cosmic, here's the error code

    *** Minecraft Coder Pack Version 2.7 ***
    Finding javac.exe... if you want to speed this up, add it to your PATH
    Path set.
    Compiling Minecraft
    sources\minecraft\net\minecraft\src\mod_Senku.java:21: cannot find symbol
    symbol  : method addCreaturesToSpawnList(java.lang.String,java.lang.Class<net.mi
    necraft.src.EntitySenku>)
    location: class net.minecraft.src.spawnlist
                    spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.
    class);
                             ^
    1 error
    Compiling Minecraft Start Class
    *** minecraft_server.jar was not found, skipping
    === MCP 2.7 recompile script finished ===
    Press any key to continue . . .


    Oh that's odd.. the line 19 error is gone, well 21 is still there.
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    I opened my code in Eclipse, it didn't seem to have any red marks. Really can't see any issue here. Though the errors I keep getting keep referring to lines 19 and 21. :SSSS:

    package net.minecraft.src;
    
    import java.lang.reflect.Method;
    
    public class mod_Senku extends BaseMod
    {
    	public mod_Senku()
    	{
    	}
    
    	public String Version()
    	{
    		return "Senku Mob 1.0";
    	}
    	
    	public void AddEntityID()
    	{
    		//This defines your entity. Class name, entity name, and then the entity ID.
    		EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getUniqueEntityId());
    		//This adds your mob to the spawn list.
    		spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.class);
    	}
    }


    Line 19
    		EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getUniqueEntityId());

    Line 21
    		spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.class);
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    package net.minecraft.src;
    
    import java.lang.reflect.Method;
    
    public class mod_Senku extends BaseMod
    {
    	public mod_Senku()
    	{
    	}
    	
    	public String Version()
    	{
    		return "Senku Mob v 1.0";
    	}
    
    	public void AddEntityID()
    	{
    		//This defines your entity. Class name, entity name, and then the entity ID.
    		EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getUniqueEntityId());
    		//This adds your mob to the spawn list.
    		spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.class);
    	}
    }


    *** Minecraft Coder Pack Version 2.7 ***
    Finding javac.exe... if you want to speed this up, add it to your PATH
    Path set.
    Compiling Minecraft
    sources\minecraft\net\minecraft\src\mod_Senku.java:19: addMapping(java.lang.Clas
    s,java.lang.String,int) has private access in net.minecraft.src.EntityList
                    EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getU
    niqueEntityId());
                              ^
    sources\minecraft\net\minecraft\src\mod_Senku.java:21: cannot find symbol
    symbol  : method addCreaturesToSpawnList(java.lang.String,java.lang.Class<net.mi
    necraft.src.EntitySenku>)
    location: class net.minecraft.src.spawnlist
                    spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.
    class);
                             ^
    2 errors
    Compiling Minecraft Start Class
    *** minecraft_server.jar was not found, skipping
    === MCP 2.7 recompile script finished ===
    Press any key to continue . . .
    I need help with this, I can't figure out what the symbol is, and private access?
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    package net.minecraft.src;
    
    import java.lang.reflect.Method;
    
    public class mod_Senku extends BaseMod
    {
    	public mod_Senku()
    	{
    	}
    	
    	public String Version()
    	{
    		return "Senku Mob v 1.0";
    	}
    
    	public void AddEntityID()
    	{
    		//This defines your entity. Class name, entity name, and then the entity ID.
    		EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getUniqueEntityId());
    		//This adds your mob to the spawn list.
    		spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.class);
    	}
    }
    It now errors:
    *** Minecraft Coder Pack Version 2.7 ***
    Finding javac.exe... if you want to speed this up, add it to your PATH
    Path set.
    Compiling Minecraft
    sources\minecraft\net\minecraft\src\mod_Senku.java:19: addMapping(java.lang.Clas
    s,java.lang.String,int) has private access in net.minecraft.src.EntityList
                    EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getU
    niqueEntityId());
                              ^
    sources\minecraft\net\minecraft\src\mod_Senku.java:21: cannot find symbol
    symbol  : method addCreaturesToSpawnList(java.lang.String,java.lang.Class<net.mi
    necraft.src.EntitySenku>)
    location: class net.minecraft.src.spawnlist
                    spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.
    class);
                             ^
    2 errors
    Compiling Minecraft Start Class
    *** minecraft_server.jar was not found, skipping
    === MCP 2.7 recompile script finished ===
    Press any key to continue . . .
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Simple person mob (MCP) [30/1/11]
    *** Minecraft Coder Pack Version 2.7 ***
    Finding javac.exe... if you want to speed this up, add it to your PATH
    Path set.
    Compiling Minecraft
    sources\minecraft\net\minecraft\src\mod_Senku.java:5: net.minecraft.src.mod_Senk
    u is not abstract and does not override abstract method Version() in net.minecra
    ft.src.BaseMod
    public class mod_Senku extends BaseMod
           ^
    sources\minecraft\net\minecraft\src\mod_Senku.java:14: addMapping(java.lang.Clas
    s,java.lang.String,int) has private access in net.minecraft.src.EntityList
                    EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getU
    niqueEntityId());
                              ^
    sources\minecraft\net\minecraft\src\mod_Senku.java:16: cannot find symbol
    symbol  : method addCreaturesToSpawnList(java.lang.String,java.lang.Class<net.mi
    necraft.src.EntitySenku>)
    location: class net.minecraft.src.spawnlist
                    spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.
    class);
                             ^
    3 errors
    Compiling Minecraft Start Class
    *** minecraft_server.jar was not found, skipping
    === MCP 2.7 recompile script finished ===
    Press any key to continue . . .


    I keep getting this every time I try and compile. Can anyone help?
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    *** Minecraft Coder Pack Version 2.7 ***
    Finding javac.exe... if you want to speed this up, add it to your PATH
    Path set.
    Compiling Minecraft
    sources\minecraft\net\minecraft\src\mod_Senku.java:5: net.minecraft.src.mod_Senk
    u is not abstract and does not override abstract method Version() in net.minecra
    ft.src.BaseMod
    public class mod_Senku extends BaseMod
           ^
    sources\minecraft\net\minecraft\src\mod_Senku.java:14: addMapping(java.lang.Clas
    s,java.lang.String,int) has private access in net.minecraft.src.EntityList
                    EntityList.addMapping(EntitySenku.class, "Senku", ModLoader.getU
    niqueEntityId());
                              ^
    sources\minecraft\net\minecraft\src\mod_Senku.java:16: cannot find symbol
    symbol  : method addCreaturesToSpawnList(java.lang.String,java.lang.Class<net.mi
    necraft.src.EntitySenku>)
    location: class net.minecraft.src.spawnlist
                    spawnlist.addCreaturesToSpawnList("Surface biomes", EntitySenku.
    class);
                             ^
    3 errors
    Compiling Minecraft Start Class
    *** minecraft_server.jar was not found, skipping
    === MCP 2.7 recompile script finished ===
    Press any key to continue . . .


    I keep getting this every time I try and compile. Can anyone help?
    Posted in: Tutorials
  • To post a comment, please or register a new account.