當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。