Revert "Add: Helper methods for obtaining block's X and Z chunk coordinates given block's world coordinates."
This reverts commit 592a98831a0cb1eb98824bf19b3cead11d2d2d0c.
This commit is contained in:
parent
70f17b73ae
commit
3e124b2a0f
@ -184,16 +184,6 @@ namespace TrueCraft.Core
|
|||||||
return (int)Math.Floor((double)BlockCoord / Chunk.Depth);
|
return (int)Math.Floor((double)BlockCoord / Chunk.Depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int BlockToChunkBlockX(int BlockX)
|
|
||||||
{
|
|
||||||
return BlockX % Chunk.Width;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int BlockToChunkBlockZ(int BlockZ)
|
|
||||||
{
|
|
||||||
return BlockZ % Chunk.Depth;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a value indicating the most extreme value of the
|
/// Returns a value indicating the most extreme value of the
|
||||||
/// provided Vector.
|
/// provided Vector.
|
||||||
|
@ -304,9 +304,9 @@ namespace TrueCraft.Core.World
|
|||||||
|
|
||||||
chunk = GetChunk(new Coordinates2D(chunkX, chunkZ));
|
chunk = GetChunk(new Coordinates2D(chunkX, chunkZ));
|
||||||
return new Coordinates3D(
|
return new Coordinates3D(
|
||||||
MathHelper.BlockToChunkBlockX(coordinates.X),
|
(coordinates.X - chunkX * Chunk.Width) % Chunk.Width,
|
||||||
coordinates.Y,
|
coordinates.Y,
|
||||||
MathHelper.BlockToChunkBlockZ(coordinates.Z));
|
(coordinates.Z - chunkZ * Chunk.Depth) % Chunk.Depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsValidPosition(Coordinates3D position)
|
public bool IsValidPosition(Coordinates3D position)
|
||||||
|
Reference in New Issue
Block a user