• 0

    posted a message on Flying mob fail
    Quote from mister_person

    that EntityBlueSlime turns into when it jumps.

    this is the part i don't get
    and moveEntityWithheading isn't a variable... maybe because i have the method in an if statement ... maybe i'll remove the heading part... idk
    Posted in: Mods Discussion
  • 0

    posted a message on Flying mob fail
    Quote from mister_person

    I mean? I said that!
    And that's wouldn't because most of the classes you'd have to copy are named the same as other ones in EntityBlueSlime.

    i added this in but i get an error "void is an invalid type for the variable moveEntityWithheading"
    idk what to do now
    public void moveEntityWithHeading(float f, float f1)
        	    {
        	        if(isInWater())
        	        {
        	            moveFlying(f, f1, 0.02F);
        	            moveEntity(motionX, motionY, motionZ);
        	            motionX *= 0.80000001192092896D;
        	            motionY *= 0.80000001192092896D;
        	            motionZ *= 0.80000001192092896D;
        	        } else
        	        if(handleLavaMovement())
        	        {
        	            moveFlying(f, f1, 0.02F);
        	            moveEntity(motionX, motionY, motionZ);
        	            motionX *= 0.5D;
        	            motionY *= 0.5D;
        	            motionZ *= 0.5D;
        	        } else
        	        {
        	            float f2 = 0.91F;
        	            if(onGround)
        	            {
        	                f2 = 0.5460001F;
        	                int i = worldObj.getBlockId(MathHelper.floor_double(posX), MathHelper.floor_double(boundingBox.minY) - 1, MathHelper.floor_double(posZ));
        	                if(i > 0)
        	                {
        	                    f2 = Block.blocksList[i].slipperiness * 0.91F;
        	                }
        	            }
        	            float f3 = 0.1627714F / (f2 * f2 * f2);
        	            moveFlying(f, f1, onGround ? 0.1F * f3 : 0.02F);
        	            f2 = 0.91F;
        	            if(onGround)
        	            {
        	                f2 = 0.5460001F;
        	                int j = worldObj.getBlockId(MathHelper.floor_double(posX), MathHelper.floor_double(boundingBox.minY) - 1, MathHelper.floor_double(posZ));
        	                if(j > 0)
        	                {
        	                    f2 = Block.blocksList[j].slipperiness * 0.91F;
        	                }
        	            }
        	            moveEntity(motionX, motionY, motionZ);
        	            motionX *= f2;
        	            motionY *= f2;
        	            motionZ *= f2;
        	        }
        	        field_705_Q = field_704_R;
        	        double d = posX - prevPosX;
        	        double d1 = posZ - prevPosZ;
        	        float f4 = MathHelper.sqrt_double(d * d + d1 * d1) * 4F;
        	        if(f4 > 1.0F)
        	        {
        	            f4 = 1.0F;
        	        }
        	        field_704_R += (f4 - field_704_R) * 0.4F;
        	        field_703_S += field_704_R;
        	    }
    
        	  
        	}
    Posted in: Mods Discussion
  • 0

    posted a message on Flying mob fail
    Quote from mister_person

    You can't change what the class extends mid-class. I was saying to grab some of the code from EntityFlying and put it in EntityBlueSlime, whitch would be very hard, but necessary if you wanted to bring the EntityGhast methods into EntityBlueSlime. My second suggestion would be much easier.

    i feel really stupid :sleep.gif:
    haha ok well i'll try it
    *facepalm at self*
    Posted in: Mods Discussion
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    what is the actualy name of ur file? make sure it is the same as whatever is the first line there
    Posted in: Tutorials
  • 0

    posted a message on Flying mob fail
    Quote from Supertt007

    Try grab the class to your class from entity flying

    come again? haha like entity BlueSlime grab EntityBlueSlimeFlying? somethin like that or what?
    Posted in: Mods Discussion
  • 0

    posted a message on Flying mob fail
    Quote from mister_person

    Nope, sorry. I don't even know how to use modloader.

    ah i c ok well thanks
    but im not really fluent enough in java to know how to change what the class extends mid class.. it gives me an error when i put
    ublic boolean interact(EntityPlayer entityplayer){
        	this.motionY += 0.9;
        	if(motionY > 0.899999999999999999){
        		EntityBlueSlime extends EntityBlueSlimeFlying;
        	}
        	return true;
        }
    Posted in: Mods Discussion
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from inlanoche

    I suck. I cleaned that up after, but it's an easy fix. just add
    return true;


    with the other code, if you set it's motionY to a positive value, it will go up. I would say try something between 0.5 and 2. Any more and it will shoot up so fast you'll think it disapeared. just look up and you will see it fluttering down.

    As to having it fly around, you need to give it a location, or let it do it's own thing. I was about to look at code to make them glide forward, but I would actually leave the movement up to the AI for now.

    ok i'll keep experimenting then thanks
    Posted in: Tutorials
  • 0

    posted a message on Flying mob fail
    Quote from mister_person

    EntityChicken extends EntityAnimal, and so does EntityBlueSlime, but EntityGhast extends entityFlying, so you may also have to borrow some methods from EntityFlying. You could also make a new entity called EntityBlueSlimeFlying that extends EntityFlying and have it so whenever an EntityBlueSlime jumps it turns into an EntityBlueSlimeFlying.

    thank you very much
    i'll try that out
    any idea on the audiomod aspect? all the tutorials i could find were talking about installing it to use the mods
    Posted in: Mods Discussion
  • 0

    posted a message on Flying mob fail
    Ok i've been sort of messing around getting the hang of modding and i made a slimetype creature but i want it to kind of act like a chicken but when it jumps up i want it to fly and stay flying (not too high) for a short while and eventually come back down
    now i borrowed code from the chickenEntity class and mad eit so it acts just like a chicken and even jumps up when i right click it but i wanted to make it stay flying so i went to entitygahst class and borrowed a couple methods and put them in
    but now when i right click it it just dissapears... his name was Tedd..... i miss you tedd...but anyways i was wondering what was wrong..
    i'll keep messing with stuff but i thought maybe someone out there knows what to do hahaha
    here's my code:
    package net.minecraft.src;
    import java.util.*;
    
    public class EntityBlueSlime extends EntityAnimal
    {
        public EntityBlueSlime(World world)
        {
            super(world);
            field_753_a = false;
            field_752_b = 0.0F;
            destPos = 0.0F;
            field_755_h = 1.0F;
            texture = "/textures/mobs/BlueSlime.png";
            setSize(0.9F, 1.3F);
            health = 20;
        }
        
        
        
        protected void fall(float f)
        {
        }
        
        public void writeEntityToNBT(NBTTagCompound nbttagcompound)
        {
            super.writeEntityToNBT(nbttagcompound);
        }
    
        public void readEntityFromNBT(NBTTagCompound nbttagcompound)
        {
            super.readEntityFromNBT(nbttagcompound);
        }
    
        protected String getLivingSound()
        {
            return "mob.blueslime";
        }
    
        protected String getHurtSound()
        {
            return "mob.blueslime";
        }
    
        protected String getDeathSound()
        {
            return "mob.blueslime";
        }
    
        protected float getSoundVolume()
        {
            return 2F;
        }
    
        protected int getDropItemId()
        {
            return 264;
        }
        public ItemStack getHeldItem()
        {
            return new ItemStack(Item.feather);
        }
        public void onLivingUpdate()
        {
            super.onLivingUpdate();
            field_756_e = field_752_b;
            field_757_d = destPos;
            destPos += (double)(onGround ? -1 : 4) * 0.29999999999999999D;
            if(destPos < 0.0F)
            {
                destPos = 0.0F;
            }
            if(destPos > 1.0F)
            {
                destPos = 1.0F;
            }
            if(!onGround && field_755_h < 1.0F)
            {
                field_755_h = 1.0F;
            }
            field_755_h *= 0.90000000000000002D;
            if(!onGround && motionY < 0.0D)
            {
                motionY *= 0.59999999999999998D;
            }
            field_752_b += field_755_h * 2.0F;
            if(this.isInWater())
            {
                    posY += 1;
                    this.motionY += 0.5;
            }
         
            
        }
        public boolean interact(EntityPlayer entityplayer){
        	this.motionY += 0.9;
        	if(motionY < 0.899999999999999999){
        		if(isCourseTraversable(waypointX, waypointY, waypointZ, d3))
                {
                    motionX += (d / d3) * 0.10000000000000001D;
                    motionY += (d1 / d3) * 0.10000000000000001D;
                    motionZ += (d2 / d3) * 0.10000000000000001D;
                } else
                {
                    waypointX = posX;
                    waypointY = posY;
                    waypointZ = posZ;
                }
        	}
        	return true;
        }
        
        private boolean isCourseTraversable(double d, double d1, double d2, double d3)
        {
            double d4 = (waypointX - posX) / d3;
            double d5 = (waypointY - posY) / d3;
            double d6 = (waypointZ - posZ) / d3;
            AxisAlignedBB axisalignedbb = boundingBox.copy();
            for(int i = 1; (double)i < d3; i++)
            {
                axisalignedbb.offset(d4, d5, d6);
                if(worldObj.getCollidingBoundingBoxes(this, axisalignedbb).size() > 0)
                {
                    return false;
                }
            }
    
            return true;
        }
        
        
        
        
        
        
        
        
        
        
        
            
            
       
        public double waypointX;
        public double waypointY;
        public double waypointZ; 
        public double d = waypointX - posX;
        public double d1 = waypointY - posY;
        public double d2 = waypointZ - posZ;
        public double d3 = MathHelper.sqrt_double(d * d + d1 * d1 + d2 * d2);
    	public boolean field_753_a;
        public float field_752_b;
        public float destPos;
        public float field_757_d;
        public float field_756_e;
        public float field_755_h;
    
    }
    also DOES ANYONE KNOW HOW TO USE AUDIOMOD TO GIVE MY MOBS SOUND!!!???
    Posted in: Mods Discussion
  • 0

    posted a message on [WIP] Minecraft Badlands[MOD]
    Quote from Baneblade

    Welcome to the Badlands of Minecraftia! A product of the war between the forces of two great nations, the once pristine world of Minecraftia is now an irradiated wasteland. You wake up to find yourself in the barren wastes. Use anything you can find to survive!

    This mod seeks to add a Fallout-style survival aspect to Minecraft's survival mode. This means more dangerous creatures, a ruined environment, new wastelander and raider villages, and various firearms. However, this is not a copy of the Wastelands Mod. For one, those modders have much more experience than I do and they also are specifically avoiding any content from existing games. Please be patient with my progress as this is my first mod. I will be dividing the content into tiers for easier track of progress. Green denotes features currently enacted, orange denotes features I have worked on but are not finished, and red denotes features I have just started.

    WASTELAND SCAVENGER (Tier 1)

    • New wasteland plants, including broc flowers, xander root, agavae, and more
    • Healing powder from broc flower and xander root

    • Wasteland shrub grass
    • Hardened, infertile and irradiated soil
    • A campfire for light and cooking meat

    • New ores, including clumped oil, lead, copper, tin, sulfur, and niter
    • Passive creatures will now attack you if provoked
    • New wasteland creatures including geckos, giant ants, raiders, human NPCs, and more
    • New hand tools
    • Flint tools (weaker than wood)
    • Dehydration, starvation, energy-loss, irradiation
    • New ruins to explore and loot
    • Passive and aggressive human villages
    • New firearms
    • And more!

    I would like to thank:
    rhodox for creating the Painterly Pack some of my icons are based off of

    This mod is Copyright ©(2011) and is my intellectual property. Only minecraftforum.net is allowed to host any of my material without my consent. It may not be placed on any web site or otherwise distributed publicly without advance written permission. Descriptions or other content on the mod (for example, reviews) are allowed as long as the download links provided point to this thread. Works derived from this mod in any significant way, for instance by re-using the mod's source code, are forbidden without written permission.

    its a WIP but you've finished everything? well sounds great
    Posted in: Mods Discussion
  • 0

    posted a message on [ModLoader1.7.3] Adding Custom MOBs and MORE!
    Quote from inlanoche

    Fly and Float down code


    That's pretty much it. Well, you say, how do I see it fly? well let's make a little code to "poke" it into flying. Add this other method:
        public boolean interact(EntityPlayer entityplayer)
        {
        	//rightclick on this entity to make it jump up
        	this.motionY += 1;
        }

    Don't use a big number, this will have it jump several feet into the air, then flap it's wings back down. If you notice, they use multipliers (of less than 1) when adjusting the motionY variable. I once set it to 5, and wondered where the mob went. It was way up in the sky, and took a while to get back down.

    If you want to make a block that throws you into the air, you can use this idea on a block. Of course, if you don't have the flying code, you're in for quite a fall. :smile.gif:

    it gives me an error "this method must return a type boolean"... idk what to do
    and also what code could i change that makes it so that it could jump up and fly?
    and possibly eventually control it? hmm :biggrin.gif:
    but really all i need to know is the boolean thing and the jump and fly part haha.. cuz the way it works now it only slightly goes up
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader]Zid's Tutorials - Not Just ModLoader[12/04/2011]
    i went to the website and i got an account and everything but it wouldnt let me comment on the mob tutorial..... im confused
    Posted in: Tutorials
  • 0

    posted a message on The recipe for my Armor just creates what it's made of?!
    but one more thing... how do i make it so that my ore can be easily destroyed with my pickaxe?
    it doesnt seem to work well
    Posted in: Mods Discussion
  • 0

    posted a message on The recipe for my Armor just creates what it's made of?!
    I FOUND MY PROBLEM THERE WAS A CONFLICT OF IDS ITS ALL FIXED NOW THANK YOU TO EVERYONE WHO TRIED TO HELP :biggrin.gif: :Diamond: :Diamond:
    Posted in: Mods Discussion
  • 0

    posted a message on The recipe for my Armor just creates what it's made of?!
    Quote from runeman3114

    Well, I hope this will be the final post you require to get your mod working. The problem is that you haven't defined any armor for your new armor set. You have done it for the body, but it won't register it, since the code is outside the constructor (at least I think). This piece of code:

    ModLoader.AddArmor("armorName");


    Needs to be in the constructor of your class.
    I copied your code, tried my method, and it seems to have worked. If you still struggle, I could send you your code with my slight adjustment to it.

    Hope I helped! :smile.gif:

    P.S. Where did you get your world object for the GenerateSurface method? Usually you would have to make a world object for that method. If you don't know how to do that, I could also try and show you. Unless, everything is working the way you want it to. Which, in that case... nvm

    ok right now i'm away from the computer with my code so i can't see if it worked but it makes sense what you said
    well i used a video by some guy names like.. Glenn something on youtube and that's how he said to do it if you know how to do it a different way i would gladly accept your help ahaha :biggrin.gif:
    oh and one thing i was just wondering.. when i mine my ore it doesnt change depending on which pickaxe i use.. like when i use my Chromium pickaxe its the same as wood even though it works faster with everything else
    EDIT:
    nope didnt help could you send me the code that worked so i can see what i did wrong?
    just in case i'll post my code as it is now:
    // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
    // Jad home page: http://www.kpdus.com/jad.html
    // Decompiler options: packimports(3) braces deadcode 
    
    package net.minecraft.src;
    
    import java.util.Random;
    
    // Referenced classes of package net.minecraft.src:
    //            Block, Material, World, WorldProvider, 
    //            EntityPlayer, ChunkCoordinates, EnumStatus, ModelBed, 
    //            Item, IBlockAccess
    
    public class mod_Chrome extends BaseMod{
    	
    	public static Item CrChestplate = (new ItemArmor(3000, 3, 5, 1).setItemName("Cchestplate"));
    	public static Item head = (new ItemArmor(3001, 3, 5, 0).setItemName("Chead"));
    	public static Item pants = (new ItemArmor(3002, 3, 5, 2).setItemName("Cpants"));
    	public static Item boots = (new ItemArmor(3003, 3, 5, 3).setItemName("Cboots"));
    	public static final Item Pickaxe = new ItemPickaxe(123, EnumToolMaterial.Chromium).setItemName("Cpick");
    	public static final Item Axe = new ItemAxe(124, EnumToolMaterial.Chromium).setItemName("Caxe");
    	public static final Item Spade = new ItemSpade(125, EnumToolMaterial.Chromium).setItemName("Cspade");
    	public static final Item Hoe = new ItemHoe(126, EnumToolMaterial.Chromium).setItemName("Choe");
    	public static final Item Sword = new ItemSword(127, EnumToolMaterial.Chromium).setItemName("Csword");
    
    	
    	public mod_Chrome(){
    		ModLoader.RegisterBlock(chromeore);
    		
    		ModLoader.AddArmor("Crchestplate");
    		ModLoader.AddName(pants, "Chromium Greaves");
    		ModLoader.AddName(boots, "Chromium Boots");
    		ModLoader.AddName(head, "Chromium Helmet");
    		ModLoader.AddName(CrChestplate, "Chromium Chestplate");
    		ModLoader.AddName(chromeore, "Chromite");
    		ModLoader.AddName(chromium, "Chromium");
    		ModLoader.AddName(Pickaxe, "Chrome Pickaxe");
    		ModLoader.AddName(Axe, "Chrome Axe");
    		ModLoader.AddName(Spade, "Chrome Shovel");
    		ModLoader.AddName(Hoe,  "Chrome Hoe");
    		ModLoader.AddName(Sword,  "ChromeSword");
    		
    		CrChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Cchest.png");
    		head.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Chelm.png");
    		pants.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Cpants.png");
    		boots.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Cboots.png");
    		chromium.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Chromium.png");
    		Pickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Cpick.png");
    		Axe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Caxe.png");
    		Spade.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Cspade.png");
    		Hoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Choe.png");
    		Sword.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/items/Csword.png");
    		
    		
    		ModLoader.AddSmelting(chromeore.blockID, new ItemStack(chromium));
    		
    		ModLoader.AddRecipe(new ItemStack(CrChestplate, 1), new Object[]{
    			"# #","###","###", Character.valueOf('#'), chromium
    		});
    		ModLoader.AddRecipe(new ItemStack(head, 1), new Object[]{
    			"###","# #", Character.valueOf('#'), chromium
    		});
    		ModLoader.AddRecipe(new ItemStack(pants, 1), new Object[]{
    			"###","# #","# #", Character.valueOf('#'), chromium
    		});
    		ModLoader.AddRecipe(new ItemStack(boots, 1), new Object[]{
    			"   ","# #","# #", Character.valueOf('#'), chromium
    		});
    		ModLoader.AddRecipe(new ItemStack(Pickaxe, 1), new Object[]{
    			"###"," % "," % ", Character.valueOf('#'), chromium, Character.valueOf('%'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(Axe, 1), new Object[]{
    			"## ","#% "," % ", Character.valueOf('#'), chromium, Character.valueOf('%'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(Spade, 1), new Object[]{
    			" # "," % ", " % ", Character.valueOf('#'), chromium, Character.valueOf('%'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(Hoe, 1), new Object[]{
    			"## "," % "," % ", Character.valueOf('#'), chromium, Character.valueOf('%'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(Sword, 1), new Object[]{
    			" # "," # "," % ", Character.valueOf('#'), chromium, Character.valueOf('%'), Item.stick
    		});
    	}
    	public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ){
    		for(int i = 0; i < 15; i++){
    			int randPosX = chunkX + rand.nextInt(16);
    			int randPosY = rand.nextInt(128);
    			int randPosZ = chunkZ + rand.nextInt(16);
    			(new WorldGenMinable(chromeore.blockID, 50)).generate(world, rand, randPosX, randPosY, randPosZ);
    		}
    	}
    	public static Block chromeore;
    	public static Item chromium = (new ItemChromium(ModLoader.getUniqueEntityId())).setItemName("chromium");
    	static{
    		chromeore = new BlockChromeOre(200, ModLoader.addOverride("/terrain.png", "/textures/blocks/ChromeOre.png")).setHardness(2.0F).setResistance(1.5F).setBlockName("chromeore");
    	}
    	
    	
    	public String Version(){
    		return "1.7_3";
    	}
    }
    EDIT2: here are pictures to show you what i'm talking about just to clarify
    http://imgur.com/5RkAd
    http://imgur.com/KBBoD
    Posted in: Mods Discussion
  • To post a comment, please .