mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-25 14:34:54 +00:00
Clarity
This commit is contained in:
1 parent
ef8cac9c39
commit
753fc0da3a
2 files changed
+7
-10
No files matched your search
@@ -35,12 +35,9 @@ public final class MobOverlayFace {
|
||||
Tessellator.instance.setColorRGBA_I(rgb, Math.round(alpha * 255));
|
||||
}
|
||||
|
||||
/**
|
||||
* True when the neighbour has this block's spawn mode. A neighbour outside the scan counts as joined, so no band is
|
||||
* drawn along the edge of the scan.
|
||||
*/
|
||||
public boolean isJoined(int offsetX, int offsetZ) {
|
||||
final byte neighbourMode = neighbourModes[indexNeighbour(offsetX, offsetZ)];
|
||||
// no band along the edge of the scan
|
||||
return neighbourMode == neighbourModes[indexNeighbour(0, 0)] || neighbourMode == OUTSIDE_SCAN;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,10 @@ import net.minecraft.world.chunk.Chunk;
|
||||
import codechicken.lib.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Spawn modes around the player, scanned a slice per tick into a back buffer. The buffers swap when a pass is done. The
|
||||
* column of a block or light change is rescanned on the next tick. The modes come from
|
||||
* {@link WorldOverlayRenderer#getSpawnMode}: 0 for no spawns, 1 for night only and 2 for any time.
|
||||
* Spawn modes around the player, scanned a slice per tick into a back buffer. When a pass is done, the back buffer
|
||||
* becomes the buffer that {@link #readSpawnMode} reads, and the next pass refills the other buffer. The column of a
|
||||
* block or light change is rescanned on the next tick. The modes come from {@link WorldOverlayRenderer#getSpawnMode}: 0
|
||||
* for no spawns, 1 for night only and 2 for any time.
|
||||
*/
|
||||
public final class MobOverlayScan {
|
||||
|
||||
@@ -53,9 +54,8 @@ public final class MobOverlayScan {
|
||||
}
|
||||
|
||||
/**
|
||||
* Rescan the columns of changed blocks, and scan the next slice of columns, at most once per tick. After
|
||||
* {@link #clear}, a radius change or a world change, scan every column in this call. {@code newRadius} is clamped
|
||||
* between {@link #MIN_RADIUS} and {@link #MAX_RADIUS}.
|
||||
* Scan every column in this call after {@link #clear}, a radius change or a world change. {@code newRadius} is
|
||||
* clamped between {@link #MIN_RADIUS} and {@link #MAX_RADIUS}.
|
||||
*/
|
||||
public void update(Entity entity, int newRadius) {
|
||||
final World world = entity.worldObj;
|
||||
|
||||
Reference in new issue
Block a user