本文整理匯總了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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}