mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-24 05:10:42 -04:00
Fix water modified to be a non-full block still always stretching top face of water. (Thanks VenkSociety)
This commit is contained in:
parent
d005e0aca9
commit
1d00da8381
@ -92,7 +92,7 @@ namespace ClassicalSharp.Gui.Screens {
|
||||
} catch (Exception ex) {
|
||||
ErrorHandler.LogError("loading map", ex);
|
||||
string file = Path.GetFileName(path);
|
||||
game.Chat.Add("&e/client loadmap: Failed to load map \"" + file + "\"");
|
||||
game.Chat.Add("&eFailed to load map \"" + file + "\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,9 @@ namespace ClassicalSharp {
|
||||
x++;
|
||||
chunkIndex++;
|
||||
countIndex += Side.Sides;
|
||||
bool stretchTile = (info.CanStretch[block] & (1 << Side.Top)) != 0;
|
||||
|
||||
while (x < chunkEndX && CanStretch(block, chunkIndex, x, y, z, Side.Top) && !OccludedLiquid(chunkIndex)) {
|
||||
while (x < chunkEndX && stretchTile && CanStretch(block, chunkIndex, x, y, z, Side.Top) && !OccludedLiquid(chunkIndex)) {
|
||||
counts[countIndex] = 0;
|
||||
count++;
|
||||
x++;
|
||||
|
@ -22,8 +22,9 @@ namespace ClassicalSharp {
|
||||
x++;
|
||||
chunkIndex++;
|
||||
countIndex += Side.Sides;
|
||||
bool stretchTile = (info.CanStretch[block] & (1 << Side.Top)) != 0;
|
||||
|
||||
while (x < chunkEndX && CanStretch(block, chunkIndex, x, y, z, Side.Top) && !OccludedLiquid(chunkIndex)) {
|
||||
while (x < chunkEndX && stretchTile && CanStretch(block, chunkIndex, x, y, z, Side.Top) && !OccludedLiquid(chunkIndex)) {
|
||||
counts[countIndex] = 0;
|
||||
count++;
|
||||
x++;
|
||||
|
@ -52,7 +52,7 @@ namespace ClassicalSharp.Network.Protocols {
|
||||
if (game.World.blocks == null) return;
|
||||
|
||||
// Need to refresh lighting when a block's light blocking state changes
|
||||
if (didBlockLight != game.BlockInfo.BlocksLight[block]) {
|
||||
if (game.BlockInfo.BlocksLight[block] != didBlockLight) {
|
||||
game.Lighting.Refresh();
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,9 @@ Int32 NormalBuilder_StretchXLiquid(Int32 countIndex, Int32 x, Int32 y, Int32 z,
|
||||
x++;
|
||||
chunkIndex++;
|
||||
countIndex += Face_Count;
|
||||
bool stretchTile = (Block_CanStretch[block] & (1 << Face_YMax)) != 0;
|
||||
|
||||
while (x < Builder_ChunkEndX && NormalBuilder_CanStretch(block, chunkIndex, x, y, z, Face_YMax) && !Builder_OccludedLiquid(chunkIndex)) {
|
||||
while (x < Builder_ChunkEndX && stretchTile && NormalBuilder_CanStretch(block, chunkIndex, x, y, z, Face_YMax) && !Builder_OccludedLiquid(chunkIndex)) {
|
||||
Builder_Counts[countIndex] = 0;
|
||||
count++;
|
||||
x++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user