本文整理汇总了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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例5: isBlockValid
import net.minecraft.block.BlockLeavesBase; //导入依赖的package包/类
public boolean isBlockValid(Block block)
{
return block instanceof BlockLog || block instanceof BlockLeavesBase;
}