• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java EntityLlama类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.entity.passive.EntityLlama的典型用法代码示例。如果您正苦于以下问题:Java EntityLlama类的具体用法?Java EntityLlama怎么用?Java EntityLlama使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EntityLlama类属于net.minecraft.entity.passive包,在下文中一共展示了EntityLlama类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onInitGuiPost

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
@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));
        }
    }
}
 
开发者ID:iChun,项目名称:BetterThanLlamas,代码行数:17,代码来源:BetterThanLlamas.java


示例2: func_190858_a

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:EntityAILlamaFollowCaravan.java


示例3: func_190537_j

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:EntityLlamaSpit.java


示例4: BiomeHills

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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_;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:BiomeHills.java


示例5: BiomeSavanna

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:BiomeSavanna.java


示例6: updateTask

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
/**
 * 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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:EntityAILlamaFollowCaravan.java


示例7: EntityLlamaSpit

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:EntityLlamaSpit.java


示例8: doRenderLayer

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:LayerLlamaDecor.java


示例9: drawGuiContainerBackgroundLayer

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:41,代码来源:GuiScreenHorseInventory.java


示例10: isPassive

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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;
		
}
 
开发者ID:BurnedKirby,项目名称:Minecraft-Turn-Based-Battle-Mod,代码行数:37,代码来源:BattleSystemServer.java


示例11: EntityAILlamaFollowCaravan

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:EntityAILlamaFollowCaravan.java


示例12: shouldExecute

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:66,代码来源:EntityAILlamaFollowCaravan.java


示例13: getEntityTexture

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
/**
 * 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()];
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:RenderLlama.java


示例14: VanillaLlama

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
public VanillaLlama(EntityLlama llama) {
    super(llama);
    this.llama = llama;
}
 
开发者ID:faceofcat,项目名称:Mekfarm,代码行数:5,代码来源:VanillaLlama.java


示例15: helperForClass

import net.minecraft.entity.passive.EntityLlama; //导入依赖的package包/类
@Override
public Class helperForClass()
{
	return EntityLlama.class;
}
 
开发者ID:iChun,项目名称:Hats,代码行数:6,代码来源:HelperLlama.java



注:本文中的net.minecraft.entity.passive.EntityLlama类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Item类代码示例发布时间:2022-05-23
下一篇:
Java ThreadLocalActiveSpanSource类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap