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

Method recheckGaps

src/main/java/net/minecraft/world/chunk/Chunk.java:322–365  ·  view source on GitHub ↗
(boolean p_150803_1_)

Source from the content-addressed store, hash-verified

320 }
321
322 private void recheckGaps(boolean p_150803_1_)
323 {
324 this.worldObj.theProfiler.startSection("recheckGaps");
325
326 if (this.worldObj.isAreaLoaded(new BlockPos(this.xPosition * 16 + 8, 0, this.zPosition * 16 + 8), 16))
327 {
328 for (int i = 0; i < 16; ++i)
329 {
330 for (int j = 0; j < 16; ++j)
331 {
332 if (this.updateSkylightColumns[i + j * 16])
333 {
334 this.updateSkylightColumns[i + j * 16] = false;
335 int k = this.getHeightValue(i, j);
336 int l = this.xPosition * 16 + i;
337 int i1 = this.zPosition * 16 + j;
338 int j1 = Integer.MAX_VALUE;
339
340 for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
341 {
342 j1 = Math.min(j1, this.worldObj.getChunksLowestHorizon(l + enumfacing.getFrontOffsetX(), i1 + enumfacing.getFrontOffsetZ()));
343 }
344
345 this.checkSkylightNeighborHeight(l, i1, j1);
346
347 for (EnumFacing enumfacing1 : EnumFacing.Plane.HORIZONTAL)
348 {
349 this.checkSkylightNeighborHeight(l + enumfacing1.getFrontOffsetX(), i1 + enumfacing1.getFrontOffsetZ(), k);
350 }
351
352 if (p_150803_1_)
353 {
354 this.worldObj.theProfiler.endSection();
355 return;
356 }
357 }
358 }
359 }
360
361 this.isGapLightingUpdated = false;
362 }
363
364 this.worldObj.theProfiler.endSection();
365 }
366
367 /**
368 * Checks the height of a block next to a sky-visible block and schedules a lighting update as necessary.

Callers 2

func_150804_bMethod · 0.95
func_177441_yMethod · 0.95

Calls 8

getHeightValueMethod · 0.95
startSectionMethod · 0.80
isAreaLoadedMethod · 0.80
getFrontOffsetXMethod · 0.80
getFrontOffsetZMethod · 0.80
endSectionMethod · 0.80

Tested by

no test coverage detected