• 1

    posted a message on I have an error in my code could you help me?
    You need to add this code to your entity file.

    public void getMaxHealth()
    {
    return 20; //1 is half a heart. 20 is 10 hearts. Change to whatever you like :smile.gif:
    }


    Also, change..
    public mod_Herobrine(){
    }

    To
    public void load(){
    }


    What you were doing wrong is that you did not know minecraft and modloader code has chnage since 1.0.0. Just remember these methods next time you create a mod.

    Make sure you mod_*** always starts like this

    package net.minecraft.src; 
     
    import java.util.Random; 
     
    public class mod_****** extends BaseMod 
    { 
     
        public mod_Example() 
        { 
            //Don't write you code in here
        } 
     
        public void load() 
        { 
            //Write it in here
        } 
    
        public String getVersion() 
        { 
            return ("1.0.0"); 
        } 
    }
    Posted in: Modification Development
  • 2

    posted a message on Texturer Needed for Upcoming Mod
    Quote from .:creeper-king:.

    Ok ill help but can someone please give me a goot texture editor for this?Thanks
    CreeperkingIGN: twanbrouwer

    Paint.NET
    Posted in: Modification Development
  • 1

    posted a message on Is there any way to add more armor types?
    Quote from Meat_Shield

    How is it complicated?
    EDIT: I just realised what you meant by different armor types, the simplist way to do this is to have your chest plate or head piece and edit the RenderPlayer to suite your needs


    He said new, not exsisting. I can't be stuffed explaining/arguing.
    Posted in: Modification Development
  • 1

    posted a message on Crop growth texture problem
    Post you mod_*** please
    Posted in: Modification Development
  • 1

    posted a message on Texture problem
    Not sure but change

    GelBlock.blockIndexInTexture = ModLoader.addOverride("/gui/items.png", "/Atlantis/GelBlock.png");


    to

    GelBlock.blockIndexInTexture = ModLoader.addOverride("/terrian.png", "/Atlantis/GelBlock.png");


    Because GelBlock is a block, not an item. You were trying to override item texture.
    Posted in: Modification Development
  • 1

    posted a message on Crop growth texture problem
    You need to change blockIndexInTexture I think
    Posted in: Modification Development
  • 1

    posted a message on Mushroom-like growth
    I created this code for my mod and I will try to explain.
    public void updateTick(World world, int i, int j, int k, Random random)
        {
        	int grown = mod_BushMod.cherryBushON.blockID;
            super.updateTick(world, i, j, k, random);
            if(world.getBlockId(i, j, k) == mod_BushMod.cherryBushOFF.blockID)
            {
                if(random.nextInt(1) == 0)
                {
                   world.setBlockWithNotify(i, j, k, grown);            
                }
            }
        }


    First of all, this is code is defining the block that is going to be placed, which is 'grown' and the block is cherryBushOFF. I'll show you what I mean in one of the next steps.
    int grown = mod_BushMod.cherryBushON.blockID;


    I'm not sure what this is but you need it.
    super.updateTick(world, i, j, k, random);


    This code is saying if x, y, z co-ordinates equals mod_BushMod.cherryBushOFF.blockID it will continue and go to the next loop.
    if(world.getBlockId(i, j, k) == mod_BushMod.cherryBushOFF.blockID)


    This one is saying if random int out of 0 to 1 equals 0, it will place 'grown' at x, y, z co-ordinates.
    if(random.nextInt(1) == 0)
          {
              world.setBlockWithNotify(i, j, k, grown);            
          }


    I hope this explains kinda of. You can change the co-ordinates to x, y + 1, z. This will place the block above.
    Posted in: Modification Development
  • 1

    posted a message on Red Mushroom Fortress!
    Red Mushroom Fortress

    Heys guys, I know someone has probably already done this but I got the idea off BrenyBeast from youtube. He did a mushroom house with the brown mushrooms, so I decided to do one with the red ones. It has 5 rooms. Them being a crafting room, bedroom, enchanting room, kitchen and a lookout. It has snowmen to guard it. So here it is, my Red Mushroom Fortress! Please comment on what you think. Keep in mind, I did this in like 10 minutes.

    Someone do a video of invasion mod using this map, I will put in here!


    You can download the schematic HERE









    Posted in: Screenshots
  • 1

    posted a message on Changing item texture on right click. help? :/
    Im trying to make the texture of my item change on hold right click and return to normal on release. kinda like blocking with sword.

    my attempt code:
    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
            {   
        	ModLoader.addOverride("/crayfishmod/snappyclaw.png", "/crayfishmod/snappyclawopen.png");		
            return itemstack;
        	}
    Posted in: Modification Development
  • 1

    posted a message on Modding Question: Diving Helmet
    Here is a code for you.

    public boolean OnTickInGame(Minecraft minecraft) {
        	
            ItemStack helm = minecraft.thePlayer.inventory.armorInventory[3];
    
            if(helm == null)
            {
                return true;
            }
            if(helm.itemID == mod_scuba.helmet.shiftedIndex)
            {
               minecraft.thePlayer.air = minecraft.thePlayer.maxAir;
            }
                    return true;
    
        }


    And add this code to your constructor area

    ModLoader.SetInGameHook(this, true, false);
    Posted in: Modification Development
  • To post a comment, please or register a new account.