本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.resetColor方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.resetColor方法的具体用法?Java GlStateManager.resetColor怎么用?Java GlStateManager.resetColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.GlStateManager
的用法示例。
在下文中一共展示了GlStateManager.resetColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderGlList
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderGlList()
{
Entity entity = this.mc.getRenderViewEntity();
double d0 = entity.prevPosX + (entity.posX - entity.prevPosX) * (double)this.partialTicks;
double d1 = entity.prevPosY + (entity.posY - entity.prevPosY) * (double)this.partialTicks;
double d2 = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double)this.partialTicks;
double d3 = (double)((float)(this.cloudTickCounter - this.cloudTickCounterUpdate) + this.partialTicks);
float f = (float)(d0 - this.cloudPlayerX + d3 * 0.03D);
float f1 = (float)(d1 - this.cloudPlayerY);
float f2 = (float)(d2 - this.cloudPlayerZ);
GlStateManager.pushMatrix();
if (this.renderFancy)
{
GlStateManager.translate(-f / 12.0F, -f1, -f2 / 12.0F);
}
else
{
GlStateManager.translate(-f, -f1, -f2);
}
GlStateManager.callList(this.glListClouds);
GlStateManager.popMatrix();
GlStateManager.resetColor();
}
示例2: box
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void box(double x, double y, double z, double x2, double y2, double z2, float red, float green,
float blue, float alpha) {
x -= Minecraft.getMinecraft().getRenderManager().renderPosX;
y -= Minecraft.getMinecraft().getRenderManager().renderPosY;
z -= Minecraft.getMinecraft().getRenderManager().renderPosZ;
x2 -= Minecraft.getMinecraft().getRenderManager().renderPosX;
y2 -= Minecraft.getMinecraft().getRenderManager().renderPosY;
z2 -= Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(2.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glDepthMask(false);
GL11.glColor4f(red, green, blue, alpha);
drawColorBox(new AxisAlignedBB(x, y, z, x2, y2, z2), red, green, blue, alpha);
GL11.glColor4d(0.0D, 0.0D, 0.0D, 0.5D);
drawSelectionBoundingBox(new AxisAlignedBB(x, y, z, x2, y2, z2));
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
GlStateManager.resetColor();
}
示例3: blockESPBox
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void blockESPBox(IBlockPos IBlockPos, float red, float green, float blue) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
double x = IBlockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = IBlockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = IBlockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(1.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glColor4f(red, green, blue, 0.15F);
drawColorBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D), 0.0F, 1.0F, 0.0F, 0.15F);
GL11.glColor4d(0.0D, 0.0D, 0.0D, 0.5D);
drawSelectionBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D));
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
GlStateManager.resetColor();
}
示例4: framelessBlockESP
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void framelessBlockESP(IBlockPos IBlockPos, float red, float green, float blue) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
double x = IBlockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = IBlockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = IBlockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(2.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glColor4f(red, green, blue, 0.15F);
drawColorBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D), red, green, blue, 0.15F);
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
GlStateManager.resetColor();
}
示例5: emptyBlockESPBox
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void emptyBlockESPBox(IBlockPos IBlockPos) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
double x = IBlockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = IBlockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = IBlockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(2.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glColor4d(0.0D, 0.0D, 0.0D, 0.5D);
drawSelectionBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D));
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
}
示例6: nukerBox
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void nukerBox(IBlockPos IBlockPos, float damage) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
double x = IBlockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = IBlockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = IBlockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(1.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glColor4f(damage, 1.0F - damage, 0.0F, 0.15F);
drawColorBox(
new AxisAlignedBB(x + 0.5D - damage / 2.0F, y + 0.5D - damage / 2.0F, z + 0.5D - damage / 2.0F,
x + 0.5D + damage / 2.0F, y + 0.5D + damage / 2.0F, z + 0.5D + damage / 2.0F),
damage, 1.0F - damage, 0.0F, 0.15F);
GL11.glColor4d(0.0D, 0.0D, 0.0D, 0.5D);
drawSelectionBoundingBox(
new AxisAlignedBB(x + 0.5D - damage / 2.0F, y + 0.5D - damage / 2.0F, z + 0.5D - damage / 2.0F,
x + 0.5D + damage / 2.0F, y + 0.5D + damage / 2.0F, z + 0.5D + damage / 2.0F));
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
}
示例7: searchBox
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void searchBox(IBlockPos IBlockPos) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
double x = IBlockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = IBlockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = IBlockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(1.0F);
float sinus = 1.0F - MathHelper
.abs(MathHelper.sin(Minecraft.getSystemTime() % 10000L / 10000.0F * 3.1415927F * 4.0F) * 1.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glColor4f(1.0F - sinus, sinus, 0.0F, 0.15F);
drawColorBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D), 1.0F - sinus, sinus, 0.0F, 0.15F);
GL11.glColor4d(0.0D, 0.0D, 0.0D, 0.5D);
drawSelectionBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D));
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
}
示例8: renderGlList
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderGlList()
{
Entity entity = this.mc.getRenderViewEntity();
double d0 = entity.prevPosX + (entity.posX - entity.prevPosX) * (double)this.partialTicks;
double d1 = entity.prevPosY + (entity.posY - entity.prevPosY) * (double)this.partialTicks;
double d2 = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double)this.partialTicks;
double d3 = (double)((float)(this.cloudTickCounter - this.updateCloudTickCounter) + this.partialTicks);
float f = (float)(d0 - this.updatePlayerX + d3 * 0.03D);
float f1 = (float)(d1 - this.updatePlayerY);
float f2 = (float)(d2 - this.updatePlayerZ);
GlStateManager.pushMatrix();
if (this.renderFancy)
{
GlStateManager.translate(-f / 12.0F, -f1, -f2 / 12.0F);
}
else
{
GlStateManager.translate(-f, -f1, -f2);
}
GlStateManager.callList(this.glListClouds);
GlStateManager.popMatrix();
GlStateManager.resetColor();
}
示例9: endUpdateGlList
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void endUpdateGlList()
{
GL11.glEndList();
this.cloudTickCounterUpdate = this.cloudTickCounter;
this.cloudPlayerX = this.mc.getRenderViewEntity().prevPosX;
this.cloudPlayerY = this.mc.getRenderViewEntity().prevPosY;
this.cloudPlayerZ = this.mc.getRenderViewEntity().prevPosZ;
this.updated = true;
GlStateManager.resetColor();
}
示例10: entityESPBox
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void entityESPBox(Entity entity, int mode) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(2.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
if (mode == 0) {
GL11.glColor4d(1.0F - Minecraft.getMinecraft().player.getDistanceToEntity(entity) / 40.0F,
Minecraft.getMinecraft().player.getDistanceToEntity(entity) / 40.0F, 0.0D, 0.5D);
} else if (mode == 1) {
GL11.glColor4d(0.0D, 0.0D, 1.0D, 0.5D);
} else if (mode == 2) {
GL11.glColor4d(1.0D, 1.0D, 0.0D, 0.5D);
} else if (mode == 3) {
GL11.glColor4d(1.0D, 0.0D, 0.0D, 0.5D);
} else if (mode == 4) {
GL11.glColor4d(0.0D, 1.0D, 0.0D, 0.5D);
}
RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
drawSelectionBoundingBox(new AxisAlignedBB(
entity.boundingBox.minX - 0.05D - entity.posX + (entity.posX - renderManager.renderPosX),
entity.boundingBox.minY - entity.posY + (entity.posY - renderManager.renderPosY),
entity.boundingBox.minZ - 0.05D - entity.posZ + (entity.posZ - renderManager.renderPosZ),
entity.boundingBox.maxX + 0.05D - entity.posX + (entity.posX - renderManager.renderPosX),
entity.boundingBox.maxY + 0.1D - entity.posY + (entity.posY - renderManager.renderPosY),
entity.boundingBox.maxZ + 0.05D - entity.posZ + (entity.posZ - renderManager.renderPosZ)));
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
}
示例11: tracerLine
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void tracerLine(Entity entity, int mode) {
RenderUtils.fixDarkLight();
GlStateManager.resetColor();
double x = entity.posX - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = entity.posY + entity.height / 2.0F - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = entity.posZ - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(2.0F);
GL11.glDisable(3553);
GL11.glDisable(2929);
GL11.glDepthMask(false);
if (mode == 0) {
GL11.glColor4d(1.0F - Minecraft.getMinecraft().player.getDistanceToEntity(entity) / 40.0F,
Minecraft.getMinecraft().player.getDistanceToEntity(entity) / 40.0F, 0.0D, 0.5D);
} else if (mode == 1) {
GL11.glColor4d(0.0D, 0.0D, 1.0D, 0.5D);
} else if (mode == 2) {
GL11.glColor4d(1.0D, 1.0D, 0.0D, 0.5D);
} else if (mode == 3) {
GL11.glColor4d(1.0D, 0.0D, 0.0D, 0.5D);
} else if (mode == 4) {
GL11.glColor4d(0.0D, 1.0D, 0.0D, 0.5D);
}
Vec3d eyes = new Vec3d(0.0D, 0.0D, 1.0D)
.rotatePitch(-(float) Math.toRadians(Minecraft.getMinecraft().player.rotationPitch))
.rotateYaw(-(float) Math.toRadians(Minecraft.getMinecraft().player.rotationYaw));
GL11.glBegin(1);
GL11.glVertex3d(eyes.xCoord, Minecraft.getMinecraft().player.getEyeHeight() + eyes.yCoord, eyes.zCoord);
GL11.glVertex3d(x, y, z);
GL11.glEnd();
GL11.glEnable(3553);
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
}
示例12: endUpdateGlList
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void endUpdateGlList()
{
GL11.glEndList();
this.updateRenderFancy = this.renderFancy;
this.updateCloudTickCounter = this.cloudTickCounter;
this.updateCloudColor = this.cloudColor;
this.updatePlayerX = this.mc.getRenderViewEntity().prevPosX;
this.updatePlayerY = this.mc.getRenderViewEntity().prevPosY;
this.updatePlayerZ = this.mc.getRenderViewEntity().prevPosZ;
this.updated = true;
GlStateManager.resetColor();
}
示例13: postDraw
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void postDraw(EnumUsage attrType, VertexFormat format, int element, int stride, ByteBuffer buffer)
{
VertexFormatElement attr = format.getElement(element);
switch(attrType)
{
case POSITION:
glDisableClientState(GL_VERTEX_ARRAY);
break;
case NORMAL:
glDisableClientState(GL_NORMAL_ARRAY);
break;
case COLOR:
glDisableClientState(GL_COLOR_ARRAY);
// is this really needed?
GlStateManager.resetColor();
break;
case UV:
OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit + attr.getIndex());
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
OpenGlHelper.setClientActiveTexture(OpenGlHelper.defaultTexUnit);
break;
case PADDING:
break;
case GENERIC:
glDisableVertexAttribArray(attr.getIndex());
default:
FMLLog.severe("Unimplemented vanilla attribute upload: %s", attrType.getDisplayName());
}
}
示例14: resetColor
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void resetColor() {
GlStateManager.resetColor();
}
示例15: drawScreen
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks){
super.drawScreen(mouseX, mouseY, partialTicks);
ScaledResolution res = new ScaledResolution(mc);
int width = res.getScaledWidth();
int height = res.getScaledHeight();
int xPos = 0;
int yPos = 0;
switch(ConfigValues.XALIGNMENT){
case LEFT:
xPos = ConfigValues.COMPASSX;
break;
case RIGHT:
xPos = width-ConfigValues.COMPASSX;
break;
case CENTER:
xPos = width/2+ConfigValues.COMPASSX;
}
switch(ConfigValues.YALIGNMENT){
case TOP:
yPos = ConfigValues.COMPASSY;
break;
case BOTTOM:
yPos = height-ConfigValues.COMPASSY;
break;
case CENTER:
yPos = height/2+ConfigValues.COMPASSY;
}
glEnable(32826);
GlStateManager.pushMatrix();
RenderHelper.enableGUIStandardItemLighting();
mc.getRenderItem().renderItemIntoGUI(new ItemStack(UHCCompass.uhccompass), xPos, yPos);
if(mouseDown){
GlStateManager.enableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.5F);
Minecraft.getMinecraft().getTextureManager().bindTexture(compass_texture);
drawModalRectWithCustomSizedTexture(mouseX-mouseOffset, mouseY-mouseOffset, 0, 0, 16, 16, 16, 16);
GlStateManager.resetColor();
GlStateManager.disableBlend();
}
RenderHelper.disableStandardItemLighting();
glDisable(GL12.GL_RESCALE_NORMAL);
glEnable(32826);
GlStateManager.popMatrix();
}