当前位置: 首页>>代码示例>>Java>>正文


Java GlStateManager.enableFog方法代码示例

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


在下文中一共展示了GlStateManager.enableFog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: renderTileEntityAt

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderTileEntityAt(TileEntityEndPortal te, double x, double y, double z, float partialTicks, int destroyStage)
{
    GlStateManager.disableFog();
    TileEntityEndGateway tileentityendgateway = (TileEntityEndGateway)te;

    if (tileentityendgateway.isSpawning() || tileentityendgateway.isCoolingDown())
    {
        GlStateManager.alphaFunc(516, 0.1F);
        this.bindTexture(END_GATEWAY_BEAM_TEXTURE);
        float f = tileentityendgateway.isSpawning() ? tileentityendgateway.getSpawnPercent(partialTicks) : tileentityendgateway.getCooldownPercent(partialTicks);
        double d0 = tileentityendgateway.isSpawning() ? 256.0D - y : 50.0D;
        f = MathHelper.sin(f * (float)Math.PI);
        int i = MathHelper.floor((double)f * d0);
        float[] afloat = EntitySheep.getDyeRgb(tileentityendgateway.isSpawning() ? EnumDyeColor.MAGENTA : EnumDyeColor.PURPLE);
        TileEntityBeaconRenderer.renderBeamSegment(x, y, z, (double)partialTicks, (double)f, (double)tileentityendgateway.getWorld().getTotalWorldTime(), 0, i, afloat, 0.15D, 0.175D);
        TileEntityBeaconRenderer.renderBeamSegment(x, y, z, (double)partialTicks, (double)f, (double)tileentityendgateway.getWorld().getTotalWorldTime(), 0, -i, afloat, 0.15D, 0.175D);
    }

    super.renderTileEntityAt(te, x, y, z, partialTicks, destroyStage);
    GlStateManager.enableFog();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:TileEntityEndGatewayRenderer.java

示例2: renderBeacon

import net.minecraft.client.renderer.GlStateManager; //导入方法依赖的package包/类
public void renderBeacon(double p_188206_1_, double p_188206_3_, double p_188206_5_, double p_188206_7_, double p_188206_9_, List<TileEntityBeacon.BeamSegment> p_188206_11_, double p_188206_12_)
{
    GlStateManager.alphaFunc(516, 0.1F);
    this.bindTexture(TEXTURE_BEACON_BEAM);

    if (p_188206_9_ > 0.0D)
    {
        GlStateManager.disableFog();
        int i = 0;

        for (int j = 0; j < p_188206_11_.size(); ++j)
        {
            TileEntityBeacon.BeamSegment tileentitybeacon$beamsegment = (TileEntityBeacon.BeamSegment)p_188206_11_.get(j);
            renderBeamSegment(p_188206_1_, p_188206_3_, p_188206_5_, p_188206_7_, p_188206_9_, p_188206_12_, i, tileentitybeacon$beamsegment.getHeight(), tileentitybeacon$beamsegment.getColors());
            i += tileentitybeacon$beamsegment.getHeight();
        }

        GlStateManager.enableFog();
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:TileEntityBeaconRenderer.java


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