• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SourceFactor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.SourceFactor的典型用法代码示例。如果您正苦于以下问题:Java SourceFactor类的具体用法?Java SourceFactor怎么用?Java SourceFactor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SourceFactor类属于net.minecraft.client.renderer.GlStateManager包,在下文中一共展示了SourceFactor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: apply2

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void apply2(IBakedModel model, int color) {
	GlStateManager.enableAlpha();
	GlStateManager.enableBlend();
	GlStateManager.depthMask(false);
	GlStateManager.depthFunc(514);
	GlStateManager.disableLighting();
	GlStateManager.blendFunc(SourceFactor.SRC_COLOR, DestFactor.ONE);
	Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("minecraft", "textures/misc/enchanted_item_glint.png"));
	GlStateManager.matrixMode(5890);
	GlStateManager.pushMatrix();
	GlStateManager.scale(8.0F, 8.0F, 8.0F);
	float f = Minecraft.getSystemTime() % 3000L / 3000.0F / 8.0F;
	GlStateManager.translate(f, 0.0F, 0.0F);
	GlStateManager.rotate(-50.0F, 0.0F, 0.0F, 1.0F);
	RenderModel.render(model, color);
	GlStateManager.popMatrix();
	GlStateManager.matrixMode(5888);
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	GlStateManager.enableLighting();
	GlStateManager.depthFunc(515);
	GlStateManager.depthMask(true);
	Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:24,代码来源:GlintEffectRenderer.java


示例2: draw

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
public void draw(IGuiBase gui){
	super.draw(gui);
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE);
	Minecraft.getMinecraft().getTextureManager().bindTexture(rl);
	float lifeCoeff = Math.min(1.0f,(float)lifetime/(float)maxLifetime);
	GlStateManager.color(r, g, b, a*lifeCoeff);
	int currentSize = (int)(this.size * lifeCoeff);
	int shiftedX = gui.getBaseX()+(int)(x+vx*Minecraft.getMinecraft().getRenderPartialTicks());
	int shiftedY = gui.getBaseY()+(int)(y+vy*Minecraft.getMinecraft().getRenderPartialTicks());
	drawTexturedModalRect(shiftedX-currentSize, shiftedY-currentSize, 2*currentSize, 2*currentSize, 0, 0, 32, 32);
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	GlStateManager.disableBlend();
	GlStateManager.color(1f, 1f, 1f, 1f);
}
 
开发者ID:TeamMelodium,项目名称:Melodium,代码行数:17,代码来源:GuiObjectParticle.java


示例3: drawTextGlowing

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void drawTextGlowing(FontRenderer font, String s, int x, int y, int r, int g, int b, int a){
	GuiBase.drawTextRGBA(font, s, x, y, r, g, b, a);
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE);
	GuiBase.drawTextRGBA(font, s, x-1, y, r,g,b, (32*a)/255);
	GuiBase.drawTextRGBA(font, s, x+1, y, r,g,b, (32*a)/255);
	GuiBase.drawTextRGBA(font, s, x, y-1, r,g,b, (32*a)/255);
	GuiBase.drawTextRGBA(font, s, x, y+1, r,g,b, (32*a)/255);
	GuiBase.drawTextRGBA(font, s, x-2, y, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x+2, y, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x, y-2, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x, y+2, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x-1, y+1, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x+1, y-1, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x-1, y-1, r,g,b, (13*a)/255);
	GuiBase.drawTextRGBA(font, s, x+1, y+1, r,g,b, (13*a)/255);
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
}
 
开发者ID:TeamMelodium,项目名称:Melodium,代码行数:18,代码来源:GuiObjectTitle.java


示例4: doRenderLayer

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
public void doRenderLayer(EntitySwet swet, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
       this.slime.setModelAttributes(this.render.getMainModel());
       this.slime.setLivingAnimations(swet, limbSwing, limbSwingAmount, partialTicks);

	GlStateManager.pushMatrix();
       GlStateManager.enableNormalize();
       GlStateManager.enableBlend();
       GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);

	this.manager.renderEngine.bindTexture(this.render.getEntityTexture(swet));
       this.slime.render(swet, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale);

       GlStateManager.popMatrix();
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:17,代码来源:SwetLayer.java


