当前位置: 首页>>代码示例>>Java>>正文


Java Minecraft.getRenderManager方法代码示例

本文整理汇总了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);
}
 
开发者ID:PorPit,项目名称:MineCamera,代码行数:9,代码来源:EventLoader.java

示例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;
}
 
开发者ID:PorPit,项目名称:MineCamera,代码行数:8,代码来源:EventLoader.java

示例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();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:30,代码来源:RenderGlobal.java

示例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();
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:31,代码来源:RenderGlobal.java

示例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));
}
 
开发者ID:bafomdad,项目名称:uniquecrops,代码行数:12,代码来源:UCEntities.java

示例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();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:30,代码来源:DebugRenderer.java

示例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();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:RenderGlobal.java

示例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();
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:30,代码来源:DebugRenderer.java

示例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();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:30,代码来源:RenderGlobal.java

示例10: ItemRenderer

import net.minecraft.client.Minecraft; //导入方法依赖的package包/类
public ItemRenderer(Minecraft mcIn)
{
    this.mc = mcIn;
    this.renderManager = mcIn.getRenderManager();
    this.itemRenderer = mcIn.getRenderItem();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:7,代码来源:ItemRenderer.java


注:本文中的net.minecraft.client.Minecraft.getRenderManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。