ModelFluid.java 文件源码

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

项目:CustomWorldGen 作者:
public List<BakedQuad> getQuads(IBlockState state, EnumFacing side, long rand)
{
    BakedFluid model = this;
    if(state instanceof IExtendedBlockState)
    {
        IExtendedBlockState exState = (IExtendedBlockState)state;
        int[] cornerRound = getCorners(Optional.of(exState));
        int flowRound = getFlow(Optional.of(exState));
        long key = flowRound + 1024;
        for(int i = 3; i >= 0; i--)
        {
            key <<= 10;
            key |= cornerRound[i];
        }
        key <<= 1;
        key |= 1;
        model = modelCache.getUnchecked(key);
    }
    if(side == null) return ImmutableList.of();
    return model.faceQuads.get(side);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号