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


Java Entity.getBrightnessForRender方法代碼示例

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


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

示例1: renderEntityStatic

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean renderEntityStatic(Entity entity, float partialTicks, boolean p_147936_3_)
{
    if (entity.ticksExisted == 0)
    {
        entity.lastTickPosX = entity.posX;
        entity.lastTickPosY = entity.posY;
        entity.lastTickPosZ = entity.posZ;
    }

    double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double)partialTicks;
    double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double)partialTicks;
    double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double)partialTicks;
    float f = entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks;
    int i = entity.getBrightnessForRender(partialTicks);

    if (entity.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    return this.doRenderEntity(entity, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, partialTicks, p_147936_3_);
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:27,代碼來源:RenderManager.java

示例2: renderWitherSkull

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void renderWitherSkull(Entity entityIn, float partialTicks)
{
    double d0 = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
    double d1 = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
    double d2 = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
    Render<Entity> render = this.<Entity>getEntityRenderObject(entityIn);

    if (render != null && this.renderEngine != null)
    {
        int i = entityIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        render.renderName(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:18,代碼來源:RenderManager.java

示例3: renderWitherSkull

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void renderWitherSkull(Entity entityIn, float partialTicks)
{
    double d0 = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
    double d1 = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
    double d2 = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
    Render render = this.getEntityRenderObject(entityIn);

    if (render != null && this.renderEngine != null)
    {
        int i = entityIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        render.renderName(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ);
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:18,代碼來源:RenderManager.java

示例4: renderEntityStatic

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void renderEntityStatic(Entity entityIn, float partialTicks, boolean p_188388_3_)
{
    if (entityIn.ticksExisted == 0)
    {
        entityIn.lastTickPosX = entityIn.posX;
        entityIn.lastTickPosY = entityIn.posY;
        entityIn.lastTickPosZ = entityIn.posZ;
    }

    double d0 = entityIn.lastTickPosX + (entityIn.posX - entityIn.lastTickPosX) * (double)partialTicks;
    double d1 = entityIn.lastTickPosY + (entityIn.posY - entityIn.lastTickPosY) * (double)partialTicks;
    double d2 = entityIn.lastTickPosZ + (entityIn.posZ - entityIn.lastTickPosZ) * (double)partialTicks;
    float f = entityIn.prevRotationYaw + (entityIn.rotationYaw - entityIn.prevRotationYaw) * partialTicks;
    int i = entityIn.getBrightnessForRender(partialTicks);

    if (entityIn.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    this.doRenderEntity(entityIn, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, partialTicks, p_188388_3_);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:27,代碼來源:RenderManager.java

示例5: renderMultipass

import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public void renderMultipass(Entity p_188389_1_, float p_188389_2_)
{
    if (p_188389_1_.ticksExisted == 0)
    {
        p_188389_1_.lastTickPosX = p_188389_1_.posX;
        p_188389_1_.lastTickPosY = p_188389_1_.posY;
        p_188389_1_.lastTickPosZ = p_188389_1_.posZ;
    }

    double d0 = p_188389_1_.lastTickPosX + (p_188389_1_.posX - p_188389_1_.lastTickPosX) * (double)p_188389_2_;
    double d1 = p_188389_1_.lastTickPosY + (p_188389_1_.posY - p_188389_1_.lastTickPosY) * (double)p_188389_2_;
    double d2 = p_188389_1_.lastTickPosZ + (p_188389_1_.posZ - p_188389_1_.lastTickPosZ) * (double)p_188389_2_;
    float f = p_188389_1_.prevRotationYaw + (p_188389_1_.rotationYaw - p_188389_1_.prevRotationYaw) * p_188389_2_;
    int i = p_188389_1_.getBrightnessForRender(p_188389_2_);

    if (p_188389_1_.isBurning())
    {
        i = 15728880;
    }

    int j = i % 65536;
    int k = i / 65536;
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    Render<Entity> render = this.<Entity>getEntityRenderObject(p_188389_1_);

    if (render != null && this.renderEngine != null)
    {
        render.renderMultipass(p_188389_1_, d0 - this.renderPosX, d1 - this.renderPosY, d2 - this.renderPosZ, f, p_188389_2_);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:32,代碼來源:RenderManager.java


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