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


Java EnumBlockRenderType.MODEL属性代码示例

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


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

示例1: getRenderType

@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
	return EnumBlockRenderType.MODEL;
}
 
开发者ID:PorPit,项目名称:MineCamera,代码行数:4,代码来源:BlockPictureFrameMultiple.java

示例2: getRenderType

/**
 * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
 * LIQUID for vanilla liquids, INVISIBLE to skip all rendering
 */
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:BlockCommandBlock.java

示例3: doRender

/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityFallingBlock entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    if (entity.getBlock() != null)
    {
        IBlockState iblockstate = entity.getBlock();

        if (iblockstate.getRenderType() == EnumBlockRenderType.MODEL)
        {
            World world = entity.getWorldObj();

            if (iblockstate != world.getBlockState(new BlockPos(entity)) && iblockstate.getRenderType() != EnumBlockRenderType.INVISIBLE)
            {
                this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
                GlStateManager.pushMatrix();
                GlStateManager.disableLighting();
                Tessellator tessellator = Tessellator.getInstance();
                VertexBuffer vertexbuffer = tessellator.getBuffer();

                if (this.renderOutlines)
                {
                    GlStateManager.enableColorMaterial();
                    GlStateManager.enableOutlineMode(this.getTeamColor(entity));
                }

                vertexbuffer.begin(7, DefaultVertexFormats.BLOCK);
                BlockPos blockpos = new BlockPos(entity.posX, entity.getEntityBoundingBox().maxY, entity.posZ);
                GlStateManager.translate((float)(x - (double)blockpos.getX() - 0.5D), (float)(y - (double)blockpos.getY()), (float)(z - (double)blockpos.getZ() - 0.5D));
                BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
                blockrendererdispatcher.getBlockModelRenderer().renderModel(world, blockrendererdispatcher.getModelForState(iblockstate), iblockstate, blockpos, vertexbuffer, false, MathHelper.getPositionRandom(entity.getOrigin()));
                tessellator.draw();

                if (this.renderOutlines)
                {
                    GlStateManager.disableOutlineMode();
                    GlStateManager.disableColorMaterial();
                }

                GlStateManager.enableLighting();
                GlStateManager.popMatrix();
                super.doRender(entity, x, y, z, entityYaw, partialTicks);
            }
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:47,代码来源:RenderFallingBlock.java

示例4: getRenderType

@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
    return EnumBlockRenderType.MODEL;
}
 
开发者ID:Randores,项目名称:Randores2,代码行数:4,代码来源:CraftiniumForge.java

示例5: getRenderType

/**
 * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
 * LIQUID for vanilla liquids, INVISIBLE to skip all rendering
 */
@Deprecated
public EnumBlockRenderType getRenderType(IBlockState state)
{
    return EnumBlockRenderType.MODEL;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:Block.java

示例6: getRenderType

@Nonnull
@Override
public EnumBlockRenderType getRenderType(IBlockState state) {
	return EnumBlockRenderType.MODEL;
}
 
开发者ID:MinecraftModDevelopmentMods,项目名称:Got-Wood,代码行数:5,代码来源:BlockTreeTap.java

示例7: getRenderType

public EnumBlockRenderType getRenderType(IBlockState state)
{
	return EnumBlockRenderType.MODEL;
}
 
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:4,代码来源:BlockAnimaConjurer.java


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