當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockFace類代碼示例

本文整理匯總了Java中net.canarymod.api.world.blocks.BlockFace的典型用法代碼示例。如果您正苦於以下問題:Java BlockFace類的具體用法?Java BlockFace怎麽用?Java BlockFace使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BlockFace類屬於net.canarymod.api.world.blocks包,在下文中一共展示了BlockFace類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: canApply

import net.canarymod.api.world.blocks.BlockFace; //導入依賴的package包/類
@Override
public boolean canApply(Comparable value) {
    if (value instanceof BlockFace) {
        EnumFacing facing;
        switch ((BlockFace) value) {
            case BOTTOM:
                facing = EnumFacing.DOWN;
                break;
            case TOP:
                facing = EnumFacing.UP;
                break;
            case NORTH:
                facing = EnumFacing.NORTH;
                break;
            case SOUTH:
                facing = EnumFacing.SOUTH;
                break;
            case WEST:
                facing = EnumFacing.WEST;
                break;
            case EAST:
                facing = EnumFacing.EAST;
                break;
            default:
                return false;
        }
        return this.getAllowedValues().contains(facing);
    }
    return super.canApply(value);
}
 
開發者ID:NeptunePowered,項目名稱:NeptuneCommon,代碼行數:31,代碼來源:NeptuneBlockDirectionProperty.java

示例2: getFaceClicked

import net.canarymod.api.world.blocks.BlockFace; //導入依賴的package包/類
@Override
public BlockFace getFaceClicked() {
    // TODO Auto-generated method stub
    return null;
}
 
開發者ID:toddharrison,項目名稱:ReturnToWild,代碼行數:6,代碼來源:MockBlock.java

示例3: setFaceClicked

import net.canarymod.api.world.blocks.BlockFace; //導入依賴的package包/類
@Override
public void setFaceClicked(final BlockFace face) {
    // TODO Auto-generated method stub

}
 
開發者ID:toddharrison,項目名稱:ReturnToWild,代碼行數:6,代碼來源:MockBlock.java

示例4: getFacingBlock

import net.canarymod.api.world.blocks.BlockFace; //導入依賴的package包/類
@Override
public Block getFacingBlock(final BlockFace face) {
    // TODO Auto-generated method stub
    return null;
}
 
開發者ID:toddharrison,項目名稱:ReturnToWild,代碼行數:6,代碼來源:MockBlock.java


注:本文中的net.canarymod.api.world.blocks.BlockFace類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。