本文整理匯總了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));
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}