EnderTankItemRender.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:EnderStorage 作者:
@Override
public void renderItem(ItemStack item, TransformType transformType) {
    GlStateManager.pushMatrix();
    CCRenderState ccrs = CCRenderState.instance();
    ccrs.reset();
    ccrs.pullLightmap();
    Frequency frequency = Frequency.readFromStack(item);
    FluidStack fluidStack = TankSynchroniser.getClientLiquid(frequency);
    RenderTileEnderTank.renderTank(ccrs, 2, 0F, frequency, 0, 0, 0, 0);
    if (fluidStack != null && RenderUtils.shouldRenderFluid(fluidStack)) {
        RenderTileEnderTank.renderLiquid(fluidStack, 0, 0, 0);
    }
    //Fixes issues with inventory rendering.
    //The Portal renderer modifies blend and disables it.
    //Vanillas inventory relies on the fact that items don't modify gl so it never bothers to set it again.
    GlStateManager.enableBlend();
    GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
    GlStateManager.popMatrix();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号