• 0

    posted a message on [modloader] Sheep not dropping custom item
    Quote from ExclamationMark

    If you want to change base classes it's easy. The code IS in the EntitySheep. There's "getDropItem" and "dropFewItems".

    The getFewItems is for shearing. I want this to drop when i kill it. I basically deleted (i commented out) the getDropItem, but the sheep still drops wool when i kill it. It is the base class I want to edit, unless there is a way to do this with modloader without editing base classes. I don't think there is though...

    Edit: the dropFewItems also makes it drop wool when killed. Now I just need to find out how to make sheep drop my item only when killed and not when sheared.
    Posted in: Modification Development
  • 0

    posted a message on [modloader] Sheep not dropping custom item
    Quote from ExclamationMark

    There's a forge method for this. Unfortunately I don't know how it's called. Google it like "minecraft forge on death" or so.

    This is on modloader... forge won't help at all.
    I just need to now where the sheep drop code is because I have concluded it is NOT in the EntitySheep class
    Posted in: Modification Development
  • 0

    posted a message on [modloader] Sheep not dropping custom item
    bump
    Posted in: Modification Development
  • 0

    posted a message on [modloader] Sheep not dropping custom item
    bump
    Posted in: Modification Development
  • 0

    posted a message on [modloader] Sheep not dropping custom item
    I am trying to make my sheep drop a custom item but when i add it the sheep doesn't drop it. I have tried a few things. I have even commented out the code that drops the wool and the sheep still drop wool. I don't know what i am doing wrong, or where the actual item drop code is.
    Posted in: Modification Development
  • 0

    posted a message on (help) Adding armor textures?
    bump
    Posted in: Modification Development
  • 1

    posted a message on Mob glich
    This happened to me too. you need this.Size(Xf,Yf); in your mob class
    Posted in: Modification Development
  • 0

    posted a message on (help) Adding armor textures?
    I am making new armor in my mod, but I don't know how to make the armor textures when the player is wearing them. I have the files, but I don't know the code. I am using ModLoader.
    Posted in: Modification Development
  • 0

    posted a message on (help)Using a skin on the internet
    Quote from JanitorialMilk

    Your download method doesn't look like it works. Here's the best way to do it:
    public void download(URL from, File out) {
    BufferedInputStream bis = new BufferedInputStream(from.openStream());
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(out));
    int x;
    while((x = bis.read()) >= 0) {
    bos.write(x);
    }
    bos.flush();
    bos.close();
    bis.close();
    }



    I did that and it came with a bunch of errors...
    Posted in: Modification Development
  • 0

    posted a message on (help)Using a skin on the internet
    bump
    Posted in: Modification Development
  • 0

    posted a message on (help)Using a skin on the internet
    Quote from LaDestitute

    May I suggest taking a look at the BlockSkull class? I believe it can be changed to render a skin of a specified player.

    The BlockSkull doesnt tell what texture the heads show. The ItemSkull class says the textures through an nbt tag. I do not want to use an nbt tag.
    Posted in: Modification Development
  • 0

    posted a message on (help)Using a skin on the internet
    I want my custom mob to have a skin that it grabs online.

    The mod class:

    package net.minecraft.src;
    import java.util.Calendar;
    public class EntityCosmic extends EntityMob {
    
    private String username;
    private EntityPlayer par1EntityPlayer;
    public EntityCosmic(World par1World)
    {
    super(par1World);
    //this.texture = "/mob/mod/cosmicSkin.png";
    this.texture = "/mob/mod/CosmicLuck.png";
    this.moveSpeed = 0.5f;
    
    }
    
    
    @Override
    public int getMaxHealth() {
    // TODO Auto-generated method stub
    return 9001;
    }
    }


    The GetImage class:

    package net.minecraft.src;
    
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.URL;
    
    public class SkinCosmic {
    
    public static void main(String[] args) throws Exception {
    String imageUrl = "http://s3.amazonaws.com/MinecraftSkins/Cosmicluck.png";
    String destinationFile = "/mob/mod/CosmicLuck.png";
    
    saveImage(imageUrl, destinationFile);
    }
    
    public static void saveImage(String imageUrl, String destinationFile) throws IOException {
    URL url = new URL(imageUrl);
    InputStream is = url.openStream();
    OutputStream os = new FileOutputStream(destinationFile);
    
    byte[] b = new byte[2048];
    int length;
    
    while ((length = is.read(B)) != -1) {
    os.write(b, 0, length);
    }
    
    is.close();
    os.close();
    }
    
    }

    Posted in: Modification Development
  • 0

    posted a message on (HELP)Crafting recipe not working
    Quote from CraftMuch

    The Mossy Stone Brick is a variation of the Stone Brick, Unlike Items (which use a damage value) it uses metadata to have have sub-versions of itself. Its value is 98:1 have a look around the forums for tutorials on using metadata in crafting recipes

    right now the problem is not using metadata in recipes. the problem is that I am making a half slab out of mossy stone brick. The problem is that using mossy stone brick already creates regular stone brick slabs because of the metadata usage. I need to know how to override that atm.
    Posted in: Modification Development
  • 0

    posted a message on (HELP) Block crashing Minecraft
    I found out the problem. my block ID was too high.
    Posted in: Modification Development
  • 0

    posted a message on (HELP)Crafting recipe not working
    I am creating a crafting recipe that uses mossy stone bricks. Unfortunately, while the mossy cobblestone is a whole block itself, the mossy stone brick is just the stone brick block with a damage value. this creates a problem because now when i use the mossy stone bricks, it creates a block already crafted with regular stone bricks. How would I fix this without editing any base files? And if I absolutely have to edit base files, then where and how would i edit them?
    Posted in: Modification Development
  • To post a comment, please .