Java 类net.minecraft.block.BlockLeavesBase 实例源码

项目:BaseClient    文件:BlockModelRenderer.java   
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);
    }
}
项目:GardenCollection    文件:CompostRegistry.java   
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);
}
项目:GardenCollection    文件:BlockThinLog.java   
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;
}
项目:ForgeMods    文件:BlockThinLog.java   
private boolean isNeighborHardConnectionY (Block block) {
    if (isNeighborHardConnection(block))
        return true;

    return block instanceof BlockLeavesBase
        || block == ModBlocks.thinLogFence;
}
项目:Hemomancy    文件:SummonAIWoodCutter.java   
public boolean isBlockValid(Block block)
{
    return block instanceof BlockLog || block instanceof BlockLeavesBase;
}