本文整理匯總了Java中net.minecraft.entity.monster.EntityEnderman.getBrightnessForRender方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityEnderman.getBrightnessForRender方法的具體用法?Java EntityEnderman.getBrightnessForRender怎麽用?Java EntityEnderman.getBrightnessForRender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.monster.EntityEnderman
的用法示例。
在下文中一共展示了EntityEnderman.getBrightnessForRender方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doRenderLayer
import net.minecraft.entity.monster.EntityEnderman; //導入方法依賴的package包/類
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();
if (iblockstate != null)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 0.6875F, -0.75F);
GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(0.25F, 0.1875F, 0.25F);
float f = 0.5F;
GlStateManager.scale(-0.5F, -0.5F, 0.5F);
int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
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.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
示例2: doRenderLayer
import net.minecraft.entity.monster.EntityEnderman; //導入方法依賴的package包/類
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();
if (iblockstate.getBlock().getMaterial() != Material.air)
{
BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
GlStateManager.enableRescaleNormal();
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 0.6875F, -0.75F);
GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(0.25F, 0.1875F, 0.25F);
float f = 0.5F;
GlStateManager.scale(-f, -f, f);
int i = entitylivingbaseIn.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);
this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
GlStateManager.popMatrix();
GlStateManager.disableRescaleNormal();
}
}
示例3: renderEquippedItems
import net.minecraft.entity.monster.EntityEnderman; //導入方法依賴的package包/類
protected void renderEquippedItems(EntityEnderman par1EntityEnderman, float par2)
{
super.renderEquippedItems(par1EntityEnderman, par2);
if (par1EntityEnderman.func_146080_bZ().getMaterial() != Material.air)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
float var3 = 0.5F;
GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
var3 *= 1.0F;
GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(-var3, -var3, var3);
int var4 = par1EntityEnderman.getBrightnessForRender(par2);
int var5 = var4 % 65536;
int var6 = var4 / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)var5 / 1.0F, (float)var6 / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.field_147909_c.renderBlockAsItem(par1EntityEnderman.func_146080_bZ(), par1EntityEnderman.getCarryingData(), 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
示例4: renderEquippedItems
import net.minecraft.entity.monster.EntityEnderman; //導入方法依賴的package包/類
protected void renderEquippedItems(EntityEnderman p_77029_1_, float p_77029_2_)
{
super.renderEquippedItems(p_77029_1_, p_77029_2_);
if (p_77029_1_.func_146080_bZ().getMaterial() != Material.air)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
float f1 = 0.5F;
GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
f1 *= 1.0F;
GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(-f1, -f1, f1);
int i = p_77029_1_.getBrightnessForRender(p_77029_2_);
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.field_147909_c.renderBlockAsItem(p_77029_1_.func_146080_bZ(), p_77029_1_.getCarryingData(), 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}
示例5: renderCarrying
import net.minecraft.entity.monster.EntityEnderman; //導入方法依賴的package包/類
/**
* Render the block an enderman is carrying
*/
protected void renderCarrying(EntityEnderman par1EntityEnderman, float par2)
{
super.renderEquippedItems(par1EntityEnderman, par2);
if (par1EntityEnderman.getCarried() > 0)
{
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glPushMatrix();
float f1 = 0.5F;
GL11.glTranslatef(0.0F, 0.6875F, -0.75F);
f1 *= 1.0F;
GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
GL11.glScalef(-f1, -f1, f1);
int i = par1EntityEnderman.getBrightnessForRender(par2);
int j = i % 65536;
int k = i / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.bindTexture(TextureMap.locationBlocksTexture);
this.renderBlocks.renderBlockAsItem(Block.blocksList[par1EntityEnderman.getCarried()], par1EntityEnderman.getCarryingData(), 1.0F);
GL11.glPopMatrix();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
}
}