Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I can't really explain everything, but the gist of my problem is that I am making a mod with Kiwis, and they spawn as modelbiped instead of modelkiwi.

 

ModelKiwi

 

// Date: 8/17/2012 7:56:54 PM
// Template version 1.1
// Java generated by Techne
// Keep in mind that you still need to fill in some blanks
// - ZeuX






package net.minecraft.src;

public class ModelKiwi extends ModelBase
{
  //fields
    ModelRenderer FootL;
    ModelRenderer FootR;
    ModelRenderer Beak;
    ModelRenderer LegL;
    ModelRenderer LegR;
    ModelRenderer Body;
    ModelRenderer Head;
  
  public ModelKiwi()
  {
    textureWidth = 64;
    textureHeight = 32;
    
      FootL = new ModelRenderer(this, 31, ;
      FootL.addBox(0F, 0F, 0F, 3, 2, 4);
      FootL.setRotationPoint(1F, 22F, 0F);
      FootL.setTextureSize(64, 32);
      FootL.mirror = true;
      setRotation(FootL, 0F, 0F, 0F);
      FootR = new ModelRenderer(this, 31, ;
      FootR.addBox(0F, 0F, 0F, 3, 2, 4);
      FootR.setRotationPoint(-4F, 22F, 0F);
      FootR.setTextureSize(64, 32);
      FootR.mirror = true;
      setRotation(FootR, 0F, 0F, 0F);
      Beak = new ModelRenderer(this, 46, ;
      Beak.addBox(0.5F, 0F, 0F, 1, 1, 5);
      Beak.setRotationPoint(-1F, 13F, -9F);
      Beak.setTextureSize(64, 32);
      Beak.mirror = true;
      setRotation(Beak, 0.0872665F, 0F, 0F);
      LegL.mirror = true;
      LegL = new ModelRenderer(this, 46, 0);
      LegL.addBox(0F, 0F, 0F, 2, 4, 2);
      LegL.setRotationPoint(1F, 18F, 2F);
      LegL.setTextureSize(64, 32);
      LegL.mirror = true;
      setRotation(LegL, 0F, 0F, 0F);
      LegL.mirror = false;
      LegR = new ModelRenderer(this, 46, 0);
      LegR.addBox(0F, 0F, 0F, 2, 4, 2);
      LegR.setRotationPoint(-3F, 18F, 2F);
      LegR.setTextureSize(64, 32);
      LegR.mirror = true;
      setRotation(LegR, 0F, 0F, 0F);
      Body = new ModelRenderer(this, 0, 0);
      Body.addBox(0F, 0F, 0F, 6, 6, 9);
      Body.setRotationPoint(-3F, 12F, -1F);
      Body.setTextureSize(64, 32);
      Body.mirror = true;
      setRotation(Body, 0F, 0F, 0F);
      Head = new ModelRenderer(this, 31, 0);
      Head.addBox(0F, 0F, 0F, 4, 4, 3);
      Head.setRotationPoint(-2F, 11F, -4F);
      Head.setTextureSize(64, 32);
      Head.mirror = true;
      setRotation(Head, 0F, 0F, 0F);
  }
  
  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5);
    FootL.render(f5);
    FootR.render(f5);
    Beak.render(f5);
    LegL.render(f5);
    LegR.render(f5);
    Body.render(f5);
    Head.render(f5);
  }
  
  private void setRotation(ModelRenderer model, float x, float y, float z)
  {
    model.rotateAngleX = x;
    model.rotateAngleY = y;
    model.rotateAngleZ = z;
  }
  
  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
  {
    super.setRotationAngles(f, f1, f2, f3, f4, f5);
  }

}

 

 

RenderKiwi

 

package net.minecraft.src;

public class RenderKiwi extends RenderLiving
{
    public RenderKiwi(ModelBase par1ModelBase, float par2)
    {
        super(par1ModelBase, par2);
    }

    public void renderKiwi(EntityKiwi par1EntityKiwi, double par2, double par4, double par6, float par8, float par9)
    {
        super.doRenderLiving(par1EntityKiwi, par2, par4, par6, par8, par9);
    }

    public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
    {
        this.renderKiwi((EntityKiwi)par1EntityLiving, par2, par4, par6, par8, par9);
    }

    /**
     * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
     * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
     * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
     * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
     */
    public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
        this.renderKiwi((EntityKiwi)par1Entity, par2, par4, par6, par8, par9);
    }
}

 

 

