Java 类net.minecraft.client.renderer.BlockRendererDispatcher 实例源码

项目:CustomWorldGen    文件:LayerHeldBlock.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:harshencastle    文件:HarshenClientUtils.java   
public static void renderGhostModel(IBakedModel model, BlockPos position, Color color, boolean noDepth, float partialTicks)
{
    GlStateManager.enableBlend();
       GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_DST_COLOR);
    BufferBuilder vb;
    if(noDepth)
    {
           GlStateManager.depthFunc(519);
        vb = prepRenderBlockDepth(partialTicks, true);
    }
    else
        vb = prepRender(partialTicks, true);
       vb.begin(7, DefaultVertexFormats.BLOCK);
       World world = Minecraft.getMinecraft().world;
       BlockRendererDispatcher dispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
       dispatcher.getBlockModelRenderer().renderModel(world, model, Minecraft.getMinecraft().world.getBlockState(position), position.add(0, noDepth ? 500 : 0, 0), vb, false);
       for(int i = 0; i < vb.getVertexCount(); i++)
        vb.putColorMultiplier(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, i);
       vb.color(1, 1, 1, 0.1f);
       postRender();
       GlStateManager.depthFunc(515);
       GlStateManager.disableBlend();
}
项目:MeeCreeps    文件:LayerRenderHeldBlock.java   
@Override
public void doRenderLayer(EntityMeeCreeps entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null) {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender();
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j, k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:DecompiledMinecraft    文件:LayerHeldBlock.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate.getBlock().getMaterial() != Material.air)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:DecompiledMinecraft    文件:LayerIronGolemFlower.java   
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (entitylivingbaseIn.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:BaseClient    文件:LayerHeldBlock.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate.getBlock().getMaterial() != Material.air)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:BaseClient    文件:LayerIronGolemFlower.java   
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (entitylivingbaseIn.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:BaseClient    文件:LayerHeldBlock.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate.getBlock().getMaterial() != Material.air)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:BaseClient    文件:LayerIronGolemFlower.java   
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (entitylivingbaseIn.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(f, -f, f);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:EndermanEvolution    文件:LayerHeldBlock2.java   
@Override
public void doRenderLayer(EntityEvolvedEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null) {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender();
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j, k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:Backmemed    文件:LayerHeldBlock.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:Backmemed    文件:LayerIronGolemFlower.java   
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (entitylivingbaseIn.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:CustomWorldGen    文件:LayerIronGolemFlower.java   
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (entitylivingbaseIn.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:BetterWithAddons    文件:RenderArtifactFrame.java   
private void renderModel(EntityArtifactFrame entity)
{
    BlockRendererDispatcher blockrendererdispatcher = this.mc.getBlockRendererDispatcher();
    ModelManager modelmanager = blockrendererdispatcher.getBlockModelShapes().getModelManager();
    IBakedModel ibakedmodel;

    if (!entity.getDisplayedItem().isEmpty() && entity.getDisplayedItem().getItem() == Items.FILLED_MAP)
    {
        //ModelResourceLocation mapModel = new ModelResourceLocation(new ResourceLocation("betterwithaddons",this.mapModel.getResourcePath()),this.mapModel.getVariant());
        ibakedmodel = modelmanager.getModel(mapModel);
    }
    else
    {
        //ModelResourceLocation itemFrameModel = new ModelResourceLocation(new ResourceLocation("betterwithaddons",this.itemFrameModel.getResourcePath()),this.itemFrameModel.getVariant());
        ibakedmodel = modelmanager.getModel(itemFrameModel);
    }

    //GlStateManager.pushMatrix();
    //GlStateManager.translate(-0.5F, -0.5F, -0.5F);

    blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F);
}
项目:CrystalMod    文件:CoverRender.java   
public static List<CustomBakedQuad> buildCoverQuads(IBlockAccess world, BlockPos pos, IBlockState state, int side, AxisAlignedBB bounds, final CoverCutter.ITransformer[] cutType){
    final EnumFacing face = EnumFacing.getFront(side);
       final IBlockAccess coverAccess = new PipeBlockAccessWrapper(world, pos, face);
       final BlockRendererDispatcher dispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
       try {
           state = state.getActualState(coverAccess, pos);
       }
       catch (Exception ex) {}
       final IBakedModel model = dispatcher.getModelForState(state);
       try {
           state = state.getBlock().getExtendedState(state, coverAccess, pos);
       }
       catch (Exception ex2) {}
       final List<BakedQuad> bakedQuads = new LinkedList<BakedQuad>();
       final long posRand = MathHelper.getPositionRandom(pos);
       bakedQuads.addAll(model.getQuads(state, (EnumFacing)null, posRand));
       for (final EnumFacing face2 : EnumFacing.VALUES) {
           bakedQuads.addAll(model.getQuads(state, face2, posRand));
       }
       List<CustomBakedQuad> quads = CustomBakedQuad.fromArray(bakedQuads);
       if (cutType != null) {
           quads = CoverCutter.cut(quads, side, cutType);
       }
       quads = sliceQuads(quads, side, bounds);
       return quads;
}
项目:metamorph    文件:BlockMorph.java   
/**
 * Render in GUIs just like any other entity, 45 degree rotate  by 
 * X and Y. 
 */
@Override
@SideOnly(Side.CLIENT)
public void renderOnScreen(EntityPlayer player, int x, int y, float scale, float alpha)
{
    Minecraft mc = Minecraft.getMinecraft();

    GlStateManager.enableDepth();
    BlockRendererDispatcher blockrendererdispatcher = mc.getBlockRendererDispatcher();
    GlStateManager.pushMatrix();
    GlStateManager.translate(x, y, 0);
    GlStateManager.scale((-scale), -scale, -scale);
    GlStateManager.rotate(45.0F, -1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(0, 1, 0);

    mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    blockrendererdispatcher.renderBlockBrightness(this.block, 1.0F);
    GlStateManager.popMatrix();
    GlStateManager.disableDepth();
}
项目:metamorph    文件:BlockMorph.java   
/**
 * Render the block morph on player's position
 */
@Override
@SideOnly(Side.CLIENT)
public void render(EntityLivingBase entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    Minecraft mc = Minecraft.getMinecraft();

    BlockRendererDispatcher blockrendererdispatcher = mc.getBlockRendererDispatcher();
    GlStateManager.pushMatrix();
    GlStateManager.translate((float) x, (float) y + 0.5F, (float) z);

    mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(-0.5F, -0.5F, 0.5F);
    blockrendererdispatcher.renderBlockBrightness(this.block, 1.0F);
    GlStateManager.translate(0.0F, 0.0F, 1.0F);
    GlStateManager.popMatrix();
}
项目:Fake-Ores-2    文件:RenderOres.java   
public void doRender(EntityOres entity, double x, double y, double z, float entityYaw, float partialTicks) {
    BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();

    GlStateManager.pushMatrix();

    GlStateManager.translate((float) x, (float) y + 0.5F, (float) z);
    GlStateManager.rotate(entity.rotationYawHead, 0, 1, 0);
    GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
    GlStateManager.translate(-0.5F, -0.5F, 0.5F);

    this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    //blockrendererdispatcher.renderBlockBrightness(this.iblockState, entity.getBrightness(partialTicks));
    blockrendererdispatcher.renderBlockBrightness(this.iblockState, entity.getBrightness());
    GlStateManager.translate(0.0F, 0.0F, 1.0F);
    if (this.renderOutlines) {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
        blockrendererdispatcher.renderBlockBrightness(this.iblockState, 1.0F);
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }

    GlStateManager.popMatrix();

    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:ExpandedRailsMod    文件:LayerHeldBlock.java   
public void doRenderLayer(EntityEnderman entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    IBlockState iblockstate = entitylivingbaseIn.getHeldBlockState();

    if (iblockstate != null)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, 0.6875F, -0.75F);
        GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(0.25F, 0.1875F, 0.25F);
        float f = 0.5F;
        GlStateManager.scale(-0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.endermanRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(iblockstate, 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:ExpandedRailsMod    文件:LayerIronGolemFlower.java   
public void doRenderLayer(EntityIronGolem entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (entitylivingbaseIn.getHoldRoseTick() != 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.enableRescaleNormal();
        GlStateManager.pushMatrix();
        GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F);
        GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
        GlStateManager.translate(-0.9375F, -0.625F, -0.9375F);
        float f = 0.5F;
        GlStateManager.scale(0.5F, -0.5F, 0.5F);
        int i = entitylivingbaseIn.getBrightnessForRender(partialTicks);
        int j = i % 65536;
        int k = i / 65536;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        this.ironGolemRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        blockrendererdispatcher.renderBlockBrightness(Blocks.RED_FLOWER.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.disableRescaleNormal();
    }
}
项目:OpenBlocks    文件:TileEntityTrophyRenderer.java   
private void renderStaticPart(double x, double y, double z) {
    final BlockRendererDispatcher blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();
    IBlockState state = Blocks.trophy.getDefaultState();

    IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(state);

    Tessellator tessellator = Tessellator.getInstance();
    final BufferBuilder wr = tessellator.getBuffer();
    bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);

    wr.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
    wr.setTranslation(x, y, z);

    for (EnumFacing face : EnumFacing.values())
        renderQuads(wr, model.getQuads(state, face, 0));

    renderQuads(wr, model.getQuads(state, null, 0));
    tessellator.draw();

    wr.setTranslation(0, 0, 0);
}
项目:OpenModsLib    文件:GuiComponentSideSelector.java   
private void drawBlock() {
    final Tessellator tessellator = Tessellator.getInstance();
    final BufferBuilder wr = tessellator.getBuffer();
    final BlockRendererDispatcher dispatcher = parent.getMinecraft().getBlockRendererDispatcher();
    for (BlockRenderLayer layer : BlockRenderLayer.values()) {
        if (blockState.getBlock().canRenderInLayer(blockState, layer)) {
            net.minecraftforge.client.ForgeHooksClient.setRenderLayer(layer);
            wr.setTranslation(-0.5, -0.5, -0.5);
            wr.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
            dispatcher.renderBlock(blockState, FakeBlockAccess.ORIGIN, access, wr);
            tessellator.draw();
        }
    }
    wr.setTranslation(0.0D, 0.0D, 0.0D);

    net.minecraftforge.client.ForgeHooksClient.setRenderLayer(null);
}
项目:EnderIO    文件:EnchanterModelRenderer.java   
private void renderBase() {
  BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
  BlockModelShapes modelShapes = blockrendererdispatcher.getBlockModelShapes();
  IBakedModel bakedModel = modelShapes
      .getModelForState(MachineObject.block_enchanter.getBlockNN().getDefaultState().withProperty(EnumRenderMode.RENDER, EnumRenderMode.FRONT));

  RenderUtil.bindBlockTexture();
  GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  GlStateManager.enableRescaleNormal();
  GlStateManager.pushMatrix();

  Tessellator tessellator = Tessellator.getInstance();
  VertexBuffer vertexbuffer = tessellator.getBuffer();
  vertexbuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);

  for (EnumFacing enumfacing : EnumFacing.values()) {
    this.renderQuads(vertexbuffer, bakedModel.getQuads((IBlockState) null, enumfacing, 0L));
  }

  this.renderQuads(vertexbuffer, bakedModel.getQuads((IBlockState) null, (EnumFacing) null, 0L));
  tessellator.draw();

  GlStateManager.popMatrix();
  GlStateManager.disableRescaleNormal();
}
项目:EnderIO    文件:SoulBinderTESR.java   
@SuppressWarnings("null")
public static void renderBlockModel(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, boolean translateToOrigin, boolean relight) {
  VertexBuffer wr = Tessellator.getInstance().getBuffer();
  wr.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
  if (translateToOrigin) {
    wr.setTranslation(-pos.getX(), -pos.getY(), -pos.getZ());
  }
  BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
  BlockModelShapes modelShapes = blockrendererdispatcher.getBlockModelShapes();
  IBakedModel ibakedmodel = modelShapes.getModelForState(state);
  final IBlockAccess worldWrapper = relight ? new WorldWrapper(world, pos) : world;
  for (BlockRenderLayer layer : BlockRenderLayer.values()) {
    if (state.getBlock().canRenderInLayer(state, layer)) {
      ForgeHooksClient.setRenderLayer(layer);
      blockrendererdispatcher.getBlockModelRenderer().renderModel(worldWrapper, ibakedmodel, state, pos, wr, false);
    }
  }
  ForgeHooksClient.setRenderLayer(null);
  if (translateToOrigin) {
    wr.setTranslation(0, 0, 0);
  }
  Tessellator.getInstance().draw();
}
项目:EnderIO    文件:IoConfigRenderer.java   
public void renderBlock(@Nonnull IBlockState state, @Nonnull BlockPos pos, @Nonnull IBlockAccess blockAccess, @Nonnull VertexBuffer worldRendererIn) {

    try {
      BlockRendererDispatcher blockrendererdispatcher = mc.getBlockRendererDispatcher();
      EnumBlockRenderType type = state.getRenderType();
      if (type != EnumBlockRenderType.MODEL) {
        blockrendererdispatcher.renderBlock(state, pos, blockAccess, worldRendererIn);
        return;
      }

      // We only want to change one param here, the check sides
      IBakedModel ibakedmodel = blockrendererdispatcher.getModelForState(state);
      state = state.getBlock().getExtendedState(state, world, pos);
      blockrendererdispatcher.getBlockModelRenderer().renderModel(blockAccess, ibakedmodel, state, pos, worldRendererIn, false);

    } catch (Throwable throwable) {
      // Just bury a render issue here, it is only the IO screen
    }
  }
项目:GeneralLaymansAestheticSpyingScreen    文件:TileEntityGlassTerminalRenderer.java   
@Override
public void render(TileEntityGlassTerminal te, double x, double y, double z, float partialTick, int destroyStage, float alpha1)
{
    if(WorldPortalRenderer.renderLevel == 0)
    {
        bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        GlStateManager.pushMatrix();
        GlStateManager.disableLighting();

        GlStateManager.color(1F, 1F, 1F, 1F);

        GlStateManager.translate(x, y, z);

        Tessellator tessellator = Tessellator.getInstance();
        BufferBuilder bufferbuilder = tessellator.getBuffer();

        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        bufferbuilder.begin(7, DefaultVertexFormats.BLOCK);
        blockrendererdispatcher.getBlockModelRenderer().renderModel(te.getWorld(), blockrendererdispatcher.getModelForState(Blocks.OBSIDIAN.getDefaultState()), Blocks.OBSIDIAN.getDefaultState(), BlockPos.ORIGIN, bufferbuilder, false);
        tessellator.draw();

        GlStateManager.pushMatrix();
        float scale = 0.25F;
        GlStateManager.translate(0.5D, 0.5D, 0.5D);
        GlStateManager.rotate(45F, te.facing.getFrontOffsetX(), te.facing.getFrontOffsetY(), te.facing.getFrontOffsetZ());
        GlStateManager.translate(-0.5D, -0.5D, -0.5D);

        GlStateManager.translate(0.375D, 0.375D, 0.375D);
        GlStateManager.translate(te.facing.getFrontOffsetX() * -0.4D, te.facing.getFrontOffsetY() * -0.4D, te.facing.getFrontOffsetZ() * -0.4D);
        GlStateManager.scale(scale, scale, scale);

        bufferbuilder.begin(7, DefaultVertexFormats.BLOCK);
        blockrendererdispatcher.getBlockModelRenderer().renderModel(te.getWorld(), blockrendererdispatcher.getModelForState(Blocks.GLASS.getDefaultState()), Blocks.GLASS.getDefaultState(), BlockPos.ORIGIN, bufferbuilder, false);
        tessellator.draw();
        GlStateManager.popMatrix();

        GlStateManager.enableLighting();
        GlStateManager.popMatrix();
    }
}
项目:DecompiledMinecraft    文件:RenderTntMinecart.java   
protected void func_180560_a(EntityMinecartTNT minecart, float partialTicks, IBlockState state)
{
    int i = minecart.getFuseTicks();

    if (i > -1 && (float)i - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)i - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp_float(f, 0.0F, 1.0F);
        f = f * f;
        f = f * f;
        float f1 = 1.0F + f * 0.3F;
        GlStateManager.scale(f1, f1, f1);
    }

    super.func_180560_a(minecart, partialTicks, state);

    if (i > -1 && i / 5 % 2 == 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 772);
        GlStateManager.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F);
        GlStateManager.pushMatrix();
        blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableBlend();
        GlStateManager.enableLighting();
        GlStateManager.enableTexture2D();
    }
}
项目:DecompiledMinecraft    文件:LayerMooshroomMushroom.java   
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
        GlStateManager.enableCull();
        GlStateManager.cullFace(1028);
        GlStateManager.pushMatrix();
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.2F, 0.35F, 0.5F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.1F, 0.0F, -0.6F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        ((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.0F, 0.7F, -0.2F);
        GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.cullFace(1029);
        GlStateManager.disableCull();
    }
}
项目:DecompiledMinecraft    文件:RenderFallingBlock.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityFallingBlock entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (entity.getBlock() != null)
    {
        this.bindTexture(TextureMap.locationBlocksTexture);
        IBlockState iblockstate = entity.getBlock();
        Block block = iblockstate.getBlock();
        BlockPos blockpos = new BlockPos(entity);
        World world = entity.getWorldObj();

        if (iblockstate != world.getBlockState(blockpos) && block.getRenderType() != -1)
        {
            if (block.getRenderType() == 3)
            {
                GlStateManager.pushMatrix();
                GlStateManager.translate((float)x, (float)y, (float)z);
                GlStateManager.disableLighting();
                Tessellator tessellator = Tessellator.getInstance();
                WorldRenderer worldrenderer = tessellator.getWorldRenderer();
                worldrenderer.begin(7, DefaultVertexFormats.BLOCK);
                int i = blockpos.getX();
                int j = blockpos.getY();
                int k = blockpos.getZ();
                worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F));
                BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
                IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null);
                blockrendererdispatcher.getBlockModelRenderer().renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false);
                worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
                tessellator.draw();
                GlStateManager.enableLighting();
                GlStateManager.popMatrix();
                super.doRender(entity, x, y, z, entityYaw, partialTicks);
            }
        }
    }
}
项目:DecompiledMinecraft    文件:RenderItemFrame.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    BlockPos blockpos = entity.getHangingPosition();
    double d0 = (double)blockpos.getX() - entity.posX + x;
    double d1 = (double)blockpos.getY() - entity.posY + y;
    double d2 = (double)blockpos.getZ() - entity.posZ + z;
    GlStateManager.translate(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D);
    GlStateManager.rotate(180.0F - entity.rotationYaw, 0.0F, 1.0F, 0.0F);
    this.renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    BlockRendererDispatcher blockrendererdispatcher = this.mc.getBlockRendererDispatcher();
    ModelManager modelmanager = blockrendererdispatcher.getBlockModelShapes().getModelManager();
    IBakedModel ibakedmodel;

    if (entity.getDisplayedItem() != null && entity.getDisplayedItem().getItem() == Items.filled_map)
    {
        ibakedmodel = modelmanager.getModel(this.mapModel);
    }
    else
    {
        ibakedmodel = modelmanager.getModel(this.itemFrameModel);
    }

    GlStateManager.pushMatrix();
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
    GlStateManager.translate(0.0F, 0.0F, 0.4375F);
    this.renderItem(entity);
    GlStateManager.popMatrix();
    this.renderName(entity, x + (double)((float)entity.facingDirection.getFrontOffsetX() * 0.3F), y - 0.25D, z + (double)((float)entity.facingDirection.getFrontOffsetZ() * 0.3F));
}
项目:BaseClient    文件:RenderTntMinecart.java   
protected void func_180560_a(EntityMinecartTNT minecart, float partialTicks, IBlockState state)
{
    int i = minecart.getFuseTicks();

    if (i > -1 && (float)i - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)i - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp_float(f, 0.0F, 1.0F);
        f = f * f;
        f = f * f;
        float f1 = 1.0F + f * 0.3F;
        GlStateManager.scale(f1, f1, f1);
    }

    super.func_180560_a(minecart, partialTicks, state);

    if (i > -1 && i / 5 % 2 == 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 772);
        GlStateManager.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F);
        GlStateManager.pushMatrix();
        blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableBlend();
        GlStateManager.enableLighting();
        GlStateManager.enableTexture2D();
    }
}
项目:BaseClient    文件:LayerMooshroomMushroom.java   
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
        GlStateManager.enableCull();
        GlStateManager.cullFace(1028);
        GlStateManager.pushMatrix();
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.2F, 0.35F, 0.5F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.1F, 0.0F, -0.6F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        ((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.0F, 0.7F, -0.2F);
        GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.cullFace(1029);
        GlStateManager.disableCull();
    }
}
项目:BaseClient    文件:RenderFallingBlock.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityFallingBlock entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (entity.getBlock() != null)
    {
        this.bindTexture(TextureMap.locationBlocksTexture);
        IBlockState iblockstate = entity.getBlock();
        Block block = iblockstate.getBlock();
        BlockPos blockpos = new BlockPos(entity);
        World world = entity.getWorldObj();

        if (iblockstate != world.getBlockState(blockpos) && block.getRenderType() != -1)
        {
            if (block.getRenderType() == 3)
            {
                GlStateManager.pushMatrix();
                GlStateManager.translate((float)x, (float)y, (float)z);
                GlStateManager.disableLighting();
                Tessellator tessellator = Tessellator.getInstance();
                WorldRenderer worldrenderer = tessellator.getWorldRenderer();
                worldrenderer.begin(7, DefaultVertexFormats.BLOCK);
                int i = blockpos.getX();
                int j = blockpos.getY();
                int k = blockpos.getZ();
                worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F));
                BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
                IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null);
                blockrendererdispatcher.getBlockModelRenderer().renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false);
                worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
                tessellator.draw();
                GlStateManager.enableLighting();
                GlStateManager.popMatrix();
                super.doRender(entity, x, y, z, entityYaw, partialTicks);
            }
        }
    }
}
项目:BaseClient    文件:RenderItemFrame.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    BlockPos blockpos = entity.getHangingPosition();
    double d0 = (double)blockpos.getX() - entity.posX + x;
    double d1 = (double)blockpos.getY() - entity.posY + y;
    double d2 = (double)blockpos.getZ() - entity.posZ + z;
    GlStateManager.translate(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D);
    GlStateManager.rotate(180.0F - entity.rotationYaw, 0.0F, 1.0F, 0.0F);
    this.renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    BlockRendererDispatcher blockrendererdispatcher = this.mc.getBlockRendererDispatcher();
    ModelManager modelmanager = blockrendererdispatcher.getBlockModelShapes().getModelManager();
    IBakedModel ibakedmodel;

    if (entity.getDisplayedItem() != null && entity.getDisplayedItem().getItem() == Items.filled_map)
    {
        ibakedmodel = modelmanager.getModel(this.mapModel);
    }
    else
    {
        ibakedmodel = modelmanager.getModel(this.itemFrameModel);
    }

    GlStateManager.pushMatrix();
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
    GlStateManager.translate(0.0F, 0.0F, 0.4375F);
    this.renderItem(entity);
    GlStateManager.popMatrix();
    this.renderName(entity, x + (double)((float)entity.facingDirection.getFrontOffsetX() * 0.3F), y - 0.25D, z + (double)((float)entity.facingDirection.getFrontOffsetZ() * 0.3F));
}
项目:BaseClient    文件:RenderTntMinecart.java   
protected void func_180560_a(EntityMinecartTNT minecart, float partialTicks, IBlockState state)
{
    int i = minecart.getFuseTicks();

    if (i > -1 && (float)i - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)i - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp_float(f, 0.0F, 1.0F);
        f = f * f;
        f = f * f;
        float f1 = 1.0F + f * 0.3F;
        GlStateManager.scale(f1, f1, f1);
    }

    super.func_180560_a(minecart, partialTicks, state);

    if (i > -1 && i / 5 % 2 == 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(770, 772);
        GlStateManager.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F);
        GlStateManager.pushMatrix();
        blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableBlend();
        GlStateManager.enableLighting();
        GlStateManager.enableTexture2D();
    }
}
项目:BaseClient    文件:LayerMooshroomMushroom.java   
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
{
    if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
        GlStateManager.enableCull();
        GlStateManager.cullFace(1028);
        GlStateManager.pushMatrix();
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.2F, 0.35F, 0.5F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.1F, 0.0F, -0.6F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        ((ModelQuadruped)this.mooshroomRenderer.getMainModel()).head.postRender(0.0625F);
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.0F, 0.7F, -0.2F);
        GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.cullFace(1029);
        GlStateManager.disableCull();
    }
}
项目:BaseClient    文件:RenderFallingBlock.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityFallingBlock entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (entity.getBlock() != null)
    {
        this.bindTexture(TextureMap.locationBlocksTexture);
        IBlockState iblockstate = entity.getBlock();
        Block block = iblockstate.getBlock();
        BlockPos blockpos = new BlockPos(entity);
        World world = entity.getWorldObj();

        if (iblockstate != world.getBlockState(blockpos) && block.getRenderType() != -1)
        {
            if (block.getRenderType() == 3)
            {
                GlStateManager.pushMatrix();
                GlStateManager.translate((float)x, (float)y, (float)z);
                GlStateManager.disableLighting();
                Tessellator tessellator = Tessellator.getInstance();
                WorldRenderer worldrenderer = tessellator.getWorldRenderer();
                worldrenderer.begin(7, DefaultVertexFormats.BLOCK);
                int i = blockpos.getX();
                int j = blockpos.getY();
                int k = blockpos.getZ();
                worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F));
                BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
                IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null);
                blockrendererdispatcher.getBlockModelRenderer().renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false);
                worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
                tessellator.draw();
                GlStateManager.enableLighting();
                GlStateManager.popMatrix();
                super.doRender(entity, x, y, z, entityYaw, partialTicks);
            }
        }
    }
}
项目:BaseClient    文件:RenderItemFrame.java   
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    BlockPos blockpos = entity.getHangingPosition();
    double d0 = (double)blockpos.getX() - entity.posX + x;
    double d1 = (double)blockpos.getY() - entity.posY + y;
    double d2 = (double)blockpos.getZ() - entity.posZ + z;
    GlStateManager.translate(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D);
    GlStateManager.rotate(180.0F - entity.rotationYaw, 0.0F, 1.0F, 0.0F);
    this.renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
    BlockRendererDispatcher blockrendererdispatcher = this.mc.getBlockRendererDispatcher();
    ModelManager modelmanager = blockrendererdispatcher.getBlockModelShapes().getModelManager();
    IBakedModel ibakedmodel;

    if (entity.getDisplayedItem() != null && entity.getDisplayedItem().getItem() == Items.filled_map)
    {
        ibakedmodel = modelmanager.getModel(this.mapModel);
    }
    else
    {
        ibakedmodel = modelmanager.getModel(this.itemFrameModel);
    }

    GlStateManager.pushMatrix();
    GlStateManager.translate(-0.5F, -0.5F, -0.5F);
    blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F);
    GlStateManager.popMatrix();
    GlStateManager.translate(0.0F, 0.0F, 0.4375F);
    this.renderItem(entity);
    GlStateManager.popMatrix();
    this.renderName(entity, x + (double)((float)entity.facingDirection.getFrontOffsetX() * 0.3F), y - 0.25D, z + (double)((float)entity.facingDirection.getFrontOffsetZ() * 0.3F));
}
项目:Backmemed    文件:RenderTntMinecart.java   
protected void renderCartContents(EntityMinecartTNT p_188319_1_, float partialTicks, IBlockState p_188319_3_)
{
    int i = p_188319_1_.getFuseTicks();

    if (i > -1 && (float)i - partialTicks + 1.0F < 10.0F)
    {
        float f = 1.0F - ((float)i - partialTicks + 1.0F) / 10.0F;
        f = MathHelper.clamp(f, 0.0F, 1.0F);
        f = f * f;
        f = f * f;
        float f1 = 1.0F + f * 0.3F;
        GlStateManager.scale(f1, f1, f1);
    }

    super.renderCartContents(p_188319_1_, partialTicks, p_188319_3_);

    if (i > -1 && i / 5 % 2 == 0)
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        GlStateManager.disableTexture2D();
        GlStateManager.disableLighting();
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
        GlStateManager.color(1.0F, 1.0F, 1.0F, (1.0F - ((float)i - partialTicks + 1.0F) / 100.0F) * 0.8F);
        GlStateManager.pushMatrix();
        blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableBlend();
        GlStateManager.enableLighting();
        GlStateManager.enableTexture2D();
    }
}
项目:Backmemed    文件:LayerMooshroomMushroom.java   
public void doRenderLayer(EntityMooshroom entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
    if (!entitylivingbaseIn.isChild() && !entitylivingbaseIn.isInvisible())
    {
        BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
        this.mooshroomRenderer.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        GlStateManager.enableCull();
        GlStateManager.cullFace(GlStateManager.CullFace.FRONT);
        GlStateManager.pushMatrix();
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.2F, 0.35F, 0.5F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.pushMatrix();
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.1F, 0.0F, -0.6F);
        GlStateManager.rotate(42.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.popMatrix();
        GlStateManager.pushMatrix();
        this.mooshroomRenderer.getMainModel().head.postRender(0.0625F);
        GlStateManager.scale(1.0F, -1.0F, 1.0F);
        GlStateManager.translate(0.0F, 0.7F, -0.2F);
        GlStateManager.rotate(12.0F, 0.0F, 1.0F, 0.0F);
        GlStateManager.translate(-0.5F, -0.5F, 0.5F);
        blockrendererdispatcher.renderBlockBrightness(Blocks.RED_MUSHROOM.getDefaultState(), 1.0F);
        GlStateManager.popMatrix();
        GlStateManager.cullFace(GlStateManager.CullFace.BACK);
        GlStateManager.disableCull();
    }
}