本文整理汇总了Java中net.minecraft.client.renderer.GlStateManager.disablePolygonOffset方法的典型用法代码示例。如果您正苦于以下问题:Java GlStateManager.disablePolygonOffset方法的具体用法?Java GlStateManager.disablePolygonOffset怎么用?Java GlStateManager.disablePolygonOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.GlStateManager
的用法示例。
在下文中一共展示了GlStateManager.disablePolygonOffset方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: postRenderDamagedBlocks
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
private void postRenderDamagedBlocks() {
GlStateManager.disableAlpha();
GlStateManager.doPolygonOffset(0.0F, 0.0F);
GlStateManager.disablePolygonOffset();
GlStateManager.enableAlpha();
GlStateManager.depthMask(true);
GlStateManager.popMatrix();
}
示例2: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks)
{
if (!entity.isUser() || this.renderManager.renderViewEntity == entity)
{
double d0 = y;
if (entity.isSneaking() && !(entity instanceof EntityPlayerSP))
{
d0 = y - 0.125D;
}
this.setModelVisibilities(entity);
GlStateManager.enableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
if (Hacks.findMod(Chams.class).isEnabled()) {
GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
GlStateManager.enablePolygonOffset();
GlStateManager.doPolygonOffset(1.0F, -1000000);
super.doRender(entity, x, d0, z, entityYaw, partialTicks);
GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
GlStateManager.doPolygonOffset(1.0F, 1000000);
GlStateManager.disablePolygonOffset();
}else{
super.doRender(entity, x, d0, z, entityYaw, partialTicks);
}
GlStateManager.disableBlendProfile(GlStateManager.Profile.PLAYER_SKIN);
}
}
示例3: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityChatBombPrimed 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);
if ((float)entity.getFuse() - partialTicks + 1.0F < 10.0F)
{
float f = 1.0F - ((float)entity.getFuse() - 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);
}
float f2 = (1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity);
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), entity.getBrightness(partialTicks));
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), 1.0F);
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
else if (entity.getFuse() / 5 % 2 == 0)
{
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
GlStateManager.enablePolygonOffset();
blockrendererdispatcher.renderBlockBrightness(ModBlocks.blockChatBomb.getDefaultState(), 1.0F);
GlStateManager.doPolygonOffset(0.0F, 0.0F);
GlStateManager.disablePolygonOffset();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
}
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例4: onPostRenderLiving
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
@SubscribeEvent
public void onPostRenderLiving(RenderLivingEvent.Post event) {
GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
GlStateManager.doPolygonOffset(1.0F, 1000000);
GlStateManager.disablePolygonOffset();
}
示例5: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* 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(EntityTNTPrimed 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);
if ((float)entity.fuse - partialTicks + 1.0F < 10.0F)
{
float f = 1.0F - ((float)entity.fuse - 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);
}
float f2 = (1.0F - ((float)entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), entity.getBrightness(partialTicks));
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (entity.fuse / 5 % 2 == 0)
{
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 772);
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
GlStateManager.enablePolygonOffset();
blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F);
GlStateManager.doPolygonOffset(0.0F, 0.0F);
GlStateManager.disablePolygonOffset();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
}
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例6: disablePolygonOffset
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public static void disablePolygonOffset() {
GlStateManager.disablePolygonOffset();
}
示例7: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityTNTPrimed 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);
if ((float)entity.getFuse() - partialTicks + 1.0F < 10.0F)
{
float f = 1.0F - ((float)entity.getFuse() - 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);
}
float f2 = (1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity);
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), entity.getBrightness(partialTicks));
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
else if (entity.getFuse() / 5 % 2 == 0)
{
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
GlStateManager.enablePolygonOffset();
blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
GlStateManager.doPolygonOffset(0.0F, 0.0F);
GlStateManager.disablePolygonOffset();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
}
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
示例8: doRender
import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityTNTPrimed 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);
if ((float)entity.getFuse() - partialTicks + 1.0F < 10.0F)
{
float f = 1.0F - ((float)entity.getFuse() - 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);
}
float f2 = (1.0F - ((float)entity.getFuse() - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity);
GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), entity.getBrightness(partialTicks));
GlStateManager.translate(0.0F, 0.0F, 1.0F);
if (this.renderOutlines)
{
GlStateManager.enableColorMaterial();
GlStateManager.enableOutlineMode(this.getTeamColor(entity));
blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
GlStateManager.disableOutlineMode();
GlStateManager.disableColorMaterial();
}
else if (entity.getFuse() / 5 % 2 == 0)
{
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.DST_ALPHA);
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
GlStateManager.enablePolygonOffset();
blockrendererdispatcher.renderBlockBrightness(Blocks.TNT.getDefaultState(), 1.0F);
GlStateManager.doPolygonOffset(0.0F, 0.0F);
GlStateManager.disablePolygonOffset();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.disableBlend();
GlStateManager.enableLighting();
GlStateManager.enableTexture2D();
}
GlStateManager.popMatrix();
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}