當前位置: 首頁>>代碼示例>>Java>>正文


Java EntitySlime.getSlimeSize方法代碼示例

本文整理匯總了Java中net.minecraft.entity.monster.EntitySlime.getSlimeSize方法的典型用法代碼示例。如果您正苦於以下問題:Java EntitySlime.getSlimeSize方法的具體用法?Java EntitySlime.getSlimeSize怎麽用?Java EntitySlime.getSlimeSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.entity.monster.EntitySlime的用法示例。


在下文中一共展示了EntitySlime.getSlimeSize方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: EntityAIFindOtherSlimeNearest

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
public EntityAIFindOtherSlimeNearest(final EntitySlime mobIn)
{
    super(mobIn, EntitySlime.class);
    this.slime = mobIn;
    Predicate<EntityLivingBase> predicate = entity -> {
        double range = EntityAIFindOtherSlimeNearest.this.getFollowRange();
        return entity != null
                && entity != mobIn
                && entity.getClass() == mobIn.getClass()
                && entity.ticksExisted > AGE_LIMIT
                && !entity.isInvisible()
                && entity.getDistance(mobIn) <= range
                && ((EntitySlime) entity).getSlimeSize() == mobIn.getSlimeSize()
                && EntityAITarget.isSuitableTarget(mobIn, entity, false, true);
    };

    try
    {
        predicateField.set(this, predicate);
    }
    catch (IllegalAccessException e)
    {
        throw new ReportedException(new CrashReport("Could not set private field '" + predicateField.getName() + "'", e));
    }
}
 
開發者ID:gigaherz,項目名稱:Survivalist,代碼行數:26,代碼來源:SlimeMerger.java

示例2: preRenderCallback

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntitySlime entitylivingbaseIn, float partialTickTime)
{
    float f = (float)entitylivingbaseIn.getSlimeSize();
    float f1 = (entitylivingbaseIn.prevSquishFactor + (entitylivingbaseIn.squishFactor - entitylivingbaseIn.prevSquishFactor) * partialTickTime) / (f * 0.5F + 1.0F);
    float f2 = 1.0F / (f1 + 1.0F);
    GlStateManager.scale(f2 * f, 1.0F / f2 * f, f2 * f);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:12,代碼來源:RenderSlime.java

示例3: preRenderCallback

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * Allows the render to do state modifications necessary before the model is rendered.
 */
protected void preRenderCallback(EntitySlime entitylivingbaseIn, float partialTickTime)
{
    float f = 0.999F;
    GlStateManager.scale(0.999F, 0.999F, 0.999F);
    float f1 = (float)entitylivingbaseIn.getSlimeSize();
    float f2 = (entitylivingbaseIn.prevSquishFactor + (entitylivingbaseIn.squishFactor - entitylivingbaseIn.prevSquishFactor) * partialTickTime) / (f1 * 0.5F + 1.0F);
    float f3 = 1.0F / (f2 + 1.0F);
    GlStateManager.scale(f3 * f1, 1.0F / f3 * f1, f3 * f1);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:13,代碼來源:RenderSlime.java

示例4: preRenderCallback

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntitySlime par1EntitySlime, float par2)
{
    float var3 = (float)par1EntitySlime.getSlimeSize();
    float var4 = (par1EntitySlime.prevSquishFactor + (par1EntitySlime.squishFactor - par1EntitySlime.prevSquishFactor) * par2) / (var3 * 0.5F + 1.0F);
    float var5 = 1.0F / (var4 + 1.0F);
    GL11.glScalef(var5 * var3, 1.0F / var5 * var3, var5 * var3);
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:12,代碼來源:RenderSlime.java

示例5: preRenderCallback

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntitySlime p_77041_1_, float p_77041_2_)
{
    float f1 = (float)p_77041_1_.getSlimeSize();
    float f2 = (p_77041_1_.prevSquishFactor + (p_77041_1_.squishFactor - p_77041_1_.prevSquishFactor) * p_77041_2_) / (f1 * 0.5F + 1.0F);
    float f3 = 1.0F / (f2 + 1.0F);
    GL11.glScalef(f3 * f1, 1.0F / f3 * f1, f3 * f1);
}
 
開發者ID:SpitefulFox,項目名稱:RidiculousWorld,代碼行數:12,代碼來源:RenderShadowSlime.java

示例6: preRenderCallback

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
 * entityLiving, partialTickTime
 */
protected void preRenderCallback(EntitySlime slime, float partialTickTime)
{
    float f1 = (float)slime.getSlimeSize();
    float f2 = (slime.prevSquishFactor + (slime.squishFactor - slime.prevSquishFactor) * partialTickTime) / (f1 * 0.5F + 1.0F);
    float f3 = 1.0F / (f2 + 1.0F);
    GL11.glScalef(f3 * f1, 1.0F / f3 * f1, f3 * f1);
}
 
開發者ID:SpitefulFox,項目名稱:RidiculousWorld,代碼行數:12,代碼來源:RenderShoggoth.java

示例7: preRenderCallback

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
protected void preRenderCallback(EntitySlime p_77041_1_, float p_77041_2_)
{
    float f1 = (float)p_77041_1_.getSlimeSize();
    float f2 = (p_77041_1_.prevSquishFactor + (p_77041_1_.squishFactor - p_77041_1_.prevSquishFactor) * p_77041_2_) / (f1 * 0.5F + 1.0F);
    float f3 = 1.0F / (f2 + 1.0F);
    GL11.glScalef(f3 * f1, 1.0F / f3 * f1, f3 * f1);
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:8,代碼來源:RenderSlime.java

示例8: scaleSlime

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * sets the scale for the slime based on getSlimeSize in EntitySlime
 */
protected void scaleSlime(EntitySlime par1EntitySlime, float par2)
{
    float f1 = (float)par1EntitySlime.getSlimeSize();
    float f2 = (par1EntitySlime.prevSquishFactor + (par1EntitySlime.squishFactor - par1EntitySlime.prevSquishFactor) * par2) / (f1 * 0.5F + 1.0F);
    float f3 = 1.0F / (f2 + 1.0F);
    GL11.glScalef(f3 * f1, 1.0F / f3 * f1, f3 * f1);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:11,代碼來源:RenderSlime.java

示例9: doRender

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntitySlime entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    this.shadowSize = 0.25F * (float)entity.getSlimeSize();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:9,代碼來源:RenderSlime.java

示例10: doRender

import net.minecraft.entity.monster.EntitySlime; //導入方法依賴的package包/類
/**
 * 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 doe
 */
public void doRender(EntitySlime entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    this.shadowSize = 0.25F * (float)entity.getSlimeSize();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:12,代碼來源:RenderSlime.java


注:本文中的net.minecraft.entity.monster.EntitySlime.getSlimeSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。