本文整理汇总了Java中net.minecraft.client.renderer.RenderEngine类的典型用法代码示例。如果您正苦于以下问题:Java RenderEngine类的具体用法?Java RenderEngine怎么用?Java RenderEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RenderEngine类属于net.minecraft.client.renderer包,在下文中一共展示了RenderEngine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: drawInventory
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
protected void drawInventory( float delta, int mX, int mY ){
RenderEngine engine = mc.renderEngine;
Tessellator buff = Tessellator.instance;
//Bind the texture
engine.bindTexture("/slp-gui/term.png");
//Standard item model
RenderHelper.disableStandardItemLighting();
//Draw the leaflet
buff.setTranslation(guiLeft +8, guiTop +114, 0);
buff.startDrawingQuads();
buff.addVertexWithUV(0, 0, 0, 1, 0);
buff.addVertexWithUV(0, 90, 0, 422f/512f, 0);
buff.addVertexWithUV(256, 90, 0, 422f/512f, 1);
buff.addVertexWithUV(256, 0, 0, 1, 1);
buff.draw();
buff.setTranslation(0, 0, 0);
//Draw slots
super.drawScreen(mX, mY, delta);
}
开发者ID:TehSomeLuigi,项目名称:someluigis-peripherals,代码行数:26,代码来源:GuiTerminal.java
示例2: renderSMG
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderSMG(float x, float y, float z, float angle, float rotX, float rotY, float rotZ) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/SMGModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
GL11.glRotatef(angle, rotX, rotY, rotZ);
smgModel.render(0.1F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:11,代码来源:RenderGunInHand.java
示例3: renderSMGForInventory
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderSMGForInventory(float x, float y, float z) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/SMGModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
smgInv.render(0.094F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:10,代码来源:RenderGunInHand.java
示例4: renderSniper
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderSniper(float x, float y, float z, float angle, float rotX, float rotY, float rotZ) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/SniperModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
GL11.glRotatef(angle, rotX, rotY, rotZ);
sniperModel.render(0.15F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:11,代码来源:RenderGunInHand.java
示例5: renderSniperForInventory
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderSniperForInventory(float x, float y, float z) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/SniperModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
sniperInv.render(.06F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:10,代码来源:RenderGunInHand.java
示例6: renderPistol
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderPistol(float x, float y, float z, float angle, float rotX, float rotY, float rotZ) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/PistolModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
GL11.glRotatef(angle, rotX, rotY, rotZ);
pistolModel.render(0.1F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:11,代码来源:RenderGunInHand.java
示例7: renderPistolForInventory
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderPistolForInventory(float x, float y, float z) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/PistolModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
pistolInv.render(0.1F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:10,代码来源:RenderGunInHand.java
示例8: renderAssault
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderAssault(float x, float y, float z, float angle, float rotX, float rotY, float rotZ) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/AssaultRifleModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
GL11.glRotatef(angle, rotX, rotY, rotZ);
assaultRifleModel.render(0.1F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:11,代码来源:RenderGunInHand.java
示例9: renderAssaultForInventory
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderAssaultForInventory(float x, float y, float z) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/Guns/AssaultRifleModel.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
assaultRifleInv.render(0.07F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:10,代码来源:RenderGunInHand.java
示例10: renderGrenade
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
public static void renderGrenade(float x, float y, float z) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/TextureGrenade.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
grenadeModel.render(.1F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:10,代码来源:RenderGrenadeInHand.java
示例11: renderGrenadeInv
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void renderGrenadeInv(float x, float y, float z) {
Minecraft mc = Minecraft.getMinecraft();
RenderEngine render = mc.renderEngine;
render.bindTexture("/mods/BL2/textures/TextureGrenade.png");
GL11.glPushMatrix(); // start
GL11.glTranslatef(x, y, z); // size
grenadeInv.render(.29F);
GL11.glPopMatrix(); // end
}
开发者ID:lombax5832,项目名称:BL2,代码行数:10,代码来源:RenderGrenadeInHand.java
示例12: cacheActiveRenderInfo
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
/**
* Caches the current frame's active render info, including the current World, RenderEngine, GameSettings and
* FontRenderer settings, as well as interpolated player position, pitch and yaw.
*/
public void cacheActiveRenderInfo(World par1World, RenderEngine par2RenderEngine, FontRenderer par3FontRenderer, EntityLiving par4EntityLiving, EntityLiving par5EntityLiving, GameSettings par6GameSettings, float par7)
{
this.worldObj = par1World;
this.renderEngine = par2RenderEngine;
this.options = par6GameSettings;
this.livingPlayer = par4EntityLiving;
this.field_96451_i = par5EntityLiving;
this.fontRenderer = par3FontRenderer;
if (par4EntityLiving.isPlayerSleeping())
{
int x = MathHelper.floor_double(par4EntityLiving.posX);
int y = MathHelper.floor_double(par4EntityLiving.posY);
int z = MathHelper.floor_double(par4EntityLiving.posZ);
Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
if (block != null && block.isBed(par1World, x, y, z, par4EntityLiving))
{
int k = block.getBedDirection(par1World, x, y, z);;
this.playerViewY = (float)(k * 90 + 180);
this.playerViewX = 0.0F;
}
}
else
{
this.playerViewY = par4EntityLiving.prevRotationYaw + (par4EntityLiving.rotationYaw - par4EntityLiving.prevRotationYaw) * par7;
this.playerViewX = par4EntityLiving.prevRotationPitch + (par4EntityLiving.rotationPitch - par4EntityLiving.prevRotationPitch) * par7;
}
if (par6GameSettings.thirdPersonView == 2)
{
this.playerViewY += 180.0F;
}
this.viewerPosX = par4EntityLiving.lastTickPosX + (par4EntityLiving.posX - par4EntityLiving.lastTickPosX) * (double)par7;
this.viewerPosY = par4EntityLiving.lastTickPosY + (par4EntityLiving.posY - par4EntityLiving.lastTickPosY) * (double)par7;
this.viewerPosZ = par4EntityLiving.lastTickPosZ + (par4EntityLiving.posZ - par4EntityLiving.lastTickPosZ) * (double)par7;
}
开发者ID:Danis98,项目名称:Veniocraft,代码行数:43,代码来源:RenderManager.java
示例13: renderItemAndEffectIntoGUI
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
/**
* Render the item's icon or block into the GUI, including the glint effect.
*/
public void renderItemAndEffectIntoGUI (SmallFontRenderer par1SmallFontRenderer, RenderEngine par2RenderEngine, ItemStack par3ItemStack, int par4, int par5)
{
if (par3ItemStack != null)
{
if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2RenderEngine, par3ItemStack, renderWithColor, zLevel, (float) par4, (float) par5))
{
this.renderItemIntoGUI(par1SmallFontRenderer, par2RenderEngine, par3ItemStack, par4, par5);
}
if (par3ItemStack.hasEffect())
{
GL11.glDepthFunc(GL11.GL_GREATER);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
par2RenderEngine.bindTexture("%blur%/misc/glint.png");
this.zLevel -= 50.0F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
this.renderGlint(par4 * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
this.zLevel += 50.0F;
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
}
}
开发者ID:Andrew2448,项目名称:Andrew2448PowersuitAddons,代码行数:32,代码来源:RenderItemCopy.java
示例14: renderItemOverlayIntoGUI
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
public void renderItemOverlayIntoGUI (SmallFontRenderer par1SmallFontRenderer, RenderEngine par2RenderEngine, ItemStack par3ItemStack, int par4, int par5, String par6Str)
{
if (par3ItemStack != null)
{
if (par3ItemStack.stackSize > 1 || par6Str != null)
{
String s1 = par6Str == null ? String.valueOf(par3ItemStack.stackSize) : par6Str;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
par1SmallFontRenderer.drawStringWithShadow(s1, par4 + 19 - 2 - par1SmallFontRenderer.getStringWidth(s1), par5 + 6 + 3, 16777215);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
if (par3ItemStack.isItemDamaged())
{
int k = (int) Math.round(13.0D - (double) par3ItemStack.getItemDamageForDisplay() * 13.0D / (double) par3ItemStack.getMaxDamage());
int l = (int) Math.round(255.0D - (double) par3ItemStack.getItemDamageForDisplay() * 255.0D / (double) par3ItemStack.getMaxDamage());
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_TEXTURE_2D);
Tessellator tessellator = Tessellator.instance;
int i1 = 255 - l << 16 | l << 8;
int j1 = (255 - l) / 4 << 16 | 16128;
this.renderQuad(tessellator, par4 + 2, par5 + 13, 13, 2, 0);
this.renderQuad(tessellator, par4 + 2, par5 + 13, 12, 1, j1);
this.renderQuad(tessellator, par4 + 2, par5 + 13, k, 1, i1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
}
}
开发者ID:Andrew2448,项目名称:Andrew2448PowersuitAddons,代码行数:35,代码来源:RenderItemCopy.java
示例15: SmallFontRenderer
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
public SmallFontRenderer(GameSettings par1GameSettings, String par2Str, RenderEngine par3RenderEngine, boolean par4)
{
this.fontTextureName = par2Str;
this.renderEngine = par3RenderEngine;
this.unicodeFlag = true;
this.readFontData();
par3RenderEngine.bindTexture(par2Str);
for (int i = 0; i < 32; ++i)
{
int j = (i >> 3 & 1) * 85;
int k = (i >> 2 & 1) * 170 + j;
int l = (i >> 1 & 1) * 170 + j;
int i1 = (i >> 0 & 1) * 170 + j;
if (i == 6)
{
k += 85;
}
if (par1GameSettings.anaglyph)
{
int j1 = (k * 30 + l * 59 + i1 * 11) / 100;
int k1 = (k * 30 + l * 70) / 100;
int l1 = (k * 30 + i1 * 70) / 100;
k = j1;
l = k1;
i1 = l1;
}
if (i >= 16)
{
k /= 4;
l /= 4;
i1 /= 4;
}
this.colorCode[i] = (k & 255) << 16 | (l & 255) << 8 | i1 & 255;
}
}
开发者ID:Andrew2448,项目名称:Andrew2448PowersuitAddons,代码行数:41,代码来源:SmallFontRenderer.java
示例16: renderRotatingBlockIntoGUI
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
public static void renderRotatingBlockIntoGUI(FontRenderer fontRenderer, RenderEngine renderEngine, ItemStack stack, int x, int y, float zLevel, float scale) {
RenderBlocks renderBlocks = new RenderBlocks();
Block block = Block.blocksList[stack.itemID];
renderEngine.bindTexture(Textures.VANILLA_BLOCK_TEXTURE_SHEET);
GL11.glPushMatrix();
GL11.glTranslatef(x - 2, y + 3, -3.0F + zLevel);
GL11.glScalef(10.0F, 10.0F, 10.0F);
GL11.glTranslatef(1.0F, 0.5F, 1.0F);
GL11.glScalef(1.0F * scale, 1.0F * scale, -1.0F);
GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(0F + 1 * rotationAngle, 0.0F, 1.0F, 0.0F);
rotationAngle = (rotationAngle + 1) % 360;
int var10 = Item.itemsList[stack.itemID].getColorFromItemStack(stack, 0);
float var16 = (var10 >> 16 & 255) / 255.0F;
float var12 = (var10 >> 8 & 255) / 255.0F;
float var13 = (var10 & 255) / 255.0F;
GL11.glColor4f(var16, var12, var13, 1.0F);
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
renderBlocks.useInventoryTint = true;
renderBlocks.renderBlockAsItem(block, stack.getItemDamage(), 1.0F);
renderBlocks.useInventoryTint = true;
GL11.glPopMatrix();
}
开发者ID:Pumuckl007,项目名称:WeaponsMod,代码行数:29,代码来源:RenderUtils.java
示例17: renderItemIntoGUI
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
public static void renderItemIntoGUI(FontRenderer fontRenderer, RenderEngine renderEngine, ItemStack itemStack, int x, int y, float opacity, float scale) {
Icon icon = itemStack.getIconIndex();
GL11.glDisable(GL11.GL_LIGHTING);
renderEngine.bindTexture(Textures.VANILLA_ITEM_TEXTURE_SHEET);
int overlayColour = itemStack.getItem().getColorFromItemStack(itemStack, 0);
float red = (overlayColour >> 16 & 255) / 255.0F;
float green = (overlayColour >> 8 & 255) / 255.0F;
float blue = (overlayColour & 255) / 255.0F;
GL11.glColor4f(red, green, blue, opacity);
drawTexturedQuad(x, y, icon, 16 * scale, 16 * scale, -90);
GL11.glEnable(GL11.GL_LIGHTING);
}
开发者ID:Pumuckl007,项目名称:WeaponsMod,代码行数:15,代码来源:RenderUtils.java
示例18: bindImage
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
@Override
public void bindImage(RenderEngine renderengine) {
Proxies.common.bindTexture(Defaults.TEXTURE_ITEMS);
}
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:5,代码来源:TextureHabitatLocatorFX.java
示例19: bindImage
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
@Override
public void bindImage(RenderEngine renderengine) {
Proxies.common.bindTexture(texture);
}
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:5,代码来源:TextureLiquidsFX.java
示例20: readFontTexture
import net.minecraft.client.renderer.RenderEngine; //导入依赖的package包/类
private void readFontTexture (String par1Str)
{
BufferedImage bufferedimage;
try
{
bufferedimage = ImageIO.read(RenderEngine.class.getResourceAsStream(par1Str));
}
catch (IOException ioexception)
{
throw new RuntimeException(ioexception);
}
int i = bufferedimage.getWidth();
int j = bufferedimage.getHeight();
int[] aint = new int[i * j];
bufferedimage.getRGB(0, 0, i, j, aint, 0, i);
int k = 0;
while (k < 256)
{
int l = k % 16;
int i1 = k / 16;
int j1 = 7;
while (true)
{
if (j1 >= 0)
{
int k1 = l * 8 + j1;
boolean flag = true;
for (int l1 = 0; l1 < 8 && flag; ++l1)
{
int i2 = (i1 * 8 + l1) * i;
int j2 = aint[k1 + i2] & 255;
if (j2 > 0)
{
flag = false;
}
}
if (flag)
{
--j1;
continue;
}
}
if (k == 32)
{
j1 = 2;
}
this.charWidth[k] = j1 + 2;
++k;
break;
}
}
}
开发者ID:Andrew2448,项目名称:Andrew2448PowersuitAddons,代码行数:62,代码来源:SmallFontRenderer.java
注:本文中的net.minecraft.client.renderer.RenderEngine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论