MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / canBlockSeeSky

Method canBlockSeeSky

src/main/java/net/minecraft/world/World.java:568–597  ·  view source on GitHub ↗
(BlockPos pos)

Source from the content-addressed store, hash-verified

566 }
567
568 public boolean canBlockSeeSky(BlockPos pos)
569 {
570 if (pos.getY() >= this.func_181545_F())
571 {
572 return this.canSeeSky(pos);
573 }
574 else
575 {
576 BlockPos blockpos = new BlockPos(pos.getX(), this.func_181545_F(), pos.getZ());
577
578 if (!this.canSeeSky(blockpos))
579 {
580 return false;
581 }
582 else
583 {
584 for (blockpos = blockpos.down(); blockpos.getY() > pos.getY(); blockpos = blockpos.down())
585 {
586 Block block = this.getBlockState(blockpos).getBlock();
587
588 if (block.getLightOpacity() > 0 && !block.getMaterial().isLiquid())
589 {
590 return false;
591 }
592 }
593
594 return true;
595 }
596 }
597 }
598
599 public int getLight(BlockPos pos)
600 {

Callers 1

getCanSpawnHereMethod · 0.80

Calls 11

func_181545_FMethod · 0.95
canSeeSkyMethod · 0.95
downMethod · 0.95
getBlockStateMethod · 0.95
getLightOpacityMethod · 0.95
getMaterialMethod · 0.95
getYMethod · 0.65
getXMethod · 0.65
getZMethod · 0.65
getBlockMethod · 0.65
isLiquidMethod · 0.45

Tested by

no test coverage detected