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


Java TFCBlocks.planks方法代码示例

本文整理汇总了Java中com.bioxx.tfc.api.TFCBlocks.planks方法的典型用法代码示例。如果您正苦于以下问题:Java TFCBlocks.planks方法的具体用法?Java TFCBlocks.planks怎么用?Java TFCBlocks.planks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.bioxx.tfc.api.TFCBlocks的用法示例。


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

示例1: onUsedHandler

import com.bioxx.tfc.api.TFCBlocks; //导入方法依赖的package包/类
@Override
public boolean onUsedHandler(World world, EntityPlayer player, int x, int y, int z, Block id, int meta, int side, float hitX, float hitY, float hitZ){

    if(TFC_Core.isNaturalStone(world.getBlock(x, y + 1, z)) && TFC_Core.isNaturalStone(world.getBlock(x, y+2, z))) {
        return false;
    }

    int hasChisel = hasChisel(player);
    if( hasChisel >= 0 ){
        if(id == TFCBlocks.stoneIgIn || id == TFCBlocks.stoneIgInSmooth || id == Blocks.StoneIGINDentSmall) {
            world.setBlock(x, y, z, Blocks.StoneIGINDent, meta, 0x2);
        } else if(id == TFCBlocks.stoneIgEx || id == TFCBlocks.stoneIgExSmooth || id == Blocks.StoneIGEXDentSmall) {
            world.setBlock(x, y, z, Blocks.StoneIGEXDent, meta, 0x2);
        } else if(id == TFCBlocks.stoneSed || id == TFCBlocks.stoneSedSmooth || id == Blocks.StoneSEDDentSmall) {
            world.setBlock(x, y, z, Blocks.StoneSEDDent, meta, 0x2);
        } else if(id == TFCBlocks.stoneMM || id == TFCBlocks.stoneMMSmooth || id == Blocks.StoneMMDentSmall) {
            world.setBlock(x, y, z, Blocks.StoneMMDent, meta, 0x2);
        } else if(id == TFCBlocks.planks ||id == Blocks.PlanksVert) {
            world.setBlock(x, y, z, Blocks.PlanksOutline, meta, 0x2);
        } else if(id == TFCBlocks.planks2 ||id == Blocks.PlanksVert2) {
            world.setBlock(x, y, z, Blocks.PlanksOutline2, meta, 0x2);
        }

        player.inventory.mainInventory[hasChisel].damageItem(1, player);
    }

    return true;
}
 
开发者ID:raymondbh,项目名称:TFC-Additions,代码行数:29,代码来源:ChiselMode_Dent.java

示例2: renderInventoryBlock

import com.bioxx.tfc.api.TFCBlocks; //导入方法依赖的package包/类
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) 
{	
	Block TableLeg;
	Block tableTop;
	
	if(block instanceof BlockPrepTable2)
	{
		TableLeg = TFCBlocks.woodSupportH2;
		tableTop = TFCBlocks.planks2;
	}
	else
	{
		TableLeg = TFCBlocks.woodSupportH;
		tableTop = TFCBlocks.planks;
	}
	
	//Back-Left Leg
	renderer.setRenderBounds(0, 0, 0.76F, 0.24F, 0.88F, 1);
	renderInvBlock(TableLeg, metadata, renderer);
	
	//Front-Left Leg
	renderer.setRenderBounds(0, 0, 0, 0.24F, 0.88F, 0.24F);
	renderInvBlock(TableLeg, metadata, renderer);
	
	//Front-Right Leg
	renderer.setRenderBounds(0.76F, 0, 0, 1, 0.88F, 0.24F);
	renderInvBlock(TableLeg, metadata, renderer);
	
	//Back-Right Leg
	renderer.setRenderBounds(0.76F, 0, 0.76F, 1, 0.88F, 1);
	renderInvBlock(TableLeg, metadata, renderer);
	
	//Top
	renderer.setRenderBounds(0, 0.88F, 0, 1, 1, 1);
	renderInvBlock(tableTop, metadata, renderer);
}
 
开发者ID:StrayWolfe,项目名称:Cooking-with-TFC,代码行数:38,代码来源:RenderPrepTable.java


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