EntityKiwi

 

package net.minecraft.src;

public class EntityKiwi extends EntityAnimal
{
    public EntityKiwi(World par1World)
    {
        super(par1World);
        this.texture = "/blade/Kiwi.png";
        this.setSize(0.3F, 0.7F);
        this.getNavigator().setAvoidsWater(true);
        this.tasks.addTask(0, new EntityAISwimming(this));
        this.tasks.addTask(1, new EntityAIPanic(this, 0.38F));
        this.tasks.addTask(2, new EntityAIMate(this, 0.2F));
        this.tasks.addTask(3, new EntityAITempt(this, 0.25F, Item.wheat.shiftedIndex, false));
        this.tasks.addTask(4, new EntityAIFollowParent(this, 0.25F));
        this.tasks.addTask(5, new EntityAIWander(this, 0.2F));
        this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
        this.tasks.addTask(7, new EntityAILookIdle(this));
    }

    /**
     * Returns true if the newer Entity AI code should be run
     */
    public boolean isAIEnabled()
    {
        return true;
    }

    public int getMaxHealth()
    {
        return 10;
    }

    /**
     * Returns the sound this mob makes while it's alive.
     */
    protected String getLivingSound()
    {
        return "mob.chicken";
    }

    /**
     * Returns the sound this mob makes when it is hurt.
     */
    protected String getHurtSound()
    {
        return "mob.chickenhurt";
    }

    /**
     * Returns the sound this mob makes on death.
     */
    protected String getDeathSound()
    {
        return "mob.chickenhurt";
    }

    /**
     * Returns the volume for the sounds this mob makes.
     */
    protected float getSoundVolume()
    {
        return 0.4F;
    }

    /**
     * Returns the item ID for the item the mob drops on death.
     */
    protected int getDropItemId()
    {
        return Item.feather.shiftedIndex;
    }

    /**
     * Drop 0-2 items of this living's type
     */
    protected void dropFewItems(boolean par1, int par2)
    {
        int var3 = this.rand.nextInt(3) + this.rand.nextInt(1 + par2);
        int var4;

        for (var4 = 0; var4 < var3; ++var4)
        {
            this.dropItem(Item.feather.shiftedIndex, 1);
        }

        var3 = this.rand.nextInt(3) + 1 + this.rand.nextInt(1 + par2);

        for (var4 = 0; var4 < var3; ++var4)
        {
            if (this.isBurning())
            {
                this.dropItem(Item.chickenCooked.shiftedIndex, 1);
            }
            else
            {
                this.dropItem(Item.chickenRaw.shiftedIndex, 1);
            }
        }
    }

    /**
     * This function is used when two same-species animals in 'love mode' breed to generate the new baby animal.
     */
    public EntityAnimal spawnBabyAnimal(EntityAnimal par1EntityAnimal)
    {
        return new EntityKiwi(this.worldObj);
    }
}

 

 

Mod Class (BladeBirdsMod)

package net.minecraft.src;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod( modid = "BladeBirds", name="Birds by Blade", version="WIP 0.1 for mc 1.3.2")
public class BladeBirdsMod
{	

@Init
public void AnimalLoad(FMLInitializationEvent evt) {
    int redColor = (255 << 16);
    int orangeColor = (255 << 16)+ (200 << ;

    //Register mob
    EntityRegistry.registerGlobalEntityID(EntityKiwi.class,"Kiwi",123, redColor,orangeColor);

    //Localize mob name
	LanguageRegistry.instance().addStringLocalization("entity.kiwi", "en_US", "Dig Deeper!");
}
}

 

I use http://www.mediafire.com/view/?d2o544j7a5zwukj as kiwi.png

 

anyone know how to help?

width=300 height=100http://i.imgur.com/ivK3J.png[/img]

I'm a little surprised that I am still ranked as a "Forge Modder," having not posted a single mod since my animals mod... I have to complete Digging Deeper!, fast!

  • Author

Thanks! Do I have to use classes named ClientProxy/CommonProxy, or can I use like "ClientProxyBlade" and "CommonProxyBlade"?

EDIT: Nevermind, stupid question.

width=300 height=100http://i.imgur.com/ivK3J.png[/img]

I'm a little surprised that I am still ranked as a "Forge Modder," having not posted a single mod since my animals mod... I have to complete Digging Deeper!, fast!

Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.