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

Method canLightningStrike

src/main/java/net/minecraft/world/World.java:3568–3587  ·  view source on GitHub ↗
(BlockPos strikePosition)

Source from the content-addressed store, hash-verified

3566 }
3567
3568 public boolean canLightningStrike(BlockPos strikePosition)
3569 {
3570 if (!this.isRaining())
3571 {
3572 return false;
3573 }
3574 else if (!this.canSeeSky(strikePosition))
3575 {
3576 return false;
3577 }
3578 else if (this.getPrecipitationHeight(strikePosition).getY() > strikePosition.getY())
3579 {
3580 return false;
3581 }
3582 else
3583 {
3584 BiomeGenBase biomegenbase = this.getBiomeGenForCoords(strikePosition);
3585 return biomegenbase.getEnableSnow() ? false : (this.canSnowAt(strikePosition, false) ? false : biomegenbase.canSpawnLightningBolt());
3586 }
3587 }
3588
3589 public boolean isBlockinHighHumidity(BlockPos pos)
3590 {

Callers 7

updateBlocksMethod · 0.80
canDieMethod · 0.80
catchOnFireMethod · 0.80
randomDisplayTickMethod · 0.80
updateTickMethod · 0.80
isWetMethod · 0.80
onUpdateMethod · 0.80

Calls 8

isRainingMethod · 0.95
canSeeSkyMethod · 0.95
getBiomeGenForCoordsMethod · 0.95
getEnableSnowMethod · 0.95
canSnowAtMethod · 0.95
canSpawnLightningBoltMethod · 0.95
getYMethod · 0.65

Tested by

no test coverage detected