本文整理汇总了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);
}