本文整理了Java中net.minecraft.world.World.isSidePowered()
方法的一些代码示例,展示了World.isSidePowered()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.isSidePowered()
方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:isSidePowered
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public boolean isSidePowered(@Nonnull BlockPos pos, @Nonnull EnumFacing side) {
return wrapped.isSidePowered(pos, side);
}
代码示例来源:origin: amadornes/MCMultiPart
@Override
public boolean isSidePowered(BlockPos pos, EnumFacing side) {
return getActualWorld().isSidePowered(pos, side);
}
代码示例来源:origin: CyclopsMC/IntegratedDynamics
@SuppressWarnings("deprecation")
@Override
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block neighborBlock, BlockPos fromPos) {
super.neighborChanged(state, worldIn, pos, neighborBlock, fromPos);
if(!worldIn.isRemote) {
for (EnumFacing enumfacing : EnumFacing.values()) {
if (worldIn.isSidePowered(pos.offset(enumfacing), enumfacing)) {
worldIn.setBlockState(pos, state.withProperty(HEIGHT, 1));
for(Entity entity : worldIn.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)))) {
entity.motionY += 0.25F;
entity.posY += 0.5F;
}
return;
}
}
}
}
代码示例来源:origin: CoFH/ThermalDynamics
@Override
public void onNeighborBlockChange() {
super.onNeighborBlockChange();
if (ServerHelper.isClientWorld(world())) {
return;
}
lit = false;
EnumFacing[] valid_directions = EnumFacing.VALUES;
for (int i = 0; !lit && i < valid_directions.length; i++) {
Attachment attachment = parent.getAttachment(i);
if (attachment != null && attachment.shouldRSConnect()) {
continue;
}
EnumFacing dir = valid_directions[i];
lit = world().isSidePowered(pos().offset(dir), dir);
}
if (grid != null && grid.lit != lit) {
grid.upToDate = false;
}
}
内容来源于网络,如有侵权,请联系作者删除!