Java 类net.minecraft.entity.passive.EntityLlama 实例源码

项目:BetterThanLlamas    文件:BetterThanLlamas.java   
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onInitGuiPost(GuiScreenEvent.InitGuiEvent.Post event)
{
    if(!hasShownFirstGui)
    {
        hasShownFirstGui = true;

        //Add the layer renderers
        Render renderer = Minecraft.getMinecraft().getRenderManager().getEntityClassRenderObject(EntityLlama.class);
        if(renderer instanceof RenderLlama)
        {
            RenderLlama renderLlama = (RenderLlama)renderer;
            renderLlama.addLayer(new LayerFancyLlama(renderLlama));
        }
    }
}
项目:Backmemed    文件:EntityAILlamaFollowCaravan.java   
private boolean func_190858_a(EntityLlama p_190858_1_, int p_190858_2_)
{
    if (p_190858_2_ > 8)
    {
        return false;
    }
    else if (p_190858_1_.func_190718_dR())
    {
        if (p_190858_1_.func_190716_dS().getLeashed())
        {
            return true;
        }
        else
        {
            EntityLlama entityllama = p_190858_1_.func_190716_dS();
            ++p_190858_2_;
            return this.func_190858_a(entityllama, p_190858_2_);
        }
    }
    else
    {
        return false;
    }
}
项目:Backmemed    文件:EntityLlamaSpit.java   
private void func_190537_j()
{
    if (this.field_190540_b != null && this.field_190540_b.hasUniqueId("OwnerUUID"))
    {
        UUID uuid = this.field_190540_b.getUniqueId("OwnerUUID");

        for (EntityLlama entityllama : this.world.getEntitiesWithinAABB(EntityLlama.class, this.getEntityBoundingBox().expandXyz(15.0D)))
        {
            if (entityllama.getUniqueID().equals(uuid))
            {
                this.field_190539_a = entityllama;
                break;
            }
        }
    }

    this.field_190540_b = null;
}
项目:Backmemed    文件:BiomeHills.java   
protected BiomeHills(BiomeHills.Type p_i46710_1_, Biome.BiomeProperties properties)
{
    super(properties);

    if (p_i46710_1_ == BiomeHills.Type.EXTRA_TREES)
    {
        this.theBiomeDecorator.treesPerChunk = 3;
    }

    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityLlama.class, 5, 4, 6));
    this.type = p_i46710_1_;
}
项目:Backmemed    文件:BiomeSavanna.java   
protected BiomeSavanna(Biome.BiomeProperties properties)
{
    super(properties);
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityHorse.class, 1, 2, 6));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityDonkey.class, 1, 1, 1));

    if (this.getBaseHeight() > 1.1F)
    {
        this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityLlama.class, 8, 4, 4));
    }

    this.theBiomeDecorator.treesPerChunk = 1;
    this.theBiomeDecorator.flowersPerChunk = 4;
    this.theBiomeDecorator.grassPerChunk = 20;
}
项目:Backmemed    文件:EntityAILlamaFollowCaravan.java   
/**
 * Updates the task
 */