示例5: renderModel

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
protected void renderModel(EntityDragonMinion par1EntityDragonMinion, float par2, float par3, float par4, float par5, float par6, float par7)
{
	bindEntityTexture(par1EntityDragonMinion);
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	mainModel.render(par1EntityDragonMinion, par2, par3, par4, par5, par6, par7);
	GlStateManager.disableBlend();

	if (par1EntityDragonMinion.hurtTime > 0)
	{
		GL11.glDepthFunc(GL11.GL_EQUAL);
		GlStateManager.disableTexture2D();
		GlStateManager.enableBlend();
		GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
		GlStateManager.color(1.0F, 0.0F, 0.0F, 0.5F);
		mainModel.render(par1EntityDragonMinion, par2, par3, par4, par5, par6, par7);
		GlStateManager.enableTexture2D();
		GlStateManager.disableBlend();
		GL11.glDepthFunc(GL11.GL_LEQUAL);
	}
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:23,代码来源:RenderDragonMinion.java


示例6: renderItem

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public void renderItem(int xPos, int yPos, ItemStack stack, int mx, int my)
{
	if(stack == null || stack.isEmpty()) return;

	if(stack.getItemDamage() == OreDictionary.WILDCARD_VALUE)
		stack.setItemDamage(0);

	RenderItem render = Minecraft.getMinecraft().getRenderItem();
	if(mx > xPos && mx < xPos+16 && my > yPos && my < yPos+16)
		tooltipStack = stack;

	GlStateManager.pushMatrix();
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	RenderHelper.enableGUIStandardItemLighting();
	GlStateManager.enableRescaleNormal();
	GlStateManager.enableDepth();
	render.renderItemAndEffectIntoGUI(stack, xPos, yPos);
	render.renderItemOverlayIntoGUI(Minecraft.getMinecraft().fontRenderer, stack, xPos, yPos, null);
	RenderHelper.disableStandardItemLighting();
	GlStateManager.popMatrix();

	GlStateManager.disableLighting();
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:25,代码来源:GuiNecronomiconRitualEntry.java


示例7: renderItem

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public void renderItem(int xPos, int yPos, ItemStack stack, int mx, int my)
{
	if(stack == null || stack.isEmpty()) return;

	if(stack.getItemDamage() == OreDictionary.WILDCARD_VALUE)
		stack.setItemDamage(0);

	RenderItem render = Minecraft.getMinecraft().getRenderItem();
	if(mx > xPos && mx < xPos+16 && my > yPos && my < yPos+16)
		tooltipStack = stack;

	GlStateManager.pushMatrix();
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	RenderHelper.enableGUIStandardItemLighting();
	GlStateManager.enableRescaleNormal();
	GlStateManager.enableBlend();
	render.renderItemAndEffectIntoGUI(stack, xPos, yPos);
	render.renderItemOverlayIntoGUI(Minecraft.getMinecraft().fontRenderer, stack, xPos, yPos, null);
	RenderHelper.disableStandardItemLighting();
	GlStateManager.popMatrix();

	GlStateManager.disableLighting();
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:25,代码来源:GuiNecronomiconMachines.java


示例8: render

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public void render(ItemStack stack, MapData data, boolean inFrame) {
    WirelessMapNodeStorage mapstorage = RedstoneEtherAddons.client().getMapNodes();

    if (stack == null || stack.getItem() != ModItems.itemWirelessMap) {
        return;
    }

    ClientMapInfo mapinfo = RedstoneEtherAddons.client().getMPMapInfo((short) stack.getItemDamage());
    if (mapinfo == null) {
        return;
    }

    CCRenderState ccrs = CCRenderState.instance();
    GlStateManager.disableTexture2D();
    GlStateManager.disableDepth();
    GlStateManager.enableBlend();
    GlStateManager.blendFunc(SourceFactor.ONE, DestFactor.ONE_MINUS_SRC_ALPHA);
    float light = 1;

    int xCenter = mapinfo.xCenter;
    int zCenter = mapinfo.zCenter;
    int scale = mapinfo.scale;

    ccrs.startDrawing(0x07, DefaultVertexFormats.POSITION_COLOR);
    renderPass(ccrs, xCenter, zCenter, scale, mapstorage, 0.75F, 1F, light * 0.5F);
    renderPass(ccrs, xCenter, zCenter, scale, mapstorage, 0.6F, 1F, light);
    ccrs.draw();

    GlStateManager.enableTexture2D();
    GlStateManager.enableDepth();
    GlStateManager.disableBlend();
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:33,代码来源:WirelessMapRenderer.java


示例9: doRender

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
public void doRender(EntityHorse entity, double x, double y, double z, float entityYaw, float partialTicks)
{
	GlStateManager.pushMatrix();
	GlStateManager.enableAlpha();
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE);

	GlStateManager.color(1F, 1F, 1F, 0.5F);
	super.doRender(entity, x, y, z, entityYaw, partialTicks);
	GlStateManager.popMatrix();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
}
 
开发者ID:TeamMelodium,项目名称:Melodium,代码行数:14,代码来源:RenderGhostHorse.java


示例10: drawGradientRect

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void drawGradientRect(double left, double top, double zLevel, double right, double bottom, int startColor, int endColor)
{
    float f = (startColor >> 24 & 255) / 255.0F;
    float f1 = (startColor >> 16 & 255) / 255.0F;
    float f2 = (startColor >> 8 & 255) / 255.0F;
    float f3 = (startColor & 255) / 255.0F;
    float f4 = (endColor >> 24 & 255) / 255.0F;
    float f5 = (endColor >> 16 & 255) / 255.0F;
    float f6 = (endColor >> 8 & 255) / 255.0F;
    float f7 = (endColor & 255) / 255.0F;
    GlStateManager.disableTexture2D();
    GlStateManager.enableBlend();
    GlStateManager.disableAlpha();
    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
    GlStateManager.shadeModel(7425);
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
    vertexbuffer.pos(right, top, zLevel).color(f1, f2, f3, f).endVertex();
    vertexbuffer.pos(left, top, zLevel).color(f1, f2, f3, f).endVertex();
    vertexbuffer.pos(left, bottom, zLevel).color(f5, f6, f7, f4).endVertex();
    vertexbuffer.pos(right, bottom, zLevel).color(f5, f6, f7, f4).endVertex();
    tessellator.draw();
    GlStateManager.shadeModel(7424);
    GlStateManager.disableBlend();
    GlStateManager.enableAlpha();
    GlStateManager.enableTexture2D();
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:29,代码来源:RenderUtil.java


示例11: renderPoison

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void renderPoison(Minecraft mc)
{
	PlayerAether playerAether = PlayerAether.get(mc.thePlayer);

	if(playerAether.isPoisoned())
	{
        ScaledResolution scaledresolution = new ScaledResolution(mc);
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer renderer = tessellator.getBuffer();

		float alpha = getPoisonAlpha((float)(playerAether.poisonInstance().poisonTime % 50) / 50F);

        int width = scaledresolution.getScaledWidth();
        int height = scaledresolution.getScaledHeight();

        GlStateManager.pushMatrix();
        GlStateManager.enableBlend();
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
        GlStateManager.disableAlpha();

        mc.renderEngine.bindTexture(TEXTURE_POISON_VIGNETTE);

		renderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        renderer.pos(0.0D, (double)height, -90.0D).tex(0.0D, 1.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        renderer.pos((double)width, (double)height, -90.0D).tex(1.0D, 1.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        renderer.pos((double)width, 0.0D, -90.0D).tex(1.0D, 0.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        renderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        tessellator.draw();

        GlStateManager.depthMask(true);
        GlStateManager.enableDepth();
        GlStateManager.enableAlpha();
        GlStateManager.disableBlend();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.popMatrix();
	}
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:40,代码来源:AetherOverlay.java


示例12: renderCure

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void renderCure(Minecraft mc)
{
	PlayerAether playerAether = PlayerAether.get(mc.thePlayer);

	if(playerAether.isCured())
	{
        ScaledResolution scaledresolution = new ScaledResolution(mc);
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer renderer = tessellator.getBuffer();

		float alpha = 0.5F;
        int width = scaledresolution.getScaledWidth();
        int height = scaledresolution.getScaledHeight();

        GlStateManager.pushMatrix();
        GlStateManager.enableBlend();
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
        GlStateManager.disableAlpha();

        mc.renderEngine.bindTexture(TEXTURE_CURE_VIGNETTE);

		renderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
        renderer.pos(0.0D, (double)height, -90.0D).tex(0.0D, 1.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        renderer.pos((double)width, (double)height, -90.0D).tex(1.0D, 1.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        renderer.pos((double)width, 0.0D, -90.0D).tex(1.0D, 0.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        renderer.pos(0.0D, 0.0D, -90.0D).tex(0.0D, 0.0D).color(0.5F, 0.5F, 0.5F, alpha).endVertex();
        tessellator.draw();

        GlStateManager.depthMask(true);
        GlStateManager.enableDepth();
        GlStateManager.enableAlpha();
        GlStateManager.disableBlend();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.popMatrix();
	}
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:39,代码来源:AetherOverlay.java


示例13: renderIronBubble

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void renderIronBubble(Minecraft mc)
{
	ScaledResolution scaledresolution = new ScaledResolution(mc);

	int width = scaledresolution.getScaledWidth();
	int height = scaledresolution.getScaledHeight();

       GlStateManager.pushMatrix();
       GlStateManager.enableBlend();
       GlStateManager.disableDepth();
       GlStateManager.depthMask(false);
       GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
       GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
       GlStateManager.disableAlpha();

	mc.renderEngine.bindTexture(Gui.ICONS);

	int bubbleAmount = PlayerAether.get(mc.thePlayer).getAccessoryCount(ItemsAether.iron_bubble);

	if (mc.playerController.shouldDrawHUD() && mc.thePlayer.isInWater() && mc.thePlayer.isInsideOfMaterial(Material.WATER))
	{
		for (int i = 0; i < bubbleAmount; ++i)
		{
			drawTexturedModalRect((width / 2 - 8 * i) + 81, height - 49, 16, 18, 9, 9);
		}
	}

       GlStateManager.depthMask(true);
       GlStateManager.enableDepth();
       GlStateManager.enableAlpha();
       GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
       GlStateManager.popMatrix();
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:34,代码来源:AetherOverlay.java


示例14: renderCooldown

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void renderCooldown(Minecraft mc)
{
	PlayerAether playerInfo = PlayerAether.get(mc.thePlayer);

	if (playerInfo.getCooldown() != 0)
	{
		ScaledResolution scaledresolution = new ScaledResolution(mc);

		int cooldownRemaining = (int) ((float) (playerInfo.getCooldown()) / (float) (playerInfo.getCooldownMax()) * 128F);
		int width = scaledresolution.getScaledWidth();

		mc.fontRendererObj.drawStringWithShadow(playerInfo.getCooldownName() + " Cooldown", (width / 2) - (mc.fontRendererObj.getStringWidth(playerInfo.getCooldownName() + " Cooldown") / 2), 32, 0xffffffff);

        GlStateManager.pushMatrix();

        GlStateManager.enableBlend();
        GlStateManager.disableDepth();
        GlStateManager.depthMask(false);
        GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.disableAlpha();

		mc.renderEngine.bindTexture(TEXTURE_COOLDOWN_BAR);

		drawTexturedModalRect(width / 2 - 64, 42, 0, 8, 128, 8);

		drawTexturedModalRect(width / 2 - 64, 42, 0, 0, cooldownRemaining, 8);

        GlStateManager.depthMask(true);
        GlStateManager.enableDepth();
        GlStateManager.enableAlpha();
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

        GlStateManager.popMatrix();
	}
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:37,代码来源:AetherOverlay.java


示例15: renderAetherPortal

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
public static void renderAetherPortal(float timeInPortal, ScaledResolution scaledRes)
{
    if (timeInPortal < 1.0F)
    {
        timeInPortal = timeInPortal * timeInPortal;
        timeInPortal = timeInPortal * timeInPortal;
        timeInPortal = timeInPortal * 0.8F + 0.2F;
    }

    GlStateManager.disableAlpha();
    GlStateManager.disableDepth();
    GlStateManager.depthMask(false);
    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
    GlStateManager.color(1.0F, 1.0F, 1.0F, timeInPortal);
    Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    TextureAtlasSprite textureatlassprite = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture(BlocksAether.aether_portal.getDefaultState());
    float f = textureatlassprite.getMinU();
    float f1 = textureatlassprite.getMinV();
    float f2 = textureatlassprite.getMaxU();
    float f3 = textureatlassprite.getMaxV();
    Tessellator tessellator = Tessellator.getInstance();
    VertexBuffer vertexbuffer = tessellator.getBuffer();
    vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX);
    vertexbuffer.pos(0.0D, (double)scaledRes.getScaledHeight(), -90.0D).tex((double)f, (double)f3).endVertex();
    vertexbuffer.pos((double)scaledRes.getScaledWidth(), (double)scaledRes.getScaledHeight(), -90.0D).tex((double)f2, (double)f3).endVertex();
    vertexbuffer.pos((double)scaledRes.getScaledWidth(), 0.0D, -90.0D).tex((double)f2, (double)f1).endVertex();
    vertexbuffer.pos(0.0D, 0.0D, -90.0D).tex((double)f, (double)f1).endVertex();
    tessellator.draw();
    GlStateManager.depthMask(true);
    GlStateManager.enableDepth();
    GlStateManager.enableAlpha();
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:34,代码来源:AetherOverlay.java


示例16: renderModel

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
protected void renderModel(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor)
{
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	super.renderModel(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
	GlStateManager.disableBlend();
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:9,代码来源:RenderShadowMonster.java


示例17: renderModel

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
protected void renderModel(EntitySacthoth entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor)
{
	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	super.renderModel(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
	GlStateManager.disableBlend();
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:9,代码来源:RenderSacthoth.java


示例18: renderModel

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
/**
 * Renders the dragon model. Called by renderModel.
 */
@Override
protected void renderModel(EntityDragonBoss par1EntityDragonBoss, float par2, float par3, float par4, float par5, float par6, float par7)
{
	if (par1EntityDragonBoss.deathTicks > 0)
	{
		float f6 = par1EntityDragonBoss.deathTicks / 200.0F;
		GL11.glDepthFunc(GL11.GL_LEQUAL);
		GlStateManager.enableAlpha();
		GL11.glAlphaFunc(GL11.GL_GREATER, f6);
		bindTexture(field_110842_f);
		mainModel.render(par1EntityDragonBoss, par2, par3, par4, par5, par6, par7);
		GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
		GL11.glDepthFunc(GL11.GL_EQUAL);
	}

	bindEntityTexture(par1EntityDragonBoss);
	mainModel.render(par1EntityDragonBoss, par2, par3, par4, par5, par6, par7);

	if (par1EntityDragonBoss.hurtTime > 0)
	{
		GL11.glDepthFunc(GL11.GL_EQUAL);
		GlStateManager.disableTexture2D();
		GlStateManager.enableBlend();
		GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
		GlStateManager.color(1.0F, 0.0F, 0.0F, 0.5F);
		mainModel.render(par1EntityDragonBoss, par2, par3, par4, par5, par6, par7);
		GlStateManager.enableTexture2D();
		GlStateManager.disableBlend();
		GL11.glDepthFunc(GL11.GL_LEQUAL);
	}
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:35,代码来源:RenderDragonBoss.java


示例19: renderModel

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
protected void renderModel(EntityLesserShoggoth entitylivingbaseIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor)
{
	if(entitylivingbaseIn.getShoggothType() < 4){
		super.renderModel(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
		return;
	}

	GlStateManager.enableBlend();
	GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
	super.renderModel(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);
	GlStateManager.disableBlend();
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:14,代码来源:RenderLesserShoggoth.java


示例20: renderHelmetOverlay

import net.minecraft.client.renderer.GlStateManager.SourceFactor; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks){
	final ResourceLocation coraliumBlur = new ResourceLocation("abyssalcraft:textures/misc/coraliumblur.png");


	if(Minecraft.getMinecraft().gameSettings.thirdPersonView == 0 && stack != null && stack.getItem() == ACItems.depths_helmet) {

		GlStateManager.disableDepth();
		GlStateManager.depthMask(false);
		GlStateManager.enableBlend();
		GlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);
		GlStateManager.color(1.0F, 1.0F, 1.0F, (float)ACConfig.depthsHelmetOverlayOpacity);

		Minecraft.getMinecraft().renderEngine.bindTexture(coraliumBlur);

		Tessellator t = Tessellator.getInstance();
		BufferBuilder wr = t.getBuffer();

		wr.begin(7, DefaultVertexFormats.POSITION_TEX);
		wr.pos(0.0D, resolution.getScaledHeight(), 90.0D).tex(0.0D, 1.0D).endVertex();;
		wr.pos(resolution.getScaledWidth(), resolution.getScaledHeight(), 90.0D).tex(1.0D, 1.0D).endVertex();;
		wr.pos(resolution.getScaledWidth(), 0.0D, 90.0D).tex(1.0D, 0.0D).endVertex();;
		wr.pos(0.0D, 0.0D, 90.0D).tex(0.0D, 0.0D).endVertex();;
		t.draw();

		GlStateManager.depthMask(true);
		GlStateManager.enableDepth();
		GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
	}
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:32,代码来源:ItemDepthsArmor.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NodesStatsResponse类代码示例发布时间:2022-05-22
下一篇:
Java TileEntityDaylightDetector类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap