本文整理汇总了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();
}