本文整理匯總了Java中net.minecraft.client.Minecraft.getRenderManager方法的典型用法代碼示例。如果您正苦於以下問題:Java Minecraft.getRenderManager方法的具體用法?Java Minecraft.getRenderManager怎麽用?Java Minecraft.getRenderManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.Minecraft
的用法示例。
在下文中一共展示了Minecraft.getRenderManager方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderPlayerPre
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderPlayerPre(RenderPlayerEvent.Pre event) {
Minecraft mc = Minecraft.getMinecraft();
renderEntity = mc.getRenderManager().renderViewEntity;
mc.getRenderManager().renderViewEntity = mc.thePlayer;
mc.entityRenderer.loadEntityShader(mc.thePlayer);
}
示例2: renderPlayerPost
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void renderPlayerPost(RenderPlayerEvent.Post event) {
Minecraft mc = Minecraft.getMinecraft();
// System.out.println(Minecraft.getMinecraft().thePlayer.getMirroredYaw(Mirror.LEFT_RIGHT));
mc.getRenderManager().renderViewEntity = renderEntity;
}
示例3: RenderGlobal
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public RenderGlobal(Minecraft mcIn)
{
this.mc = mcIn;
this.renderManager = mcIn.getRenderManager();
this.renderEngine = mcIn.getTextureManager();
this.renderEngine.bindTexture(locationForcefieldPng);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
GlStateManager.bindTexture(0);
this.updateDestroyBlockIcons();
this.vboEnabled = OpenGlHelper.useVbo();
if (this.vboEnabled)
{
this.renderContainer = new VboRenderList();
this.renderChunkFactory = new VboChunkFactory();
}
else
{
this.renderContainer = new RenderList();
this.renderChunkFactory = new ListChunkFactory();
}
this.vertexBufferFormat = new VertexFormat();
this.vertexBufferFormat.func_181721_a(new VertexFormatElement(0, VertexFormatElement.EnumType.FLOAT, VertexFormatElement.EnumUsage.POSITION, 3));
this.generateStars();
this.generateSky();
this.generateSky2();
}
示例4: RenderGlobal
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public RenderGlobal(Minecraft mcIn)
{
this.cloudRenderer = new CloudRenderer(mcIn);
this.mc = mcIn;
this.renderManager = mcIn.getRenderManager();
this.renderEngine = mcIn.getTextureManager();
this.renderEngine.bindTexture(locationForcefieldPng);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_REPEAT);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_REPEAT);
GlStateManager.bindTexture(0);
this.updateDestroyBlockIcons();
this.vboEnabled = OpenGlHelper.useVbo();
if (this.vboEnabled)
{
this.renderContainer = new VboRenderList();
this.renderChunkFactory = new VboChunkFactory();
}
else
{
this.renderContainer = new RenderList();
this.renderChunkFactory = new ListChunkFactory();
}
this.vertexBufferFormat = new VertexFormat();
this.vertexBufferFormat.func_181721_a(new VertexFormatElement(0, VertexFormatElement.EnumType.FLOAT, VertexFormatElement.EnumUsage.POSITION, 3));
this.generateStars();
this.generateSky();
this.generateSky2();
}
示例5: initModels
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public static void initModels() {
Minecraft mc = Minecraft.getMinecraft();
RenderManager rm = mc.getRenderManager();
RenderItem ri = mc.getRenderItem();
RenderingRegistry.registerEntityRenderingHandler(EntityCustomPotion.class, new RenderThrowable(rm, UCItems.generic, 13, ri));
RenderingRegistry.registerEntityRenderingHandler(EntityItemWeepingEye.class, new RenderThrowable(rm, UCItems.generic, 16, ri));
RenderingRegistry.registerEntityRenderingHandler(EntityEulaBook.class, new RenderThrowable(rm, UCItems.generic, 24, ri));
}
示例6: renderDebugText
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public static void renderDebugText(String str, double x, double y, double z, float partialTicks, int color)
{
Minecraft minecraft = Minecraft.getMinecraft();
if (minecraft.player != null && minecraft.getRenderManager() != null && minecraft.getRenderManager().options != null)
{
FontRenderer fontrenderer = minecraft.fontRendererObj;
EntityPlayer entityplayer = minecraft.player;
double d0 = entityplayer.lastTickPosX + (entityplayer.posX - entityplayer.lastTickPosX) * (double)partialTicks;
double d1 = entityplayer.lastTickPosY + (entityplayer.posY - entityplayer.lastTickPosY) * (double)partialTicks;
double d2 = entityplayer.lastTickPosZ + (entityplayer.posZ - entityplayer.lastTickPosZ) * (double)partialTicks;
GlStateManager.pushMatrix();
GlStateManager.translate((float)(x - d0), (float)(y - d1) + 0.07F, (float)(z - d2));
GlStateManager.glNormal3f(0.0F, 1.0F, 0.0F);
GlStateManager.scale(0.02F, -0.02F, 0.02F);
RenderManager rendermanager = minecraft.getRenderManager();
GlStateManager.rotate(-rendermanager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate((float)(rendermanager.options.thirdPersonView == 2 ? 1 : -1) * rendermanager.playerViewX, 1.0F, 0.0F, 0.0F);
GlStateManager.disableLighting();
GlStateManager.enableTexture2D();
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
GlStateManager.scale(-1.0F, 1.0F, 1.0F);
fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, 0, color);
GlStateManager.enableLighting();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
}
示例7: RenderGlobal
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public RenderGlobal(Minecraft mcIn)
{
this.renderEnv = new RenderEnv(this.theWorld, Blocks.AIR.getDefaultState(), new BlockPos(0, 0, 0));
this.renderOverlayDamaged = false;
this.renderOverlayEyes = false;
this.cloudRenderer = new CloudRenderer(mcIn);
this.mc = mcIn;
this.renderManager = mcIn.getRenderManager();
this.renderEngine = mcIn.getTextureManager();
this.renderEngine.bindTexture(FORCEFIELD_TEXTURES);
GlStateManager.glTexParameteri(3553, 10242, 10497);
GlStateManager.glTexParameteri(3553, 10243, 10497);
GlStateManager.bindTexture(0);
this.updateDestroyBlockIcons();
this.vboEnabled = OpenGlHelper.useVbo();
if (this.vboEnabled)
{
this.renderContainer = new VboRenderList();
this.renderChunkFactory = new VboChunkFactory();
}
else
{
this.renderContainer = new RenderList();
this.renderChunkFactory = new ListChunkFactory();
}
this.vertexBufferFormat = new VertexFormat();
this.vertexBufferFormat.addElement(new VertexFormatElement(0, VertexFormatElement.EnumType.FLOAT, VertexFormatElement.EnumUsage.POSITION, 3));
this.generateStars();
this.generateSky();
this.generateSky2();
}
示例8: renderDebugText
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public static void renderDebugText(String str, double x, double y, double z, float partialTicks, int color)
{
Minecraft minecraft = Minecraft.getMinecraft();
if (minecraft.thePlayer != null && minecraft.getRenderManager() != null && minecraft.getRenderManager().options != null)
{
FontRenderer fontrenderer = minecraft.fontRendererObj;
EntityPlayer entityplayer = minecraft.thePlayer;
double d0 = entityplayer.lastTickPosX + (entityplayer.posX - entityplayer.lastTickPosX) * (double)partialTicks;
double d1 = entityplayer.lastTickPosY + (entityplayer.posY - entityplayer.lastTickPosY) * (double)partialTicks;
double d2 = entityplayer.lastTickPosZ + (entityplayer.posZ - entityplayer.lastTickPosZ) * (double)partialTicks;
GlStateManager.pushMatrix();
GlStateManager.translate((float)(x - d0), (float)(y - d1) + 0.07F, (float)(z - d2));
GlStateManager.glNormal3f(0.0F, 1.0F, 0.0F);
GlStateManager.scale(0.02F, -0.02F, 0.02F);
RenderManager rendermanager = minecraft.getRenderManager();
GlStateManager.rotate(-rendermanager.playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate((float)(rendermanager.options.thirdPersonView == 2 ? 1 : -1) * rendermanager.playerViewX, 1.0F, 0.0F, 0.0F);
GlStateManager.disableLighting();
GlStateManager.enableTexture2D();
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
GlStateManager.scale(-1.0F, 1.0F, 1.0F);
fontrenderer.drawString(str, -fontrenderer.getStringWidth(str) / 2, 0, color);
GlStateManager.enableLighting();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
}
示例9: RenderGlobal
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public RenderGlobal(Minecraft mcIn)
{
this.mc = mcIn;
this.renderManager = mcIn.getRenderManager();
this.renderEngine = mcIn.getTextureManager();
this.renderEngine.bindTexture(FORCEFIELD_TEXTURES);
GlStateManager.glTexParameteri(3553, 10242, 10497);
GlStateManager.glTexParameteri(3553, 10243, 10497);
GlStateManager.bindTexture(0);
this.updateDestroyBlockIcons();
this.vboEnabled = OpenGlHelper.useVbo();
if (this.vboEnabled)
{
this.renderContainer = new VboRenderList();
this.renderChunkFactory = new VboChunkFactory();
}
else
{
this.renderContainer = new RenderList();
this.renderChunkFactory = new ListChunkFactory();
}
this.vertexBufferFormat = new VertexFormat();
this.vertexBufferFormat.addElement(new VertexFormatElement(0, VertexFormatElement.EnumType.FLOAT, VertexFormatElement.EnumUsage.POSITION, 3));
this.generateStars();
this.generateSky();
this.generateSky2();
}
示例10: ItemRenderer
import net.minecraft.client.Minecraft; //導入方法依賴的package包/類
public ItemRenderer(Minecraft mcIn)
{
this.mc = mcIn;
this.renderManager = mcIn.getRenderManager();
this.itemRenderer = mcIn.getRenderItem();
}