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


Java TFCBlocks.stoneIgInSmooth方法代码示例

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


在下文中一共展示了TFCBlocks.stoneIgInSmooth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.StoneIGINDent) {
            world.setBlock(x, y, z, Blocks.StoneIGINDentSmall, meta, 0x2);
        } else if(id == TFCBlocks.stoneIgEx || id == TFCBlocks.stoneIgExSmooth  || id == Blocks.StoneIGEXDent) {
            world.setBlock(x, y, z, Blocks.StoneIGEXDentSmall, meta, 0x2);
        } else if(id == TFCBlocks.stoneSed || id == TFCBlocks.stoneSedSmooth || id == Blocks.StoneSEDDent) {
            world.setBlock(x, y, z, Blocks.StoneSEDDentSmall, meta, 0x2);
        } else if(id == TFCBlocks.stoneMM || id == TFCBlocks.stoneMMSmooth || id == Blocks.StoneMMDent) {
            world.setBlock(x, y, z, Blocks.StoneMMDentSmall, meta, 0x2);
        }

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

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

示例2: 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

示例3: 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, z)) && TFC_Core.isNaturalStone(world.getBlock(x, y + 1, z)) && TFC_Core.isNaturalStone(world.getBlock(x, y+2, z))) {
        return false;
    }

    if (world.getBlock(x, y, z) == ModBlocks.clayStainedPaver || world.getBlock(x, y, z) == ModBlocks.clayStained ||
            world.getBlock(x, y, z) == ModBlocks.clayStainedPaver2 || world.getBlock(x, y, z) == ModBlocks.clayStained2 ||
            world.getBlock(x, y, z) == TFCBlocks.stoneSed || world.getBlock(x, y, z) == TFCBlocks.stoneSedSmooth ||
            world.getBlock(x, y, z) == TFCBlocks.stoneMM || world.getBlock(x, y, z) == TFCBlocks.stoneMMSmooth ||
            world.getBlock(x, y, z) == TFCBlocks.stoneIgEx || world.getBlock(x, y, z) == TFCBlocks.stoneIgExSmooth ||
            world.getBlock(x, y, z) == TFCBlocks.stoneIgIn || world.getBlock(x, y, z) == TFCBlocks.stoneIgInSmooth) {

        int hasChisel = hasChisel(player);
        if (hasChisel >= 0) {
            if (id == ModBlocks.clayStainedPaver || id == ModBlocks.clayStained) {
                world.setBlock(x, y, z, ModBlocks.clayStainedCircle, meta, 0x2);
            } else if (id == ModBlocks.clayStainedPaver2 || id == ModBlocks.clayStained2) {
                world.setBlock(x, y, z, ModBlocks.clayStainedCircle2, meta, 0x2);
            } else if (id == TFCBlocks.stoneSed || id == TFCBlocks.stoneSedSmooth) {
                world.setBlock(x, y, z, ModBlocks.stoneSedCircle, meta, 0x2);
            } else if (id == TFCBlocks.stoneMM || id == TFCBlocks.stoneMMSmooth) {
                world.setBlock(x, y, z, ModBlocks.stoneMMCircle, meta, 0x2);
            } else if (id == TFCBlocks.stoneIgEx || id == TFCBlocks.stoneIgExSmooth) {
                world.setBlock(x, y, z, ModBlocks.stoneIgExCircle, meta, 0x2);
            } else if (id == TFCBlocks.stoneIgIn || id == TFCBlocks.stoneIgInSmooth) {
                world.setBlock(x, y, z, ModBlocks.stoneIgInCircle, meta, 0x2);
            }
            player.inventory.mainInventory[hasChisel].damageItem(1, player);
            return true;
        }
    }
    return false;
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:36,代码来源:ChiselMode_Circle.java


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