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


Java EntityBoat.getTimeSinceHit方法代碼示例

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


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

示例1: setupRotation

import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
public void setupRotation(EntityBoat p_188311_1_, float p_188311_2_, float p_188311_3_)
{
    GlStateManager.rotate(180.0F - p_188311_2_, 0.0F, 1.0F, 0.0F);
    float f = (float)p_188311_1_.getTimeSinceHit() - p_188311_3_;
    float f1 = p_188311_1_.getDamageTaken() - p_188311_3_;

    if (f1 < 0.0F)
    {
        f1 = 0.0F;
    }

    if (f > 0.0F)
    {
        GlStateManager.rotate(MathHelper.sin(f) * f * f1 / 10.0F * (float)p_188311_1_.getForwardDirection(), 1.0F, 0.0F, 0.0F);
    }

    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:19,代碼來源:RenderBoat.java

示例2: doRender

import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
public void doRender(EntityBoat p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
    GL11.glPushMatrix();
    GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
    GL11.glRotatef(180.0F - p_76986_8_, 0.0F, 1.0F, 0.0F);
    float f2 = (float)p_76986_1_.getTimeSinceHit() - p_76986_9_;
    float f3 = p_76986_1_.getDamageTaken() - p_76986_9_;

    if (f3 < 0.0F)
    {
        f3 = 0.0F;
    }

    if (f2 > 0.0F)
    {
        GL11.glRotatef(MathHelper.sin(f2) * f2 * f3 / 10.0F * (float)p_76986_1_.getForwardDirection(), 1.0F, 0.0F, 0.0F);
    }

    float f4 = 0.75F;
    GL11.glScalef(f4, f4, f4);
    GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4);
    this.bindEntityTexture(p_76986_1_);
    GL11.glScalef(-1.0F, -1.0F, 1.0F);
    this.modelBoat.render(p_76986_1_, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:27,代碼來源:RenderBoat.java

示例3: doRender

import net.minecraft.entity.item.EntityBoat; //導入方法依賴的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(EntityBoat entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x, (float)y + 0.25F, (float)z);
    GlStateManager.rotate(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
    float f = (float)entity.getTimeSinceHit() - partialTicks;
    float f1 = entity.getDamageTaken() - partialTicks;

    if (f1 < 0.0F)
    {
        f1 = 0.0F;
    }

    if (f > 0.0F)
    {
        GlStateManager.rotate(MathHelper.sin(f) * f * f1 / 10.0F * (float)entity.getForwardDirection(), 1.0F, 0.0F, 0.0F);
    }

    float f2 = 0.75F;
    GlStateManager.scale(f2, f2, f2);
    GlStateManager.scale(1.0F / f2, 1.0F / f2, 1.0F / f2);
    this.bindEntityTexture(entity);
    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
    this.modelBoat.render(entity, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:34,代碼來源:RenderBoat.java

示例4: setupRotation

import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
public void setupRotation(EntityBoat boat, float entityYaw, float partialTicks) {
    GlStateManager.rotate(180.0F - entityYaw, 0.0F, 1.0F, 0.0F);
    float time = (float) boat.getTimeSinceHit() - partialTicks;
    float dmg = boat.getDamageTaken() - partialTicks;

    if (dmg < 0.0F) {
        dmg = 0.0F;
    }

    if (time > 0.0F) {
        GlStateManager.rotate(MathHelper.sin(time) * time * dmg / 10.0F * (float)boat.getForwardDirection(), 1.0F, 0.0F, 0.0F);
    }

    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
}
 
開發者ID:InfinityRaider,項目名稱:Boatifull,代碼行數:16,代碼來源:RenderEntityBoatChest.java

示例5: doRender

import net.minecraft.entity.item.EntityBoat; //導入方法依賴的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 doesn't do that.
 */
public void doRender(EntityBoat par1EntityBoat, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F);
    float var10 = (float)par1EntityBoat.getTimeSinceHit() - par9;
    float var11 = par1EntityBoat.getDamageTaken() - par9;

    if (var11 < 0.0F)
    {
        var11 = 0.0F;
    }

    if (var10 > 0.0F)
    {
        GL11.glRotatef(MathHelper.sin(var10) * var10 * var11 / 10.0F * (float)par1EntityBoat.getForwardDirection(), 1.0F, 0.0F, 0.0F);
    }

    float var12 = 0.75F;
    GL11.glScalef(var12, var12, var12);
    GL11.glScalef(1.0F / var12, 1.0F / var12, 1.0F / var12);
    this.bindEntityTexture(par1EntityBoat);
    GL11.glScalef(-1.0F, -1.0F, 1.0F);
    this.modelBoat.render(par1EntityBoat, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:33,代碼來源:RenderBoat.java

示例6: renderBoat

import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
/**
 * The render method used in RenderBoat that renders the boat model.
 */
public void renderBoat(EntityBoat par1EntityBoat, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glRotatef(180.0F - par8, 0.0F, 1.0F, 0.0F);
    float f2 = (float)par1EntityBoat.getTimeSinceHit() - par9;
    float f3 = par1EntityBoat.getDamageTaken() - par9;

    if (f3 < 0.0F)
    {
        f3 = 0.0F;
    }

    if (f2 > 0.0F)
    {
        GL11.glRotatef(MathHelper.sin(f2) * f2 * f3 / 10.0F * (float)par1EntityBoat.getForwardDirection(), 1.0F, 0.0F, 0.0F);
    }

    float f4 = 0.75F;
    GL11.glScalef(f4, f4, f4);
    GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4);
    this.bindEntityTexture(par1EntityBoat);
    GL11.glScalef(-1.0F, -1.0F, 1.0F);
    this.modelBoat.render(par1EntityBoat, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
    GL11.glPopMatrix();
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:30,代碼來源:RenderBoat.java


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