當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。