public bool HasAirFront() { if (globalPosition.z + 1 < worldBuilder().Size.x *Chunk.size - 1) { Block blockAbove = worldBuilder().GetBlockAtGlobalPosition(new Vector3( globalPosition.x, globalPosition.y, globalPosition.z + 1 )); return(blockAbove.GetType() == typeof(Air)); } return(true); }
public bool HasAirBack() { if (globalPosition.z - 1 >= 0) { Block blockAbove = worldBuilder().GetBlockAtGlobalPosition(new Vector3( globalPosition.x, globalPosition.y, globalPosition.z - 1 )); return(blockAbove.GetType() == typeof(Air)); } return(true); }
public bool HasAirAbove() { int maxHeight = ChunkColumn.chunksPerColumn * Chunk.size; if (globalPosition.y + 1 > maxHeight - 1) { return(true); } Block blockAbove = worldBuilder().GetBlockAtGlobalPosition(new Vector3( globalPosition.x, globalPosition.y + 1, globalPosition.z )); return(blockAbove.GetType() == typeof(Air)); }