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


Java IBlockState.getWeakPower方法代碼示例

本文整理匯總了Java中net.minecraft.block.state.IBlockState.getWeakPower方法的典型用法代碼示例。如果您正苦於以下問題:Java IBlockState.getWeakPower方法的具體用法?Java IBlockState.getWeakPower怎麽用?Java IBlockState.getWeakPower使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.block.state.IBlockState的用法示例。


在下文中一共展示了IBlockState.getWeakPower方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: update

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public void update() {
    IBlockState state = getWorld().getBlockState(getPos());
    for (EnumFacing facing : EnumFacing.VALUES) {
        if (state.getWeakPower(getWorld(), getPos(),  facing) > 0) {
            return;
        }
    }
    getWorld().setBlockToAir(getPos());
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:11,代碼來源:TileEntityDroneRedstoneEmitter.java

示例2: getStrongPower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public int getStrongPower(IBlockState state, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
  return state.getWeakPower(blockAccess, pos, side);
}
 
開發者ID:ToroCraft,項目名稱:Minecoprocessors,代碼行數:5,代碼來源:BlockMinecoprocessor.java

示例3: getStrongPower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
  return blockState.getWeakPower(blockAccess, pos, side);
}
 
開發者ID:ToroCraft,項目名稱:PowerProbe,代碼行數:5,代碼來源:BlockPowerProbe.java

示例4: getRedstonePower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public int getRedstonePower(BlockPos pos, EnumFacing facing)
{
    IBlockState iblockstate = this.getBlockState(pos);
    return iblockstate.isNormalCube() ? this.getStrongPower(pos) : iblockstate.getWeakPower(this, pos, facing);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:6,代碼來源:World.java

示例5: getStrongPower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    return blockState.getWeakPower(blockAccess, pos, side);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:BlockRedstoneDiode.java

示例6: getStrongPower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    return !this.canProvidePower ? 0 : blockState.getWeakPower(blockAccess, pos, side);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:BlockRedstoneWire.java

示例7: getStrongPower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    return side == EnumFacing.UP ? blockState.getWeakPower(blockAccess, pos, side) : 0;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:BlockChest.java

示例8: getStrongPower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    return side == EnumFacing.DOWN ? blockState.getWeakPower(blockAccess, pos, side) : 0;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:BlockRedstoneTorch.java

示例9: getRedstonePower

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public int getRedstonePower(BlockPos pos, EnumFacing facing)
{
    IBlockState iblockstate = this.getBlockState(pos);
    return iblockstate.getBlock().shouldCheckWeakPower(iblockstate, this, pos, facing) ? this.getStrongPower(pos) : iblockstate.getWeakPower(this, pos, facing);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:6,代碼來源:World.java


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