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