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


Java BlockLeavesBase类代码示例

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


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

示例1: renderModel

import net.minecraft.block.BlockLeavesBase; //导入依赖的package包/类
public boolean renderModel(IBlockAccess blockAccessIn, IBakedModel modelIn, IBlockState blockStateIn, BlockPos blockPosIn, WorldRenderer worldRendererIn, boolean checkSides)
{
    boolean flag = Minecraft.isAmbientOcclusionEnabled() && blockStateIn.getBlock().getLightValue() == 0 && modelIn.isAmbientOcclusion();

    try
    {
        Block block = blockStateIn.getBlock();

        if (Config.isTreesSmart() && blockStateIn.getBlock() instanceof BlockLeavesBase)
        {
            modelIn = SmartLeaves.getLeavesModel(modelIn);
        }

        return flag ? this.renderModelAmbientOcclusion(blockAccessIn, modelIn, block, blockStateIn, blockPosIn, worldRendererIn, checkSides) : this.renderModelStandard(blockAccessIn, modelIn, block, blockStateIn, blockPosIn, worldRendererIn, checkSides);
    }
    catch (Throwable throwable)
    {
        CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Tesselating block model");
        CrashReportCategory crashreportcategory = crashreport.makeCategory("Block model being tesselated");
        CrashReportCategory.addBlockInfo(crashreportcategory, blockPosIn, blockStateIn);
        crashreportcategory.addCrashSection("Using AO", Boolean.valueOf(flag));
        throw new ReportedException(crashreport);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:BlockModelRenderer.java

示例2: init

import net.minecraft.block.BlockLeavesBase; //导入依赖的package包/类
private void init () {
    registerCompostMaterial(new ItemStack(Blocks.melon_block), defaultMaterial);
    registerCompostMaterial(new ItemStack(Blocks.pumpkin), defaultMaterial);
    registerCompostMaterial(new ItemStack(Blocks.hay_block), defaultMaterial);
    registerCompostMaterial(new ItemStack(Items.string), new StandardCompostMaterial(100, 0.0625f));
    registerCompostMaterial(new ItemStack(Items.wheat), new StandardCompostMaterial(100, 0.125f));
    registerCompostMaterial(new ItemStack(Items.reeds), new StandardCompostMaterial(150, 0.125f));
    registerCompostMaterial(new ItemStack(Items.feather), new StandardCompostMaterial(50, 0.0625f));
    registerCompostMaterial(new ItemStack(Items.rotten_flesh), new StandardCompostMaterial(150, 0.125f));
    registerCompostMaterial(new ItemStack(Items.leather), new StandardCompostMaterial(150, 0.125f));

    registerCompostMaterial("treeWood", new StandardCompostMaterial(300, 0.25f));
    registerCompostMaterial("logWood", new StandardCompostMaterial(300, 0.25f));
    registerCompostMaterial("treeLeaves", defaultMaterial);
    registerCompostMaterial("treeSapling", defaultMaterial);
    registerCompostMaterial("stickWood", defaultMaterial);

    registerCompostMaterial(IPlantable.class, defaultMaterial);
    registerCompostMaterial(IGrowable.class, defaultMaterial);
    registerCompostMaterial(BlockLeavesBase.class, defaultMaterial);
    registerCompostMaterial(BlockVine.class, defaultMaterial);
    registerCompostMaterial(ItemFood.class, defaultMaterial);
}
 
开发者ID:jaquadro,项目名称:GardenCollection,代码行数:24,代码来源:CompostRegistry.java

示例3: isNeighborHardConnectionY

import net.minecraft.block.BlockLeavesBase; //导入依赖的package包/类
private boolean isNeighborHardConnectionY (IBlockAccess world, int x, int y, int z, Block block, ForgeDirection side) {
    if (isNeighborHardConnection(world, x, y, z, block, side))
        return true;

    return block instanceof BlockLeavesBase
        || block == ModBlocks.thinLogFence;
}
 
开发者ID:jaquadro,项目名称:GardenCollection,代码行数:8,代码来源:BlockThinLog.java

示例4: isNeighborHardConnectionY

import net.minecraft.block.BlockLeavesBase; //导入依赖的package包/类
private boolean isNeighborHardConnectionY (Block block) {
    if (isNeighborHardConnection(block))
        return true;

    return block instanceof BlockLeavesBase
        || block == ModBlocks.thinLogFence;
}
 
开发者ID:jaquadro,项目名称:ForgeMods,代码行数:8,代码来源:BlockThinLog.java

示例5: isBlockValid

import net.minecraft.block.BlockLeavesBase; //导入依赖的package包/类
public boolean isBlockValid(Block block)
{
	return block instanceof BlockLog || block instanceof BlockLeavesBase;
}
 
开发者ID:WayofTime,项目名称:Hemomancy,代码行数:5,代码来源:SummonAIWoodCutter.java


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