net.minecraft.world.World.isSidePowered()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中net.minecraft.world.World.isSidePowered()方法的一些代码示例,展示了World.isSidePowered()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.isSidePowered()方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:isSidePowered

World.isSidePowered介绍

暂无

代码示例

代码示例来源:origin: SleepyTrousers/EnderIO

  1. @Override
  2. public boolean isSidePowered(@Nonnull BlockPos pos, @Nonnull EnumFacing side) {
  3. return wrapped.isSidePowered(pos, side);
  4. }

代码示例来源:origin: amadornes/MCMultiPart

  1. @Override
  2. public boolean isSidePowered(BlockPos pos, EnumFacing side) {
  3. return getActualWorld().isSidePowered(pos, side);
  4. }

代码示例来源:origin: CyclopsMC/IntegratedDynamics

  1. @SuppressWarnings("deprecation")
  2. @Override
  3. public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block neighborBlock, BlockPos fromPos) {
  4. super.neighborChanged(state, worldIn, pos, neighborBlock, fromPos);
  5. if(!worldIn.isRemote) {
  6. for (EnumFacing enumfacing : EnumFacing.values()) {
  7. if (worldIn.isSidePowered(pos.offset(enumfacing), enumfacing)) {
  8. worldIn.setBlockState(pos, state.withProperty(HEIGHT, 1));
  9. for(Entity entity : worldIn.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)))) {
  10. entity.motionY += 0.25F;
  11. entity.posY += 0.5F;
  12. }
  13. return;
  14. }
  15. }
  16. }
  17. }

代码示例来源:origin: CoFH/ThermalDynamics

  1. @Override
  2. public void onNeighborBlockChange() {
  3. super.onNeighborBlockChange();
  4. if (ServerHelper.isClientWorld(world())) {
  5. return;
  6. }
  7. lit = false;
  8. EnumFacing[] valid_directions = EnumFacing.VALUES;
  9. for (int i = 0; !lit && i < valid_directions.length; i++) {
  10. Attachment attachment = parent.getAttachment(i);
  11. if (attachment != null && attachment.shouldRSConnect()) {
  12. continue;
  13. }
  14. EnumFacing dir = valid_directions[i];
  15. lit = world().isSidePowered(pos().offset(dir), dir);
  16. }
  17. if (grid != null && grid.lit != lit) {
  18. grid.upToDate = false;
  19. }
  20. }

相关文章

World类方法