public void updateTask()
{
    if (this.field_190859_a.func_190718_dR())
    {
        EntityLlama entityllama = this.field_190859_a.func_190716_dS();
        double d0 = (double)this.field_190859_a.getDistanceToEntity(entityllama);
        float f = 2.0F;
        Vec3d vec3d = (new Vec3d(entityllama.posX - this.field_190859_a.posX, entityllama.posY - this.field_190859_a.posY, entityllama.posZ - this.field_190859_a.posZ)).normalize().scale(Math.max(d0 - 2.0D, 0.0D));
        this.field_190859_a.getNavigator().tryMoveToXYZ(this.field_190859_a.posX + vec3d.xCoord, this.field_190859_a.posY + vec3d.yCoord, this.field_190859_a.posZ + vec3d.zCoord, this.field_190860_b);
    }
}
项目:Backmemed    文件:EntityLlamaSpit.java   
public EntityLlamaSpit(World p_i47273_1_, EntityLlama p_i47273_2_)
{
    super(p_i47273_1_);
    this.field_190539_a = p_i47273_2_;
    this.setPosition(p_i47273_2_.posX - (double)(p_i47273_2_.width + 1.0F) * 0.5D * (double)MathHelper.sin(p_i47273_2_.renderYawOffset * 0.017453292F), p_i47273_2_.posY + (double)p_i47273_2_.getEyeHeight() - 0.10000000149011612D, p_i47273_2_.posZ + (double)(p_i47273_2_.width + 1.0F) * 0.5D * (double)MathHelper.cos(p_i47273_2_.renderYawOffset * 0.017453292F));
    this.setSize(0.25F, 0.25F);
}
项目:Backmemed    文件:LayerLlamaDecor.java   
public void doRenderLayer(EntityLlama entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (entitylivingbaseIn.func_190717_dN())
    {
        this.field_191365_b.bindTexture(field_191364_a[entitylivingbaseIn.func_190704_dO().getMetadata()]);
        this.field_191366_c.setModelAttributes(this.field_191365_b.getMainModel());
        this.field_191366_c.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);
    }
}
项目:Backmemed    文件:GuiScreenHorseInventory.java   
/**
 * Draws the background layer of this container (behind the items).
 */
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
{
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.mc.getTextureManager().bindTexture(HORSE_GUI_TEXTURES);
    int i = (this.width - this.xSize) / 2;
    int j = (this.height - this.ySize) / 2;
    this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);

    if (this.horseEntity instanceof AbstractChestHorse)
    {
        AbstractChestHorse abstractchesthorse = (AbstractChestHorse)this.horseEntity;

        if (abstractchesthorse.func_190695_dh())
        {
            this.drawTexturedModalRect(i + 79, j + 17, 0, this.ySize, abstractchesthorse.func_190696_dl() * 18, 54);
        }
    }

    if (this.horseEntity.func_190685_dA())
    {
        this.drawTexturedModalRect(i + 7, j + 35 - 18, 18, this.ySize + 54, 18, 18);
    }

    if (this.horseEntity.func_190677_dK())
    {
        if (this.horseEntity instanceof EntityLlama)
        {
            this.drawTexturedModalRect(i + 7, j + 35, 36, this.ySize + 54, 18, 18);
        }
        else
        {
            this.drawTexturedModalRect(i + 7, j + 35, 0, this.ySize + 54, 18, 18);
        }
    }

    GuiInventory.drawEntityOnScreen(i + 51, j + 60, 17, (float)(i + 51) - this.mousePosx, (float)(j + 75 - 50) - this.mousePosY, this.horseEntity);
}
项目:Minecraft-Turn-Based-Battle-Mod    文件:BattleSystemServer.java   
public boolean isPassive(EntityLivingBase entity)
{
    if(entity instanceof EntityBat)
        return true;
    else if(entity instanceof EntityChicken)
        return true;
    else if(entity instanceof EntityCow)
        return true;
    else if(entity instanceof EntityHorse)
        return true;
    else if(entity instanceof EntityMooshroom)
        return true;
    else if(entity instanceof EntityOcelot)
        return true;
    else if(entity instanceof EntityPig)
        return true;
    else if(entity instanceof EntitySheep)
        return true;
    else if(entity instanceof EntitySquid)
        return true;
    else if(entity instanceof EntityVillager)
        return true;
    else if(entity instanceof EntitySlime)
        return true;
    else if(entity instanceof EntityDonkey)
        return true;
    else if(entity instanceof EntityLlama)
        return true;
    else if(entity instanceof EntityMule)
        return true;
    else if(entity instanceof EntityRabbit)
        return true;

    return false;

}
项目:Backmemed    文件:EntityAILlamaFollowCaravan.java   
public EntityAILlamaFollowCaravan(EntityLlama p_i47305_1_, double p_i47305_2_)
{
    this.field_190859_a = p_i47305_1_;
    this.field_190860_b = p_i47305_2_;
    this.setMutexBits(1);
}
项目:Backmemed    文件:EntityAILlamaFollowCaravan.java   
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    if (!this.field_190859_a.getLeashed() && !this.field_190859_a.func_190718_dR())
    {
        List<EntityLlama> list = this.field_190859_a.world.<EntityLlama>getEntitiesWithinAABB(this.field_190859_a.getClass(), this.field_190859_a.getEntityBoundingBox().expand(9.0D, 4.0D, 9.0D));
        EntityLlama entityllama = null;
        double d0 = Double.MAX_VALUE;

        for (EntityLlama entityllama1 : list)
        {
            if (entityllama1.func_190718_dR() && !entityllama1.func_190712_dQ())
            {
                double d1 = this.field_190859_a.getDistanceSqToEntity(entityllama1);

                if (d1 <= d0)
                {
                    d0 = d1;
                    entityllama = entityllama1;
                }
            }
        }

        if (entityllama == null)
        {
            for (EntityLlama entityllama2 : list)
            {
                if (entityllama2.getLeashed() && !entityllama2.func_190712_dQ())
                {
                    double d2 = this.field_190859_a.getDistanceSqToEntity(entityllama2);

                    if (d2 <= d0)
                    {
                        d0 = d2;
                        entityllama = entityllama2;
                    }
                }
            }
        }

        if (entityllama == null)
        {
            return false;
        }
        else if (d0 < 4.0D)
        {
            return false;
        }
        else if (!entityllama.getLeashed() && !this.func_190858_a(entityllama, 1))
        {
            return false;
        }
        else
        {
            this.field_190859_a.func_190715_a(entityllama);
            return true;
        }
    }
    else
    {
        return false;
    }
}
项目:Backmemed    文件:RenderLlama.java   
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityLlama entity)
{
    return field_191350_a[entity.func_190719_dM()];
}
项目:Mekfarm    文件:VanillaLlama.java   
public VanillaLlama(EntityLlama llama) {
    super(llama);
    this.llama = llama;
}
项目:Hats    文件:HelperLlama.java   
@Override
public Class helperForClass()
{
    return EntityLlama.class;
}