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


Java VertexLighterFlat类代码示例

本文整理汇总了Java中net.minecraftforge.client.model.pipeline.VertexLighterFlat的典型用法代码示例。如果您正苦于以下问题:Java VertexLighterFlat类的具体用法?Java VertexLighterFlat怎么用?Java VertexLighterFlat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VertexLighterFlat类属于net.minecraftforge.client.model.pipeline包,在下文中一共展示了VertexLighterFlat类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupFlat

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
/** always returns true for convenience */
private VertexLighterFlat setupFlat(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, BufferBuilder buffer)
{
    VertexLighterFlat lighter = this.lighterFlat.get();
    if(buffer != this.lastRendererFlat.get())
    {
        this.lastRendererFlat.set(buffer);
        VertexBufferConsumer newCons = new VertexBufferConsumer(buffer);
        this.wrFlat.set(newCons);
        lighter.setParent(newCons);
    }
    this.wrFlat.get().setOffset(pos);
    lighter.setWorld(world);
    lighter.setState(state);
    lighter.setBlockPos(pos);
    lighter.updateBlockInfo();
    return lighter;
}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:19,代码来源:PerQuadModelRenderer.java

示例2: setupSmooth

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
/** always returns true for convenience */
private VertexLighterFlat setupSmooth(IBlockAccess world, IBakedModel model, IBlockState state, BlockPos pos, BufferBuilder buffer)
{
    VertexLighterFlat lighter = this.lighterSmooth.get();
    if(buffer != this.lastRendererSmooth.get())
    {
        this.lastRendererSmooth.set(buffer);
        VertexBufferConsumer newCons = new VertexBufferConsumer(buffer);
        this.wrSmooth.set(newCons);
        lighter.setParent(newCons);
    }
    this.wrSmooth.get().setOffset(pos);
    lighter.setWorld(world);
    lighter.setState(state);
    lighter.setBlockPos(pos);
    lighter.updateBlockInfo();
    return lighter;
}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:19,代码来源:PerQuadModelRenderer.java

示例3: setupLighter

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
public static VertexLighterFlat setupLighter(VertexBuffer buffer, final IBlockState state, final IBlockAccess access, final BlockPos pos, final IBakedModel model) {
    final boolean renderAO = Minecraft.isAmbientOcclusionEnabled() && state.getLightValue(access, pos) == 0 && (model == null ? false : model.isAmbientOcclusion());
    final VertexLighterFlat lighter = renderAO ? lighterSmooth.get() : lighterFlat.get();
    VertexBufferConsumer consumer = new VertexBufferConsumer(buffer);
    lighter.setParent(consumer);
    consumer.setOffset(pos);
    return lighter;
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:9,代码来源:CoverRender.java

示例4: renderBlockQuads

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
public static boolean renderBlockQuads(final VertexLighterFlat lighter, final IBlockAccess access, final IBlockState state, final List<CustomBakedQuad> quads, final BlockPos pos) {
    if (!quads.isEmpty()) {
        lighter.setWorld(access);
        lighter.setState(state);
        lighter.setBlockPos(pos);
        for (final CustomBakedQuad quad : quads) {
            lighter.updateBlockInfo();
            quad.pipe(lighter);
        }
        return true;
    }
    return false;
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:14,代码来源:CoverRender.java

示例5: renderBakedCoverQuads

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
public static boolean renderBakedCoverQuads(VertexBuffer buffer, IBlockAccess world, BlockPos pos, IBlockState state, int side, AxisAlignedBB bounds, final CoverCutter.ITransformer[] cutType){
	final EnumFacing face = EnumFacing.getFront(side);
       final IBlockAccess coverAccess = new PipeBlockAccessWrapper(world, pos, face);
       final BlockRendererDispatcher dispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
       try {
           state = state.getActualState(coverAccess, pos);
       }
       catch (Exception ex) {}
       final IBakedModel model = dispatcher.getModelForState(state);
       try {
           state = state.getBlock().getExtendedState(state, coverAccess, pos);
       }
       catch (Exception ex2) {}
       final List<BakedQuad> bakedQuads = new LinkedList<BakedQuad>();
       final long posRand = MathHelper.getPositionRandom(pos);
       bakedQuads.addAll(model.getQuads(state, (EnumFacing)null, posRand));
       for (final EnumFacing face2 : EnumFacing.VALUES) {
           bakedQuads.addAll(model.getQuads(state, face2, posRand));
       }
       List<CustomBakedQuad> quads = CustomBakedQuad.fromArray(bakedQuads);
       if (cutType != null) {
           quads = CoverCutter.cut(quads, side, cutType);
       }
       quads = sliceQuads(quads, side, bounds);
	if (!quads.isEmpty()) {
           final VertexLighterFlat lighter = setupLighter(buffer, state, coverAccess, pos, model);
           return renderBlockQuads(lighter, coverAccess, state, quads, pos);
       }
       return false;
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:31,代码来源:CoverRender.java

示例6: AnimationModelBase

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
public AnimationModelBase(ResourceLocation modelLocation, VertexLighterFlat lighter)
{
    this.modelLocation = modelLocation;
    this.lighter = lighter;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:6,代码来源:AnimationModelBase.java

示例7: initialValue

import net.minecraftforge.client.model.pipeline.VertexLighterFlat; //导入依赖的package包/类
@Override
protected VertexLighterFlat initialValue()
{
    return new VertexLighterFlat(colors);
}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:6,代码来源:PerQuadModelRenderer.java


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