当前位置: 首页>>代码示例>>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;未经允许,请勿转载。